Repository navigation
Lane A driver: a watch keeps its last reshaper until a new stream opens, so the final subagents body reaches it (X-168 on the mini) - #882
Merged
Conversation
…ns, so its final body reaches it (X-168 on the mini) A watch whose stream broke asked for the next one after its backoff, and that attempt nulled the watch's reshaper before any snapshot came. When the session's process was then found gone (the bridge directory's notice or the registry's landing after the 500 ms backoff, as on a slow host), the body saying every agent ended with the session skipped the watch, which ended on its last body, the agents running. The window, told the watch ended with agents running, forgot them as no longer known to run, so the panel listed them under Earlier and never read "session ended" (lane-a.spec's X-168 and the bridge-goes case at :895). The reshaper is now replaced only when a stream's snapshot opens it; `open` says whether the current stream has, which decides the reset a broken stream announces and whether a body goes to the watch while the process runs. Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
… checker sees it set past the snapshot The reshaper race fix read `w.reshaper` after the snapshot branch, which tsc cannot narrow (TS18047). Each stream now keeps the reshaper its snapshot made in a local; the watch's field still keeps the last one across reopening attempts. Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
SSFSKIM
added a commit
that referenced
this pull request
Nov 27, 2026
Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 27, 2026
master-first; class 1a 46054547216 and desk-web 46054569546 green on tree 940f043 (= head). Mac at 0f3509a and 629f913; since then only the dashboard-scale tracker row and #882's lane A files. Owner approved the pictures 2026-11-27. dashboard-scale line 4 is master's (tracker row of 2026-11-27). Tracker merge keeps every master row. #720 stays open. Sminos-Session: master-landing-architect#37052769 (MAWS on macbook)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lane A's driver lost the final subagents body of a watched terminal session when the session's process was found gone after the watch's stream had already tried to reopen. As a result, lane-a.spec's X-168 case and the bridge-goes case fail on the Mac mini, on plain master as well as on branches.
The race
When a bridge closes, the watch's stream ends and its reopening attempt runs after a 500 ms backoff. That attempt cleared the watch's reshaper before any snapshot came. When the process-gone discovery (the bridge directory's notice, the state stream's reprobe, or the registry's holder going) landed after the attempt, which is likely on a slow host, the body saying every agent ended with the session went to no watch. The watch then ended with its last body still saying the agents ran, and the window forgot them as no longer known to run.
The fix in
src/services/lane-a/driver.ts: a watch keeps the reshaper of its last opened stream until a new stream's snapshot replaces it. A newopenflag says whether the current stream's snapshot came. It decides the two things the old code inferred from a missing reshaper or stream: whether a broken stream announces a reset, and whether a body goes to the watch while the process runs. Once the process is gone, every watch that ever opened hears the final body. This is what the code's own comment already said was intended ("its reshaper stays until the stream opens again"). The second commit only keeps each stream's reshaper in a local so that tsc narrows it.Validation Evidence
What the failing panel shows. Every failure has the same Agents panel, and no Playwright trace was kept. It shows "Status is known only while the session runs here" and "Earlier N", with no Done section. That sentence is drawn only when the window holds no lane A status other than unknown for the session. So the agents were forgotten, not shown late.
This was seen in all four branch failures examined (three
question-sheet-c3heads and its control run at 3863923) and in the master failures below.Unit test.
src/services/lane-a/driver.test.ts, "says every agent ended with the session to a watch whose stream is opening again when %s, before the watch ends". It covers two ends: the holder ending, and the bridge going with its process. In both, the watch's next stream has been asked for and is unanswered when the session ends.expected 'running/bridge' to be 'exited/session'.driver.test.tspasses 98/98.Before: plain master, e2e:lane-a with
--lane no-hosted(the group on the mini). Master's X-168 and bridge-goes cases sit at :810 and :888.Every run was otherwise green; the other 24 or 25 cases passed in each. Three earlier runs of each commit without
--lane no-hostedran on the hosted Mac only, and all passed there.After: this PR's head 24e9866.
--lane no-hosted): green, 26 of 26 passed.Supporting evidence, the same change before the tsc-only second commit:
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)