Repository navigation
ci(website): gate the transcript rows on a 4px grid floor - #19161
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] f07d500 Description read[DESCRIPTION-READ] af458d0351f714c4bf393e6ab5a636a0b7c3025801c8f3721dd97cb0f420f67e That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that this PR's first [DESIGN-REVIEWED] f07d500 Description read[DESCRIPTION-READ] 98452959848e800797c03581055c30f795ef227e5cdc8b3e75d88c7acd8af399 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The new step goes before the parallel E2E step, so if the floor fails, E2E is skipped for that run. Confirm that ordering is acceptable. What this change shipsInventory (6 items) — 6 justifiedIntent: make every pull request fail when a transcript row's card padding leaves the 4px grid, or when the row harness matches zero rows. This is an ADDITION (a CI gate) that closes #4520.
[FIRST-PRINCIPLES-REVIEWED] f07d500 Description read[DESCRIPTION-READ] 8fe884d7178cf2857de782d973f1e1c8d9a1fb314ac3c1a9692703124bb9058b That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
|
Maintainer read (bolichen97): the code is clean and the new step ran green on CI ("Transcript rows hold the 4px grid floor (asserting harness)" in the E2E job). Since this is a new gate on every PR with no path filter, and the branch is ~146 commits behind, please rebase onto current main so the step runs green once on today's main before it lands. I will approve the rebased head. Posted by an AI assistant at bolichen97's request, after a read-only review of this head. |
eeb7e37 to
683a2b0
Compare
The transcript row harness measured padding, pitch and every internal edge, but nothing ran it on a pull request, and its 4px verdict was print-only. Move the pass/fail decision into scripts/lib/transcript-grid-floor.mjs: a frame fails when its row selector matches zero rows (the message names the selector, candidate count and gutter class), when a row's card padding is off the 4px grid on any side, when a row leaves the column text edge, or on a page error. Pitch and internal edges stay a printed report: both are off the grid on main for known reasons and follow the runner's font metrics. Give the harness a --serve mode that starts an in-process Vite dev server on loopback, since the production build does not emit capture pages, and run it in the E2E job after the Chromium install, behind the non-root boundary. Closes #4520
683a2b0 to
f07d500
Compare
|
@bolichen97 Rebased onto current main ( On the new head |
iamwhatever
left a comment
There was a problem hiding this comment.
The transcript row harness measured the 4px grid but never failed, and it once passed while matching zero rows. This PR moves the verdict into a pure judgeFrame. A frame fails on zero rows, padding off the grid on any side, a row off the column text edge, or a page error. The PR adds a --serve mode and runs the harness in CI's E2E job. I checked that the probe really records padTop/padRight/padBottom/padLeft as parsed floats, so the floor reads real values, not undefined. The in-process Vite server binds only to 127.0.0.1 and is closed after the run. I confirmed the new step ran and passed in the "E2E (stub ACP backend, offline)" job on f07d500. The unit tests cover every failure branch, including the empty-frame guard. Pitch and internal edges stay report-only, for reasons the PR states. All lanes are PASS and checks are green. — crew-pr-reviewer (deep re-check)
Problem / Motivation
Goal: Every pull request fails when a transcript row's card padding leaves the 4px grid, or when the row harness silently matches zero rows.
The transcript row harness (
website/scripts/capture-transcript-row-style.mjs) measures every transcript row against the 4px grid, but no pull request ran it and its 4px verdict was print-only. It has already gone vacuous once: its selector matched zero rows and the run still passed, because every per-row check had nothing to iterate.Why it matters
A row restyle that breaks the transcript's 4px rhythm merges unnoticed, and a selector drift turns the harness into a check that always passes. Reviewers then trust a guard that is not guarding anything.
Not a goal
What changed (motivation → approach → change)
Design call: floor, scoped to what holds on main. Ratchet vs floor was the open question on #4520. This PR takes the floor, which needs no baseline storage and no churn. A frame fails when:
Pitch and internal edges are still printed as a report but are not enforced. Measured on main:
The causes are the ones #4520 names: the 22px chip line box, flex-centred 12-15px glyph boxes, and Markdown prose height. Both measurements also follow the runner's font metrics wherever text wraps or sizes a box. The floor module's docstring records the same boundary next to the code.
Changes:
website/scripts/lib/transcript-grid-floor.mjs(new): the pass/fail decision as a pure function (judgeFrame), plus the row selector and grid helpers. This is the same split as the i18n render gate'srender-verdict.mjs.capture-transcript-row-style.mjs:--serve, which starts an in-process Vite dev server on loopback. The production build does not emit capture pages, so this means one command and one shell.ci.yml,e2ejob: one new step, nothing else touched.frontend-lintinstalls no browser.runnerthroughci-shelllike the other test steps. It writes no GitHub file command.timeout-minutes: 5. Locally the whole run takes about 7 seconds.index.css, the Tailwind config), not only with transcript components. A path filter would miss exactly the drift this guards against.Backwards compatibility
Compatible: the harness keeps its existing invocation and output; it only gains
--serveand a non-zero exit on a floor failure, and main holds the floor today.Removes nothing: the diff adds a module, a test file, a CLI flag and a CI step, and takes no path, key, record or function away.
Tests
website/src/test/transcriptGridFloor.test.ts(new), 15 cases: an empty frame (both no candidates and candidates dropped by the gutter filter), each padding side, fractional padding, text-edge offset, page errors, and that pitch and internal edges never fail.npx vitest run src/test/transcriptGridFloor.test.ts: 15 passed.--max-warnings 0) on the touched files: clean. jscpd: 0 clones.test_ci_nonroot_boundary.pyand the otherci.ymlsuites) pass. The only failures are twopytest_splitcases that fail identically on main in an environment without that plugin.Manual verification
End to end,
node scripts/capture-transcript-row-style.mjs --serve <dir>:py-2changed topy-1.5on the error card: exit 1,row error-card card padding is off the 4px grid: padTop=6 (off by 2), padBottom=6 (off by 2).ZERO transcript rows matched. Selector [style*="--mc-row-width"] found 0 candidate(s) ....Screenshots / video
Why no screenshot: the diff changes a capture script, a pure verdict module, a unit test and a CI step, and no rendered component or style.
Related Issues
Closes #4520
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.