Add a lane-run geometry audit for Session Info alignment

Merged
TE
9d ago
+362-0

Runs a measured Session Info geometry baseline through the gallery capture CI. The capture records real DOM rectangles and computed styles next to frozen light/dark screenshots, with the actual DPR, dimensions and screenshot SHA. The lint compares the declared top-block labels and preserves the measured existing 2px drift as bounded debt; any larger drift or missing evidence fails.

Leo’s ask (2026-10-28): “I've generally been feeling like a lot of our alignment stuff, like, I don't know, I feel like you guys could be doing more audits of the app. Like there's some amount of, like, satisfying and pretty stuff that can happen that we're not quite taking full advantage of.”

This is stacked on #26496. It adds a lane-run geometry audit tool (captures, geometry JSON, report and finding crops) that owners run on the fleet; it does not add a CI gate or workflow job. Scope is explicitly Session Info label alignment; native AX coverage and measured text baselines remain recorded gaps, never inferred passes.

The baseline is observed evidence: capture 0e45b912 at source025db075 (product tree92c51f) measured Environment labels at128px and Context/Connectors labels at126px in both appearances. Header-only sections are excluded. The rule permits0.5px; the two observed2px findings are separately accepted debt with a reason. The checker does not update or raise baselines automatically.

Validation: real fleet build/capture/lint run40618349441 passed at snapshot1eff4a0b001ccbb681da97f6c349ee8fcb1b08f8. Static prepush gate passed at e28dfd8cf3e. Final focused core/geometry-audit/runner tests passed in run40618534514 at exact snapshotf4e7d52e74725665e27abf36a465328781aab36d (sourcee28dfd8cf3e).

No runtime UI changes. Capture uses the existing bounded gallery runner and closes its browser contexts. Regression CLI children have a 20-second deadline cleared when the child completes.

Review follow-up at 8549e723f4a47492afa30ec37b3ccef9e8f8f92a: capture failure survives successful geometry lint. The CLI and integration tests share a caller-provided fleet/CI environment guard; tests never set it. Final run 40628517982 passed at source 8549e723f4a47492afa30ec37b3ccef9e8f8f92a, snapshot a33409b081e751c7b08a489ad76ce5443dfd917d: 13 tests/52 assertions, including real Chromium ready, failed-play and unready CLI cases. A second invocation with CI/fleet flags absent passed three unit cases and skipped all three browser cases. Earlier head 766f65de failed the CI-only path; this shared-guard fix resolves it. That historical review has been superseded.

Review (codex gpt-6-astra high): SHIP at 2d832daa8e7fb2dc6cf4d5a76edb753cd174d518 (prior code head; docs/workflow follow-up requires fresh review).

The subsequent documentation-only delta restores #26496’s measurement guidance. No validator, runner, workflow, or runtime changes follow that reviewed head.

Gallery health comparison at the reviewed runtime head

Head: 2d832daa8e7fb2dc6cf4d5a76edb753cd174d518; run 40679625703.
Base: 5d2b797911698fa5418725bd12aced855a1347b9; run 40680084612 (push to feat-cmux-next).

scripts/ci/test_reds.py classify returns null / exit 2 for these raw gallery logs: this version does not parse gallery state failures. The explicit state-by-state comparison follows; no automated classifier pass is claimed.

Head shardStateHead failureBase failureComparison
health (2)agent-pane.streaming-text#jump-during-stream17354 ms, budget 2000 ms17312 ms, budget 2000 msSame failure
health (0)agent-pane.composer-look#permission-pill-claudeplay: no element for .acpmux-access-triggerplay: no element for .acpmux-access-triggerSame failure
health (0)agent-pane.empty-state#searchplay: waitFor did not hold within 5000 msplay: waitFor did not hold within 5000 msSame failure
health (0)agent-pane.narrow#model-menuplay: waitFor did not hold within 5000 msplay: waitFor did not hold within 5000 msSame failure
health (1)agent-pane.composer-look#permission-pill-codexplay: no element for .acpmux-access-triggerplay: no element for .acpmux-access-triggerSame failure
health (3)agent-pane.model-picker#many-harnessesplay: waitFor did not hold within 5000 msplay: waitFor did not hold within 5000 msSame failure
health (3)agent-pane.new-tab#style-switchplay: waitFor did not hold within 5000 msplay: waitFor did not hold within 5000 msSame failure

Agent session: agent session

The gallery health workflow intentionally does not run geometry-audit; the documented cmux-ci test --setup webviews command runs it on a fleet worker.