Repository navigation
Description
publish-site on main at 39e2664a — run 34820889246, "Render media viewer through Lit (#702)". The deploy itself succeeded and leaf.page is live on release 1718cd21; the release pass verified it in Chrome at 08:10:07. The job then failed in Verify the exact public release in Chrome on the hosted-agent pass, ten and a half minutes later:
RuntimeError: https://leaf.page/examples/triage-board/ agent published but did not reply; the page read working
What the turn did
Hosted agent profile (observed from the first request):
session reference 672857141335
event 8ae0f5440843b3ef63150d61b21c2bab
request acknowledged 110 ms
activity closed at 235 ms
activity working: Starting at 2.4 s
published at 8.7 s
The agent ran and did the work. Publishing revision 2 carrying Deployment 1718cd21 verified at 8.7 s takes $LEAF commands executing inside the container, and 8.7 s is the healthy range — the last three green deploys published at 9.3 s, 17.6 s and 11.6 s. What never arrived was anything on the App Server notification stream after turn/started. working: Starting is the literal detail _follow_turn sets before it reads its first notification; the three most recent green profiles (34818439820, 34814515951, 34793155710) all sample handling and then working: Running … with real command text, and none of them ever sampled Starting. Here it was still the reading 590 s later, while the gate polled /api/state every two seconds and the container answered every one of those reads. Container alive, agent's writes landed, follower projecting nothing.
The durable gap
_follow_turn converts a stream that fails into a terminal outcome: its except (OSError, RuntimeError, ValueError, WebSocketException) synthesizes a failed turn, clears the stream activity, commits the reply stream and closes the claim. Two exits skip it:
- A stream that goes silent instead of closing.
socket.recv(timeout=1)raisesTimeoutError, which line 574 turns intocontinue. Nothing bounds how long that repeats, so a stream that stops delivering without erroring spins for the life of the container. Reconnection is reachable only from a socket error, so the recovery_resume_turn_streamalready implements is never tried. - Any exception outside that tuple — either
assert delivery_id is not None, aKeyError, anAttributeError— propagates out through_run_follow_turn, whosefinallyonly discards the thread fromfollowing_threads.
Both leave precisely the state the gate read for its full TURN_LIMIT: claim open, stream activity frozen at Starting, no reply and no failure receipt. _run_follow_turn is the boundary that owns a followed turn's outcome, and it guarantees none.
The consequence is wider than the gate. Any leaf.page reader whose turn lands here sees a page that reads working indefinitely, with neither an answer nor a failure, against a page contract that says exactly one terminal receipt names each accepted request.
Why no fix is proposed
The two mechanisms produce identical page state, and the reading that separates them lives in Cloudflare's Workers logs: whether the container printed a traceback on stderr, and whether turn_stream_completed was ever logged for session reference 672857141335. This account has no Cloudflare credentials, so it cannot fetch them.
The remedies differ. The silent-stream case wants a liveness bound that routes silence into the resume path that already exists — _resume_turn_stream recovers the authoritative turn and the error path reconciles items, reply text and terminal status. The escaping-exception case wants _run_follow_turn to close the turn with a failure receipt whenever _follow_turn returns no terminal reading. The first needs a bound chosen against hosted Codex's real notification cadence, and both change the live deployment's turn lifecycle for every reader. Choosing them from a CI run against a fault this session cannot reproduce is the wrong place to decide: the sandbox cannot launch Chrome (FATAL:process_singleton_posix.cc: socket() failed: Operation not permitted), so there is no way to drive a turn here and confirm either repair works.
Not this commit, and not the first occurrence
39e2664a changes only skills/leaf/assets/runtime/media.js and tests/test_render_conversations.py. Neither can reach the Worker, the container image or reply admission, and https://leaf.page/api/state currently reports producer.commit 39e2664aa474, so the deploy this run performed is live and serving.
#694 recorded the same shape eight hours earlier and closed it as transient on the grounds that it was a first occurrence, noting that a recurrence is what would make the standing waitUntil recovery TODO urgent. This is that recurrence, and it carries evidence #694 did not have. There the turn produced nothing at all, which is consistent with the Worker's dispatch being cut off before the container ran. Here the container demonstrably ran the agent all the way to a publication, which places this stall after dispatch, inside the container's own turn following — a different repair from the one that TODO names.
Activity
leaf-agent commentedon Sep 15, 2026
Run 34793155710
No failure details could be extracted.
Run 34814515951
No failure details could be extracted.
Run 34818439820
No failure details could be extracted.
Run 34820889246
log tail