Repository navigation
Repair the nightly margin and anchors tests the go-to hint change left red - #339
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
Verified the repair independently rather than restating the PR's own numbers, because the ci PR gate cannot run either changed file. On the merge base 83f69563 both cases fail — test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure with ValueError: Unsupported type: <class 'str'>, and test_one_key_keeps_one_keyboard_face_across_the_page at expect(picked).to_be_visible() with the .lf-address span resolving hidden, which is the projection suppression the PR body describes. At d10463fd, uv run pytest tests/test_render_anchors.py tests/test_render_margin.py --run-nightly is 155 passed. The phase rebinding is safe: the only other phase in that test is assert_status's parameter, which is function-local and unaffected by an assignment in the enclosing scope, and target still names the page.locator("#jobs") binding the later expect(target) class assertions read.
The gap the PR body names in passing is worth its own change. ci.yaml's pull_request step runs uv run pytest tests, which skips every test_render_* module, so a PR whose entire diff is those files goes green having exercised none of it — including this one. That is how #336 landed a rewrite of these two files, and #338 is in the same position right now with tests/test_render_margin.py and tests/test_render_navigation.py. Running the nightly-marked files a PR actually touches would close it at the cost of those files rather than the whole 22–41 minute nightly suite. Flagging rather than folding it in here, since it is a separate concern and the gate's cost is a maintainer call.
|
No change to this PR from the review — it verifies the repair independently and confirms the The gate gap it names is now #340, kept separate as the review suggested. The everyday suite deselects the nightly-marked modules, so a pull request whose whole diff is one of them — this one included — goes green having exercised none of it; #340 runs the touched modules with |
|
This is the fix for the red Reproduced both on |
The feature gallery's existing Button section showed a composed cluster but not the complete visual grammar. This adds a gallery-only atlas built from the canonical margin Button factory, with every role, behavior, tone, and lifecycle state visible together. The same section now carries a real suggestion through failure, animated delivery, the transient Accepted acknowledgment, settled content and Undo, handoff status, and active work. Atlas coverage is checked against the runtime-owned `BUTTON_GRAMMAR`, so a new Button value cannot leave the gallery and its test green but incomplete. The standalone-export probe now recognizes content deliberately retired by a standing decision as absent by design. This branch also incorporates the two browser-test repairs from #339, keeping current `main`'s nightly anchor and margin files aligned with generated go-to hints. > _This was written by Codex on behalf of max-sixty_
The everyday suite `ci` runs on a pull request deselects every nightly-marked module, so a pull request whose whole diff is one of those modules goes green having exercised none of it. That is how #336 landed a rewrite of `tests/test_render_margin.py` and `tests/test_render_anchors.py` under a green gate and reddened `main` the moment it merged — #339 is the repair — and #338 is in the same position right now with `tests/test_render_margin.py` and `tests/test_render_navigation.py`. This names the touched modules back. A new pull-request step diffs the merge commit against its base parent, collects the `tests/test_*.py` files the diff touches, and runs them with `-m nightly`: `conftest.py` already runs what an explicit file selection names, `-m nightly` leaves a mixed module's everyday cases to the step above rather than running them twice, and pytest's exit 5 is what a pull request that touches no nightly case gets. The cost is the touched files, not the 22–41 minute nightly suite, and a pull request that touches no test module pays nothing. A change to the runtime those modules drive is still the nightly run's to catch; this reaches the modules themselves. <details><summary>Verification</summary> The step's shell was run locally against real commit ranges, with `uv run pytest` swapped for the same invocation: - `83f69563..d10463f` (#339's two nightly modules) — selects both, 155 nightly cases collected. - `ff580ecb..867c526` (touches `tests/test_render_mcp.py`, which carries no nightly mark) — selects it, `no tests ran`, exit 5 tolerated, step exits 0. - An empty range — `No test module touched.`, exit 0. - `d10463fd..83f6956` (the same diff reversed, so the range reads as deletions) — the `[ -f ]` filter drops what is not on disk and the step still selects correctly. End-to-end, `uv run pytest tests/test_render_drawing.py -m nightly -q` is 21 passed, so the invocation drives real browser cases rather than only collecting them. Suite and lint on this branch: - `uv run pytest tests` — 891 passed, 6 skipped. - `uv run pytest tests/test_interact_layer.py` — 157 passed, 6 skipped (this is the module that reads `ci.yaml`; the new step declares no `working-directory`, so the gate-naming test is unaffected). - `pre-commit run --files .github/workflows/ci.yaml CLAUDE.md tests/CLAUDE.md` — passed, including actionlint's shellcheck pass over the new `run:` block. `fetch-depth: 2` on the `test` job's checkout is what gives the merge commit its base parent; the default depth of 1 has no `HEAD^1` to diff against. </details> Co-authored-by: leaf-agent <[email protected]>
The everyday suite `ci` runs on a pull request deselects every nightly-marked module, so a pull request whose whole diff is one of those modules goes green having exercised none of it. That is how #336 landed a rewrite of `tests/test_render_margin.py` and `tests/test_render_anchors.py` under a green gate and reddened `main` the moment it merged — #339 is the repair — and #338 is in the same position right now with `tests/test_render_margin.py` and `tests/test_render_navigation.py`. This names the touched modules back. A new pull-request step diffs the merge commit against its base parent, collects the `tests/test_*.py` files the diff touches, and runs them with `-m nightly`: `conftest.py` already runs what an explicit file selection names, `-m nightly` leaves a mixed module's everyday cases to the step above rather than running them twice, and pytest's exit 5 is what a pull request that touches no nightly case gets. The cost is the touched files, not the 22–41 minute nightly suite, and a pull request that touches no test module pays nothing. A change to the runtime those modules drive is still the nightly run's to catch; this reaches the modules themselves. <details><summary>Verification</summary> The step's shell was run locally against real commit ranges, with `uv run pytest` swapped for the same invocation: - `83f69563..d10463f` (#339's two nightly modules) — selects both, 155 nightly cases collected. - `ff580ecb..867c526` (touches `tests/test_render_mcp.py`, which carries no nightly mark) — selects it, `no tests ran`, exit 5 tolerated, step exits 0. - An empty range — `No test module touched.`, exit 0. - `d10463fd..83f6956` (the same diff reversed, so the range reads as deletions) — the `[ -f ]` filter drops what is not on disk and the step still selects correctly. End-to-end, `uv run pytest tests/test_render_drawing.py -m nightly -q` is 21 passed, so the invocation drives real browser cases rather than only collecting them. Suite and lint on this branch: - `uv run pytest tests` — 891 passed, 6 skipped. - `uv run pytest tests/test_interact_layer.py` — 157 passed, 6 skipped (this is the module that reads `ci.yaml`; the new step declares no `working-directory`, so the gate-naming test is unaffected). - `pre-commit run --files .github/workflows/ci.yaml CLAUDE.md tests/CLAUDE.md` — passed, including actionlint's shellcheck pass over the new `run:` block. `fetch-depth: 2` on the `test` job's checkout is what gives the merge commit its base parent; the default depth of 1 has no `HEAD^1` to diff against. </details> Co-authored-by: leaf-agent <[email protected]>
test_render_*is nightly-marked, so the PR gate never ran the two files #336's hint migration rewrote; both went red onmainthe moment it landed.tests/test_render_margin.pyrebindstarget— apage.locator("#jobs")the test still uses seventy lines later — to the hint's phase id string, so the run dies atexpect(target).not_to_have_class(...)withValueError: Unsupported type: <class 'str'>; renaming the new binding tophaseis the whole fix.tests/test_render_anchors.pyreads the Ask option's key face while the go-to chord is armed, and the chord is a nearer keyboard layer that takes the Ask digit projection back while it stands, so the face isdisplay: noneand never becomes visible.Both were verified here against
main: each failure reproduces ona4eb323fand passes onb7703fb9, the commit before the merge.The anchors repair, and one behavior worth confirming
The test's new comment claims bare
g"paints the page's generated target letters without replacing the Ask projection." Probed on the merged runtime, it replaces it: with focus in#tq-one .lf-pickthe two.lf-addressfaces read1:block/2:block, and aftergthey read:none. That matches whatasks/view.jssays it intends — "A nearer keyboard layer suppresses the row and both projections … so a digit never stays promised after a chord, text box, or modal has taken it" — so this change follows the runtime and reads the option's face before arming the chord rather than during it. If the projection was meant to survive bareginstead, the repair belongs inpaintActionProjectionsand this test should go back to one frame.The face reads are also now one task each. Resolving a locator handle in one round trip and measuring it in the next let the standing paint detach the element in between, and a detached element has no computed style at all — every property came back
''. That reproduced on the chip, the key line, and the hint layer in turn, which is whyFACEis applied throughdocument.querySelectorinside a singlepage.evaluatefor every face compared.The
cpress before the focus stays: the Ask projection paints on a keyboard gesture, and opening the composer is the gesture the test already had. Bare.focus()with a 300ms settle paints nothing, before or after the migration.Verification
uv run pytest tests/test_render_anchors.py tests/test_render_margin.py— 155 passed, on83f69563.uv run pytest tests— 891 passed, 6 skipped.pre-commit run --files tests/test_render_anchors.py tests/test_render_margin.py— passed.