Skip to content

test(head-turn): one readiness signal and a browser smoke in CI - #115

Merged
firejune merged 2 commits into
mainfrom
naru/113-demo-smoke
Oct 29, 2026
Merged

firejune merged 2 commits into
mainfrom
naru/113-demo-smoke

Conversation

@firejune

@firejune firejune commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #113.

  • The demo publishes one readiness signal, #demo[data-ready="true"]. It is set only after model and pages have loaded and the first render has completed. Error paths leave it absent.
  • scripts/head-turn-smoke.mjs waits on exactly that signal for 30 s, then asserts:
    • 12 hook directions and 4 directions under real pointer events;
    • 69 bounds;
    • 18 returned clamps and 18 applied public locals;
    • 12 wind/gravity states.
  • The Pages workflow installs pinned Playwright 1.64.1 and runs the smoke as a 3-minute step with no retries, using Playwright's default launch.

The first CI run (40854424528) passed cold readiness on the GitHub runner. The 79 s Canvas2D stall seen in the remote pool's WSL Chromium is specific to that environment, not to the demo or the runtime. That run then failed in the smoke's own clamp probe, which read rig.bone() (world state) instead of the local channel. The probe now reads the public API.

Local verification (Mac) Result
consecutive fresh-process smoke 10/10, 0 retries
planted negatives (flipped yaw sign, missing environment) both caught at the right assertion, both restored green
readiness controls (delayed or failed model/atlas, failed first render, automatic clip) 6/6
bun run test / build:ci / verify 75/0 / pass / pass
smoke on the built _site pass

The earlier hand-written waiter's "60 s" was really 30 s, because its options were passed as the predicate argument.

🤖 Generated with Claude Code

… browser

The demo now sets `#demo[data-ready="true"]` once the model and pages
have loaded and the first render has completed, and only then. Error
paths leave it absent. A Playwright smoke waits on exactly that signal
(30 s), then asserts:
- head and body directions under real pointer events;
- the bounds and clamps of all six dials;
- the wind and gravity per mode.
The smoke runs in the Pages workflow with a 3-minute step bound and no
retries.

The previous hand-written waiter passed `{timeout: 60000}` as the
predicate argument, so its effective timeout was 30 s, not 60 s.

Draft. In the remote pool's headless Chromium, a cold first launch
stalls for about 79 s inside one native Canvas2D `fillRect` in
renderer.init, measured on monotonic clocks in both the page and Node.
Readiness therefore misses the 30 s bound. The Chromium flags in the
smoke are that environment's last experiment, not a proven remedy.
This commit exists so the smoke runs on the CI runner it targets.

Refs #113

Co-Authored-By: Naru <342599188+fj-naru[bot]@users.noreply.github.com>
Co-Authored-By: Roa <342598975+fj-roa[bot]@users.noreply.github.com>
@firejune

Copy link
Copy Markdown
Contributor Author

HQ measurement: on the GitHub runner, cold readiness passes. The step started at 10:03:45 and HEAD_TURN_MEASUREMENTS was printed by 10:04:16. The 79 s Canvas2D stall is specific to the remote pool's WSL Chromium, so no play card is needed. The run then failed on the smoke's own first clamp assertion (yaw clamp -1000000: expected -15, got undefined), which is being fixed. The experimental Chromium flags will be removed.

… experimental Chromium flags

The first CI run passed cold readiness on the GitHub runner. The 79 s
Canvas2D stall was specific to the remote pool's WSL Chromium. The run
then failed in the smoke's own clamp probe (`yaw clamp -1000000:
expected -15, got undefined`): `rig.bone()` returns the bone's world
state, not the local rotation channel. The probe now checks the
unchanged min/neutral/max expectations against both
`setDialsDirect().dials` and the public BoneAdjust locals after the
original callback, which it restores in `finally`.

The experimental Chromium flags are gone; launches use Playwright's
defaults.

Local evidence:
- 10/10 consecutive fresh-process runs.
- Each planted regression is caught: a flipped yaw sign and a missing
  environment. Each restores to green.
- 6/6 readiness controls: delayed or failed model and atlas, a failed
  first render, automatic clip.
- `bun run test` 75/0.
- build:ci and verify pass.
- The smoke passes on the built `_site` artifact.

Closes #113

Co-Authored-By: Naru <342599188+fj-naru[bot]@users.noreply.github.com>
Co-Authored-By: Roa <342598975+fj-roa[bot]@users.noreply.github.com>
@firejune
firejune marked this pull request as ready for review October 29, 2026 10:30
@firejune firejune changed the title test(head-turn): one readiness signal and a browser smoke (draft: CI measurement) test(head-turn): one readiness signal and a browser smoke in CI Oct 29, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-29T10:30:54.595480Z baa2055 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@firejune
firejune merged commit d2bb5ca into main Oct 29, 2026
3 checks passed
@firejune
firejune deleted the naru/113-demo-smoke branch October 29, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

head-turn demo: a deterministic readiness signal and a committed browser smoke for the checks #112 ran by hand

1 participant