Repository navigation
Make crew notices durable across restarts, held for an explicit Resume - #1613
Conversation
… Automations: natural-language authoring (describe it in chat
… P2: Replay-fixture provider harness: recorded CLI output thr
Solenta-Message-Id: 4235bfb5-8010-4b38-b931-cab5ee82d4be
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1933f5a0c1
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| dropQueue(threadId); | ||
| store.save(); |
There was a problem hiding this comment.
Retain notices until the resumed turn is durable
If the user clicks Resume crew immediately after launch, startRun can remain blocked awaiting the login-shell PATH before it creates an active run or appends the notice prompt. This code has already removed the only persisted queue, so a clean quit during that wait calls stopAll() with no active entry and saveNow() permanently persists the deletion; the next launch has neither held notices nor a retryable prompt. Keep the queue until startRun has durably accepted/stored the notice, or restore it when startup is interrupted.
Useful? React with 👍 / 👎.
Persist orchNotices/autoTurns in the store, dedupe wake-ups per worker run, mark crash-interrupted runs interruptedBy:"restart", queue a held notice to each interrupted worker's lead, and add a "Resume crew (N updates)" strip backed by runs:resumeCrew. Also unblock CI: refresh two stale test expectations already failing on main (prLinks, GitHub trigger fields) and let the html fence test wait for its lazy chunk. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-notices-and-honest-resta-342476 # Conflicts: # electron/test/automation-create-mcp.test.js
The tool.html card test waited three flushes for a lazy import() that can take longer on a loaded CI runner, failing it and leaking an unwrapped suspense resolve into the next test. Same fix main applied to htmlFence.test.tsx. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes the crew-notice part of #1426. Before this change, pending lead wake-ups and the auto-turn counter lived only in memory. A crash or quit dropped work the lead was owed, and a restart reset the
CREW_AUTO_TURN_CAPcounter. A lead also never learned that a worker had been cut off mid-run.What changed
Durable notice queue (
electron/runner-orch-notices.js,electron/store.js)orchNoticesandautoTurnsmaps are now stored asorchNoticesByThreadandautoTurnsByThread.enqueueNoticecallsstore.saveNow(), so a queued notice reaches disk right away instead of waiting for the save debounce.noticeKeydedupe key, so a replayed finish does not wake the lead twice.Honest restart: held, not auto-delivered
holdRestoredNoticessetsheldNotices(a count) on any lead whose queue survived the restart.flushOrchNoticesskips a lead with that flag set.interruptedBy: "restart". This happens both inrecoverInterruptedRunsand on the runner's quit path.noticeInterruptedWorkerssends each affected lead a held notice. The notice gives the worker's worktree, branch, last commit, and whether the tree is clean or how many uncommitted changes it has. It then asks the lead to re-dispatch the worker or review what it left. It is keyed byinterruptedAt, so a second boot does not add it again.runner-auto-resume.js) passesresume: true, which clears the hold. The user's auto-resume setting counts as consent to deliver.Resume crew action
runs:resumeCrewIPC, added to preload, the channel list, the web scopes, the shared types and the dev mock. It clearsheldNoticesand flushes the queue under the normal budget and auto-turn gates.ThreadViewshows a status strip: "The app restarted. Your crew's updates are on hold." It has a Resume crew (N updates) button.Tests
electron/test/crew-restart.test.jscovers the restart behaviour.store.test.jsandcomposerSlashActions.test.tsxcover the new store fields and the Resume crew strip.fakeCoderhas the new API method.🤖 Generated with Claude Code