test(studio): the playback gate counts on CI's Chrome and cannot miss a pause

Review findings on the playback gate:
- Ceilings are recorded on Chrome 153, the runner's browser. The script
  now stops with a clear message when it runs another Chrome major.
- Frames were read from the first renderer main thread in the trace; on
  Chrome 153 that is not the page's, so no frames came out. The thread
  producing frames is used now, and zero frames fail loudly instead of
  passing the CPU check with a NaN median.
- Play goes through Studio's Space shortcut and pause through the
  runtime's player, which both builds share, so a stopped film or a
  renamed control cannot throw before the JSON is written.
- Every timeline seek is counted, silent ones included (3 per frame on
  main), and the layer count is named for when it is read (paused).
- Rounds alternate which build goes first, and a failed base build no
  longer skips the timeline gate; playback is then counted, not timed.
This commit is contained in:
Miguel Ángel
2026-09-27 03:57:32 -04:00
parent 5b1e695c75
commit 480ac61067
3 changed files with 52 additions and 28 deletions
+7 -2
View File
@@ -802,8 +802,10 @@ jobs:
fi
- name: Build the base branch's Studio for the playback timing
# The playback gate times this Studio against its base on the same runner, in
# alternating runs, so the runner's speed cancels out of the ratio.
# alternating runs, so the runner's speed cancels out of the ratio. A failed base
# build must not skip the timeline gate below; the playback step then counts only.
if: github.event_name == 'pull_request'
continue-on-error: true
run: |
set -euo pipefail
git worktree add --detach /tmp/hf-base FETCH_HEAD
@@ -815,6 +817,7 @@ jobs:
mkdir -p packages/studio/data/projects
cp -R "$GITHUB_WORKSPACE/packages/studio/tests/e2e/fixtures/studio-playback" \
packages/studio/data/projects/studio-playback
touch /tmp/hf-base/.playback-base-built
- name: Run both arms of the timeline viewport gate
run: |
set -euo pipefail
@@ -924,11 +927,13 @@ jobs:
PIDS+=($!)
PORTS=(5316)
BASE_URL=""
if [[ -d /tmp/hf-base ]]; then
if [[ -f /tmp/hf-base/.playback-base-built ]]; then
(cd /tmp/hf-base && NODE_ENV=production bun run --cwd packages/studio dev -- --port 5317 --strictPort) &
PIDS+=($!)
PORTS+=(5317)
BASE_URL="http://localhost:5317/#project/studio-playback"
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "::warning::The base branch's Studio did not build, so playback is counted but not timed"
fi
for port in "${PORTS[@]}"; do
for i in $(seq 1 60); do