Skip to content

Collapse broad browser test matrices - #691

Merged
max-sixty merged 7 commits into
mainfrom
codex/simplify-test-suite
Sep 14, 2026
Merged

max-sixty merged 7 commits into
mainfrom
codex/simplify-test-suite

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

The broad browser suites were repeating the same structural assertions across every fixture and multiplying expensive browser work without adding distinct evidence. This change keeps the full 19-page authored corpus as the render gate, while choosing explicit, unlike representatives for passage and mapped-revision behavior, the feature gallery for the width/scheme Axe matrix, and the generated corpus for one standalone-export check.

That reduces the broad matrices from 83 collected cases to 29 and removes 49 net lines. The test guidance now names the exact evidence each representative provides, including the narrower accessibility reading retained for specialist packages, instead of treating every fixture as a second taxonomy.

Validated with the 10 focused browser behaviors, all six review-fix paths, exact 29-case collection, all 1,116 ordinary tests, pre-commit, and diff checks.

This was written by Codex on behalf of max-sixty

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The collapse is well argued, and the 29 remaining cases pass here. Two things in it claim coverage that isn't there.

One of the four hand-picked anchor representatives can't fail. examples/developer/visual-review-gallery.html authors only <lf-visual-review> and no prose, so in test_an_anchor_written_from_the_mapped_revision_lands_on_the_page the if not authored.strip() guard returns before a browser opens. Confirmed by making that branch raise: [visual-review-gallery] was the only case that tripped it, and the four finished in 14s against ~2m for the three that actually render. As one of nineteen that was noise; as one of four it is a quarter of a sweep whose docstring now says all four "cover native blocks, representative widgets, and projected text that can make the file and browser readings disagree." Inline below.

The Axe docstring names compensation I can't find. The matrix drops from nineteen live pages to the feature gallery, and the new text says "focused accessibility tests own the specialist surfaces it does not contain." The other Axe() / serious_axe_violations call sites are the chrome-key sweep beneath it, the version menu in test_render_anchors.py, the acknowledgment disclosure and small-screen map in test_render_margin.py, and one case in render_cases_layout.py — none reads swipe, targeting, or visual-review. What does reach them is the Axe call at the end of test_the_exported_corpus_stands_on_its_own: 420px, one scheme, on a copy with the chrome and the live control attributes already stripped. If that is the intended answer the docstring should name it, since it is a materially weaker reading than the one those three packages had; if it isn't, they now have no accessibility gate at all.

Two smaller ones, both outside the diff — happy to push either or both:

  • skills/leaf/assets/CLAUDE.md still says test_an_exported_page_fixture_stands_on_its_own ("strips scripts, opens the copy, and asks what still looks actionable"). This PR renames it, and nothing in the suite reads doc-referenced test names, so it will sit stale.
  • In test_the_exported_corpus_stands_on_its_own, covered = evaluate_probe(page, "coveredWords") is followed by assert evaluate_probe(page, "coveredWords") == covered — the probe compared with itself, so it can never fail. That predates this PR, but the PR makes it the function's only run, and the comment above it ("the last two ways one went out wrong were both a widget's words landing on the page's") describes a check that isn't happening. assert covered == [] is the live form and passes on the exported corpus.

Worth knowing: nightly is skipped on pull requests, so every test this PR touches is unrun by the PR gate. #689 also edits test_render_export.py, test_render_navigation.py, and test_render_projection.py, but on unrelated lines.

Comment thread tests/render_harness.py Resolved
Comment thread tests/test_render_controls.py Resolved

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both findings are resolved on e1e0c805, verified by running the two tests it changes.

Anchor parity. Swapping swipe-gallery into ANCHOR_SOURCES gives the sweep a page that authors prose, so the case reaches the browser instead of returning at the old guard: under -n0 it spends 1.75s of real work against the ~0.1s the early return cost, and the four pass in 16s. Replacing the early return with assert authored.strip() also means a future prose-free selection fails loudly rather than going quiet.

Axe scope. The docstring's new claim holds. DEVELOPER_PAGES feeds CORPUS_SOURCES, and test_the_exported_corpus_stands_on_its_own unhides every outer tab and asserts checkVisibility() before resized(page, 420, 900) and serious_axe_violations, so swipe, targeting and visual-review really do sit inside that single reading rather than being skipped as hidden content. Passes in 56s.

A correction of my own. I said the coveredWords self-comparison left the comment above it describing "a check that isn't happening". That was wrong: assert covered == [], f"the copy draws its own words over each other: {covered}" already stood at the end of the same function, over that same Python value. The line I flagged was a redundant second evaluation of the probe that could not fail, not a missing check. With assert covered == [] in its place there are now two identical assertions on one value, and the bare one runs first, so a genuine failure reports as a plain AssertionError and the message the later assertion carries never prints. Dropping the line while keeping covered = render_checks_model.evaluate_probe(page, "coveredWords") is what I should have named; happy to push that if it is useful.

@max-sixty
max-sixty merged commit f5bec4b into main Sep 14, 2026
7 checks passed
@max-sixty
max-sixty deleted the codex/simplify-test-suite branch September 14, 2026 00: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.

2 participants