Skip to content

Arm the mid-flight post's wait before the press that sends it - #109

Merged
max-sixty merged 1 commit into
mainfrom
fix/ci-33266184820
Aug 29, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ci-33266184820

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Problem

ci on main has been red since bc4596d. Run 33266184820 failed six tests and then hit the 45-minute nightly bound at 72%. Two of the three causes are already fixed on main: 0a4dc85 separated a runtime-owned scroller stop from an authored one, and c14bb42 raised the push-only bound to 90 minutes.

tests/test_render_gate.py::test_a_reload_mid_flight_never_wedges_round_trip is the one left. It failed on that run and again on 33267565103, and it reproduces here without xdist — two of three runs at -n0 on this runner.

The wait is armed after the press it is waiting on. .lf-answer-all's handler posts the event, so the request is issued while click is still in flight; a wait_for_event registered afterwards never hears it and spends its whole 5s timeout on a trip that already left. It passes only where click returns before the runtime gets the post out, which is a race the machine's speed decides.

Measured on this runner

A probe recording /api/event requests alongside the same wait:

listen=False click 1.366s; wait 5.002s -> missed (TimeoutError); seen at []
listen=True  click 1.732s; wait 5.002s -> missed (TimeoutError); seen at [1.227]

The request is announced at 1.227s; click returns at 1.732s; the wait registers after that and hears nothing more.

Solution

Wrap the press in page.expect_request, so the waiter is registered before the gesture that satisfies it. The arrangement is stated rather than raced, and nothing the test proves changes: the route's 0.5s delay still holds the post in the air, and the counters assertion and round_trip after the reload are untouched.

tests/render_harness.py's wait_for_event is the only other use, and it re-reads the counters around each wait, so a missed event there costs a loop rather than the test.

Testing

  • uv run pytest tests/test_render_gate.py::test_a_reload_mid_flight_never_wedges_round_trip --run-nightly -n0 — four consecutive passes, against two failures in three before the change.
  • uv run pytest tests — 708 passed, 6 skipped.
  • pre-commit run --files tests/test_render_gate.py — clean.

Automated fix for failed run

@max-sixty
max-sixty merged commit 470ccc8 into main Aug 29, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ci-33266184820 branch August 29, 2026 21:40
leaf-agent added a commit that referenced this pull request Nov 14, 2026
…r Dependabot alerts (#5940)

Clears the six open Dependabot alerts for `hono` (#109–#113, fixed in
4.13.16) and `basic-ftp` (#107, fixed in 6.2.4). Both are
development-only transitives of the eval stack. Dependabot's own
security updates for both failed on 2026-11-13 (runs
[43392104554](https://github.com/max-sixty/leaf/actions/runs/43392104554)
and
[43392104839](https://github.com/max-sixty/leaf/actions/runs/43392104839)),
so nothing else was going to open this PR.

- **basic-ftp**: `package.json` pins it through the scoped override
`get-uri>basic-ftp`, which #1681 added because `get-uri` still asks for
5.x. That exact pin is why Dependabot couldn't update it. This PR moves
the pin from 6.2.1 to 6.2.6, the latest release in the same major that
#1681 picked.
- **hono**: nothing pins it. Every dependant asks for a range (`^4.11.4`
from `@modelcontextprotocol/sdk`, `^4 || ^5` from `@hono/node-server`),
and the lockfile had simply resolved 4.13.12. `pnpm update hono --depth
Infinity --lockfile-only` moved it to 4.13.18.

The lockfile changes nothing beyond those two packages. Verification:
`pnpm install --frozen-lockfile` succeeds. `@hono/node-server` 2.1.8
`serve()` with hono 4.13.18 answered a request with 200. The `basic-ftp`
that `get-uri` resolves loads as 6.2.6 and exports `Client`.

Co-authored-by: leaf-agent <[email protected]>
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