Skip to content

Fix three nightly failures: the adapter's startup beacon, the screenshot flip's margin command, and a ring specimen behind a closed tab - #734

Merged
max-sixty merged 3 commits into
mainfrom
fix/ci-34960165078
Sep 15, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix/ci-34960165078

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The nightly suite went red on main with 4 failures and 22 errors (run 34960165078). Three durable causes account for 25 of those 26 nodes; the fourth was already repaired by #732, which merged 24 minutes after the run started. Each cause is one commit here.

The website adapter 404s the startup beacon. #717 added the public startup report, handled it in worker/src/index.ts, and required it in scripts/verify_site.py — but worker/server.py never learned the route. Every released document posts to <page>/api/performance; the deployed site answers at the edge, and a site served straight from the adapter has no edge in front of it, so the POST fell through to the base handler's 404. That is a console error on every page the adapter serves, which is why one missing route reddened 23 nodes of the suite's clean-console reading. The adapter now answers 204 at its own boundary, the way end_headers already adds the Leaf-Session reading the Worker would have.

lf-shot's margin entry lost the flip's name. #716 replaced adopted source controls with immutable margin projections and deleted contributor-owned margin command rows, adding a marginEntry scope option to carry the declaration across to a control the margin generates. lf-draft was cut over in that commit; lf-shot was not, so standing on Show before / Show after left the shortcut bar with nothing to say about the flip. It is now one commandScope, attached to the widget's own checkbox and projected onto its margin entry.

A ring specimen moved behind a closed tab. #721 added an example that sorts ahead of triage-board in the corpus, so the first .lf-grip landed in a tab panel that arrives hidden. Nothing inside it is focusable, so the sweep read a ring the grip paints perfectly well as undrawn. The sweep now asks the runtime's reveal() before focusing, deriving the surface from where the specimen sits instead of from a tab order that follows the examples directory.

The fourth failure, test_conversation_readiness_waits_for_the_keyed_thread_list, raised Page.evaluate: Resulting promise was garbage collected from the armed re-entrancy hack around scheduleUpdate. #732 replaced that arrangement with an explicit performUpdate hold, and the test passes on main as it stands. Nothing here touches it.

Verification

Each regression was reproduced on main and bisected to its origin with git bisect run, one node id per run under -n0: the shot regression to e790513 (#716), the ring regression to eb055b1 (#721). The adapter 404 is not a bisect — the route has never existed in server.py; it reproduced directly and the fix clears it.

On this branch:

  • tests/test_render_controls.py — all passed, ring sweep included.
  • tests/test_site.py — 1 failed of 136. test_the_interaction_gallery_drives_real_widgets expected Playing; it passes alone under -n0 and passed in the failing run above, so it is timing under parallel load rather than this diff.
  • tests/test_render_commands.py, tests/test_render_margin.py, tests/test_website_server.py — 193 passed, 4 failed. All four are bin/leaf subprocesses reporting no browser launched; each reproduces on unmodified main in this sandbox and each was green in the failing run above.
  • uv run pytest tests — 1119 passed, 4 failed: the umask, read-only /tmp, and bundleLayer cases this sandbox cannot run.
  • Changed-file pre-commit hooks pass. No TypeScript changed, so the website-worker gate is unaffected.

Every released document posts one content-free startup report to
`<page>/api/performance`, and the deployed site answers it at the edge, where
the observability record belongs. `worker/server.py` is the container adapter,
and a site served straight from it — the whole of `tests/test_site.py`, and
`scripts/example-previews.py` — has no edge in front, so that POST fell through
to the base handler's 404. Every page the adapter served loaded with a console
error, which turned the suite's clean-console reading red across 23 nodes.

Answer it at the adapter's own boundary, the way `end_headers` already adds the
`Leaf-Session` reading the Worker would have: 204, nothing recorded. The
record stays the deployed Worker's, and `worker/README.md` now says so, so
nobody looks for startup profiles from a locally hosted site.
A margin entry is generated in the margin, not inside the widget that
contributed it, so ancestry cannot find the widget's command rows for it. #716
replaced the adopted source control with that projection and deleted
contributor-owned margin command rows, giving `marginEntry` a `scope` option to
carry the declaration across instead. `lf-draft` was cut over; `lf-shot` was
not, so standing on its Show before / Show after entry left the shortcut bar
with nothing to say about the flip.

Declare the flip once as a `commandScope`, attach it to the native checkbox the
reader stands on inside the widget, and project the same capability onto the
margin entry — the idiom `runtime/keyboard/scopes.js` documents for exactly
this, and the one `lf-draft` already uses.
The ring sweep names `.lf-grip` in the corpus, which holds each example in a
tab and opens one panel. #721 added an example that sorts ahead of
`triage-board`, so the first grip moved into a panel that arrives hidden —
nothing inside it is focusable, and the sweep read a ring the control paints
perfectly well as undrawn.

Ask the runtime's own `reveal()` before focusing, so the surface a specimen
needs is derived from where that specimen sits rather than from the corpus's
tab order, which follows the examples directory and moves whenever one is
added. That is the same disclosure route the runtime uses before any
scroll-to-content, and it subsumes the closed-`details` handling the sweep
arranges by hand above.
@max-sixty
max-sixty merged commit 328189d into main Sep 15, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ci-34960165078 branch September 15, 2026 16:05
max-sixty pushed a commit that referenced this pull request Sep 15, 2026
…ived (#737)

`ci` went red on main at 328189d with one failure,
`test_a_failed_list_candidate_restores_its_complete_committed_reading`
([run
34992769528](https://github.com/max-sixty/leaf/actions/runs/34992769528)).
The test drained the browser-error list at the rollback checkpoint and
found
three entries where it named two:

```
+     'leaf: read failed: Thread list presentation retry failed',
```

One failed candidate is reported by three boundaries, and the third one
trails
the other two. The presentation publisher names the fault
(`semantic-state.js`), the reading that was applying it names it again
and
rethrows (`state-application.js`), and the feed that asked for that
reading
names it last (`state-feed.js:251`). Between the second word and the
third sits
`application.js`'s `receiveState` wrapper: its `.finally` awaits
`flushQueuedInvalidation()`, so the rejection reaches the feed only
after the
queued projection retry the failed application left behind has presented
again.
Instrumenting the page put that gap at about 90 ms, with the test's own
round-trips from the `conversationRetryHeld` wait to the drain taking
about the
same. The checkpoint was landing on either side of one boundary's
report, and
which side decided the run.

The report is not a state the page rests in, so the test now accounts
for it
once, at the end, where the retry has been released and the reading has
settled.
The inventory is the same three lines in the same order — nothing is
dropped,
and an unexpected fourth still fails the equality.
`reported_browser_errors`
waits for the named inventory before consuming it, so the last
boundary's word
cannot be read as absent while it is still on its way; anything past the
inventory still reaches the browser fixture's own end-of-test reading.
The wait
is a Playwright call rather than a sleep, because the sync driver only
hands
console messages to the test process while it is inside one — a
`time.sleep`
leaves `page.lf_errors` frozen, which is its own way to read a report as
complete before it is.

<details><summary>Verification</summary>

- `tests/test_render_application_boundary.py` — 8 passed. The repaired
case also
  passed five consecutive `-n0` runs.
- `uv run pytest tests` — 1119 passed, 4 failed: the umask case, the two
read-only `/tmp` cases, and the `bundleLayer` case this sandbox cannot
run.
Each is the same set #734 recorded, and each is unrelated to this diff.
- Changed-file pre-commit hooks pass. No TypeScript or runtime code
changed.

The next main run,
[35003473594](https://github.com/max-sixty/leaf/actions/runs/35003473594)
on b8ab9ef, was green: the gap is narrow enough that most runs fall on
the
early side of it. The arrangement, not the frequency, is what this
changes.

</details>

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