Skip to content

Harden browser waits and pytest result uploads - #418

Merged
max-sixty merged 4 commits into
mainfrom
codex/reliable-test-evidence
Sep 7, 2026
Merged

max-sixty merged 4 commits into
mainfrom
codex/reliable-test-evidence

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

Replace seven fixed browser waits with causal render, hover, and animation-completion signals. Make the pytest result upload fail when no report exists, so CI cannot silently omit the outcomes and timing artifact.

The nightly command parsing regression was fixed separately on main in #415; this keeps that fix and adds the upload safeguards.

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.

Two points on the current diff.

The hover wait swallows the assertion it precedes. In test_a_dense_document_map_keeps_markers_independent_of_label_height, the new predicate ends with opaque.length === 1, computed over .lf-toc-start a, li a rooted at nav — the same selector and root as the shown read immediately after it, so it is the same condition as assert len(shown) == 1. That assertion can no longer fail. A dense map that painted every label would hold the wait open until it times out, so the regression the test names arrives as a bare wait_for_function timeout rather than the dense map painted overlapping labels: [...] with the labels listed. tests/CLAUDE.md's Make a green test non-vacuous asks what single product change would make each assertion fail; after this change nothing does. The inline suggestion waits on the causal fact instead — the pointer is over a row and that row's own reveal has finished — and leaves the count to the assertion. Only the hovered link is in motion: in theme.css, lf-toc[data-lf-dense] .lf-toc-nav:is(:hover, :focus-within, body[data-lf-goto] *) a pins every label to opacity: 0 and only .lf-toc-nav:hover :is(.lf-toc-start, li):hover a lifts to opacity: 1, so a widget that revealed its neighbours would run their .24s opacity transitions on the same clock and be caught by the read.

include-hidden-files: true is inert, and the upload was not dropping the reports. upload-artifact roots the artifact at the non-glob prefix of path, so .tmp/test-results/*.xml roots at .tmp/test-results and the entries carry no hidden path component for the hidden-file filter to inspect. Runs on main's current config bear that out: the artifact from run 34161487651 is 44 KB and unzips to everyday.xml and touched-nightly.xml. if-no-files-found: error is worth keeping — it catches the report path drifting — but the hidden-files line should come out, and the description recomposed around what the change does, since as written it tells a maintainer the artifacts were empty.

The wait changes in test_render_drawing.py and test_render_export.py read correctly to me: scrollBy reaches pageShifted → drawingShifted → queuePaint's frame within the scroll steps that precede the same turn's animation-frame callbacks, so two turns cover the repaint, and panel_settled after .lf-threads-toggle is the idiom the other modules already use.

Comment thread tests/test_render_widgets.py Resolved
Comment thread .github/workflows/ci.yaml Resolved
@max-sixty
max-sixty merged commit 2132513 into main Sep 7, 2026
13 checks passed
@max-sixty
max-sixty deleted the codex/reliable-test-evidence branch September 7, 2026 21:56
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