Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

ci(verify): keep real capture on hosted macOS by default

Richie McIlroybc26169a769f
diff --git a/.github/workflows/verify-recording.yml b/.github/workflows/verify-recording.yml
index 4ac253df0..a85506734 100644
--- a/.github/workflows/verify-recording.yml
+++ b/.github/workflows/verify-recording.yml
@@ -9,18 +9,18 @@ name: Verify recording (real capture)
# - Scope decides from the diff whether the change reaches the recorder's or
# the stimulus's dependency closure or the harness (scripts/verify/plan.py
# recording); a pull request that does not is green without running;
-# - one that does runs the FAST tier on Blacksmith macOS 15, or the FULL tier
-# on Blacksmith macOS 15 and 26 when it touches a high-risk region or an
-# engine crate; nightly and dispatch run FULL on both.
+# - one that does runs the FAST tier on macOS 15, or the FULL tier on macOS
+# 15 and 26 when it touches a high-risk region or an engine crate; nightly
+# and dispatch run FULL on both.
#
-# Runners: Blacksmith macOS (M4 Pro VM, 6 vCPU, logged-in GUI session, no
-# concurrency cap). Hosted macOS is reserved for main and release CI and is
-# only used on dispatch (runners=hosted or both). Blacksmith VMs have no
-# VideoToolbox hardware H.264 encoder (probe run 38847791287), so recordings
-# there take the software (libx264) path; the hardware path is covered by
-# dispatches on hosted runners. Blacksmith needs Screen Recording and
-# Microphone granted in TCC, its display woken, and an audio device
-# (BlackHole); the setup step below does that.
+# Runners: GitHub-hosted macOS by default, because real Macs record through
+# the VideoToolbox hardware H.264 encoder and Blacksmith macOS VMs have none
+# (VTCompressionSessionCreate with RequireHardwareAcceleratedVideoEncoder
+# returns -12903, probe run 38847791287), so every recording there takes the
+# software (libx264) path. Blacksmith (M4 Pro VM, 6 vCPU, no concurrency cap)
+# is a dispatch option (runners=blacksmith or both) that covers that path; it
+# needs Screen Recording and Microphone granted in TCC, its display woken,
+# and an audio device (BlackHole), which the setup step below does.
on:
workflow_dispatch:
inputs:
@@ -42,10 +42,10 @@ on:
type: boolean
default: false
runners:
- description: "blacksmith (default), hosted (GitHub macOS, reserved for main and release) or both"
+ description: "hosted (default), blacksmith (software encoder path) or both"
type: choice
- options: [blacksmith, hosted, both]
- default: blacksmith
+ options: [hosted, blacksmith, both]
+ default: hosted
schedule:
- cron: "41 3 * * *"
pull_request:
@@ -90,16 +90,16 @@ jobs:
run: |
set -euo pipefail
files="$RUNNER_TEMP/changed.txt"
- blacksmith='["blacksmith-6vcpu-macos-15","blacksmith-6vcpu-macos-26"]'
+ hosted='["macos-15","macos-26"]'
case "$EVENT" in
- schedule) run=true; runners="$blacksmith"; tier=full ;;
+ schedule) run=true; runners="$hosted"; tier=full ;;
workflow_dispatch)
run=true
tier="${INPUT_TIER:-full}"
- case "${INPUT_RUNNERS:-blacksmith}" in
- hosted) runners='["macos-15","macos-26"]' ;;
+ case "${INPUT_RUNNERS:-hosted}" in
+ blacksmith) runners='["blacksmith-6vcpu-macos-15","blacksmith-6vcpu-macos-26"]' ;;
both) runners='["blacksmith-6vcpu-macos-15","blacksmith-6vcpu-macos-26","macos-15","macos-26"]' ;;
- *) runners="$blacksmith" ;;
+ *) runners="$hosted" ;;
esac ;;
*)
if [[ "$EVENT" == pull_request ]]; then
@@ -117,9 +117,9 @@ jobs:
run="$(sed -n 's/^run=//p' "$RUNNER_TEMP/scope.txt")"
python3 scripts/verify/plan.py risk --files "$files" --summary "$GITHUB_STEP_SUMMARY" --output "$RUNNER_TEMP/risk.txt"
if grep -qx 'escalate=true' "$RUNNER_TEMP/risk.txt" || grep -qx 'engine=true' "$RUNNER_TEMP/risk.txt"; then
- runners="$blacksmith"; tier=full
+ runners="$hosted"; tier=full
else
- runners='["blacksmith-6vcpu-macos-15"]'; tier=fast
+ runners='["macos-15"]'; tier=fast
fi ;;
esac
echo "run=$run" >> "$GITHUB_OUTPUT"