Repository navigation
Structured worker result in the lead's wake notice, rendered as a card (#1427) - #1606
Conversation
#1427) queueOrchNotice appends a capped [worker result] block: diffstat+summary vs leadSnapshotSha (symlink lines first), verify verdict, ruled-out hypotheses, and review-itinerary risks. The lead's transcript renders it as a card whose button calls git:integrateWorker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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: 8ff52074fe
ℹ️ 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".
| const res = gitTry( | ||
| thread.worktreePath, | ||
| ["diff", "--stat=100", "--stat-count=40", "--summary", `${base}..${tip}`], | ||
| { raw: true, timeout: 5000 }, |
There was a problem hiding this comment.
Wait for the worker checkpoint before diffing commits
For the common worker without a verify command, afterSuccessfulTurn starts maybeCreateCheckpoint without awaiting it and immediately calls finishSuccessfulTurn (electron/runner-verify-gate.js:127-133). This commit-to-commit diff therefore runs while the worker's just-finished changes are still uncommitted—indeed, the synchronous gitTry prevents the asynchronous checkpoint from completing first—so the permanent result card can report Changes ...: none or omit files such as a symlink replacement. Await the checkpoint before queuing the notice, or include the working tree in the summary.
Useful? React with 👍 / 👎.
Closes #1427.
What
Step 1: notice block (
electron/runner-orch-notices.js).queueOrchNoticenow appends a[worker result <id>]…[/worker result]block, capped at 2,000 chars. It is built only from data Solenta already stores:git diff --stat --summary <leadSnapshotSha>..<branch>.mode 120000lines go first so the cap can't hide a symlink swap (the core/dist case).The git call is synchronous with a 5s timeout and diffs commit to commit. Doing it async would let a notice land after the user stopped the lead (#32) and could reorder notices.
Step 2: card (
src/workerResult.ts,src/components/thread/messages.tsx). Notices with a block render as a card as soon as they arrive. The "Integrate into lead" button callsgit:integrateWorkerdirectly, the same path as the Agents panel button, so it is a human action that never goes through the lead's auto-turn gate. Other lines in the same notice stay visible above the card. The full text is in a collapsed "Full notice".Tests
electron/test/worker-result-block.test.jsuses a real git repo: thecreate mode 120000line, truncation at the cap, and itinerary risks.test/threadView.test.tsx: the card renders and its button calls integrateWorker. It also parses the runner's realworkerResultBlockoutput, which tests the seam between the two sides.tscandvite buildare clean. The electron suite has 2 failures (automation-create-mcp trigger fields, storeprLinks). Both also fail on clean main and are unrelated to this change.Note
The button integrates directly instead of opening the Integration tab. The issue's test wording ("its button calls integrateWorker") asked for that.
🤖 Generated with Claude Code