Repository navigation
Local snapshots after an upgrade's mawsd restart: unknown, never empty; restored tabs kept and the reads asked again - #406
Merged
Merged
Conversation
…d the restart's window answers host_unavailable is unknown, never empty, and is asked again until answered when main says the local host was heard (ipc/until-answered.ts, the mechanism onLaunchMode now rides); the shell's local snapshot keeps the local machine unloaded until its record side is in and the retention's intents are known, so hydration keeps its restored tabs and saves none trimmed, and they settle when it loads; the intent list no longer settles ready-and-empty (TabRetention.ready says whether it held them, known resolves once it does); the interrupted deletions and the local lane A list are asked again the same way; cross-build's (update, mawsd restart) also checks a restored session tab is kept and written back whole Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…: a restored tab of a started session has no record while the local snapshot is unknown, and with the launch mode and the intents answered its pane mounted NewSessionEmptyState, which closed the tab and so saved the layout trimmed; gone now also needs the session's machine loaded (which for the local machine is its record side in and the intents known), which also keeps another machine's record-backed tab while that machine connects Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Codex Review SummaryThis 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. |
SSFSKIM
added a commit
that referenced
this pull request
Oct 31, 2026
…st reads retried after an mawsd restart), #408 Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook) # Conflicts: # src/renderer/src/ipc/events.test.ts
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.
Follow-up to #403. The upgrade's mawsd restart answers every startup read the page makes in that window with
host_unavailable, and several one-shot local reads treated that failure as "nothing there". The worst case: the shell's local snapshot failed, so at hydrationknownTabanswered false for every local session,repairMaindropped their restored tabs, and the trimmed layout was saved. Every update hits this window (the owner's mawsd.log at 12:32:58–59.9Z).One mechanism.
askUntilAnswered(src/renderer/src/ipc/until-answered.ts) generalises #403's asker. A failed read is asked again when main reports the local machine'shost.status, and immediately if one arrived while the read was still out. A rejected call counts as unanswered, and stopping it ends the asking.onLaunchModenow uses it.The local snapshot (src/renderer/src/ipc/events.ts):
session.list,session.projects.list,session.digestsandattention.listare retried until answered. Thehost.statussubscription is made before any read, which keeps C1's rule that events are subscribed before snapshots.knownTabkeeps its tabs the way it already keeps an unloaded remote machine's, so hydration drops nothing and saves nothing trimmed.settleMachine(local)drops whatever is really gone.Intents (src/renderer/src/sessions/store.ts, keymap/actions-runtime.ts):
session.intent.listno longer applies an empty list.TabRetention.readynow resolves to whether the first read held the intents, andknownresolves once they are held.Also retried:
session.deletions.list, and the locallaneA.list(its events are buffered again while the retry is out).Review fix. A restored tab of a started session has no record while the local snapshot is unknown. With the launch mode and intents already answered, its pane mounted
NewSessionEmptyState, which closed the tab as gone and so saved a trimmed layout. That self-close now also requires the session's machine to be loaded. The same gate protects another machine's record-backed tab while that machine connects.Tests.
host.statusfrom another machine is ignored, the localhost.statustriggers a new snapshot, and the tabs settle once it loads. This fails on master: both tabs are dropped. A second case shows that intents still unknown keep local tabs untilknownresolves.(update, mawsd restart)scene also seeds a session tab in layout.json and checks that hydration writes it back whole after the restart.Left as is.
attention.pendingNavigateismain-owned, so mawsd never serves it and the restart window doesn't affect it.host.statusis the local machine's signal.Gate: run 41211435139 (
--gates all --lane hosted --class1a pool --runner macos --peer b2c3c785f) succeeded with 0 flaky lines.e2e:cross-buildhad 5 passed and 1 skipped (the pre-O3 scene, which needs an O2-era peer); the scene logged "New chat enabled, the restored tab … kept".e2e:discoverpassed on its first attempt. The run tested d0d9109, whose tree (a257723592c0) is identical to this head's after the rebase onto 2aa6390.Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)