Skip to content

New chat after an upgrade's mawsd restart: launch mode asked again when the machine is heard - #403

Merged
SSFSKIM merged 1 commit into
masterfrom
p5-newchat-retry
Oct 31, 2026
Merged

SSFSKIM merged 1 commit into
masterfrom
p5-newchat-retry

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 31, 2026

Copy link
Copy Markdown
Owner

After an upgrade, New chat stayed disabled ("Not available here") until the app was reopened.

Cause. connectSessions (src/renderer/src/sessions/connect.ts) registered the session creator, the close guard, the replace verdict, the session actions, the setup dock and the rest only inside a single session.launchMode invoke, and gave up if that one call failed. session.launchMode is machine-owned, so on the daemon shape mawsd's spine serves it. At an upgrade the new app first connects to the old mawsd, then asks it to restart onto its own bundle (src/main/hosts/daemon.ts, the build check). A page call that lands in that window is answered host_unavailable, and New chat stays disabled for the rest of the app's life. connectScenarioSessionCreator had the same single-call shape.

Fix. A new helper, onLaunchMode (src/renderer/src/app/launch-mode.ts), is now used by both callers:

  • When an ask fails, it asks again the next time main reports the local machine's host through host.status. Main sends that at each ready of the machine host (watchDaemon's daemon.status read) and at each change in the spine mirror's availability. The git store's retryUnanswered already relies on the same signal.
  • If a host.status arrives while an ask is still out, a failure of that ask is retried immediately, because the failure may predate the host's return.
  • take runs once. After success it stops listening, so nothing is asked or registered twice. Disposing stops all asking.

Tests.

  • Renderer: connectSessions and the scenario creator each register after a failed ask followed by a successful one. Further tests cover a host.status from another machine being ignored, the in-flight case, disposal, and no second ask once answered.
  • e2e/cross-build.spec.ts gains (update, mawsd restart). The older peer's app on the daemon shape leaves its private mawsd running. This build's app then meets that mawsd, has it restart onto this build, and the sidebar's New chat must be enabled once the new mawsd serves. The existing (update, daemon) scene could not host this check: there the attacher's own mawsd serves from the start, so no restart happens.

Left as is (a related class, not this bug). Some startup snapshot reads are also single machine-owned calls. They do not gate a registration, but their failure in the same window has effects:

  • events.ts's local snapshot (session.list, session.projects.list, session.digests, attention.list) treats the local link as "up for its life". If it fails, knownTab answers false for local sessions at hydration, so repairMain drops their restored tabs.
  • session.intent.list (sessions/store.ts) falls back to an empty list on failure and still resolves the tab retention's ready.
  • session.deletions.list, laneA.list (local) and attention.pendingNavigate start empty.

Fixing these is a hydration-semantics change, which is for the architect to decide.

Gate: run 41204608538, --gates all --lane hosted --class1a pool --runner macos --peer b2c3c785f, success. e2e:cross-build ran 5 passed and 1 skipped (pre-O3, which needs an O2-era peer); the new scene passed. No flaky lines.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

…ode is asked again when main says the local machine's host was heard (host.status), at once when one came while the ask was out, so an ask answered host_unavailable in the restart's window no longer leaves C10's creator, close guard, replace verdict, session actions and setup dock unregistered for the app's life; the scenario creator shares the asker (app/launch-mode.ts); cross-build gains (update, mawsd restart), where this build's app restarts the older peer's private mawsd and the sidebar's New chat must be enabled once its own serves

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T14:08:20.271850Z 0f7ad0f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 2aa6390 into master Oct 31, 2026
SSFSKIM added a commit that referenced this pull request Oct 31, 2026
… item 4 read by hand across the paired Macs (board #402 closed) and New chat after an upgrade (PR #403, master 2aa6390), its cause read from mawsd's log; the wave 2 ledger gains O16 M2/M5's and O7 M2's rule 5 additions; the tracker gains O4 M2's window reporter re-read

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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.

1 participant