Repository navigation
Keep worker records holding unlanded branches past the crew cap - #1610
Conversation
… Automations: natural-language authoring (describe it in chat
… P2: Replay-fixture provider harness: recorded CLI output thr
Solenta-Message-Id: 306b13e4-79c9-4f4d-bc27-923754043258
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: d66a5ece6a
ℹ️ 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".
| store.updateThread(cand.threadId, { | ||
| worktreePath: null, | ||
| branch: null, | ||
| ...(thread.branch ? { retainedBranch: thread.branch } : {}), |
There was a problem hiding this comment.
Preserve earlier retained refs across repeated GC
When clearMissingWorktree has already saved an unlanded branch in retainedBranch, the next run rematerializes the worker on a new branch, and a later gcClean unconditionally replaces the saved name here with that new branch. If the earlier ref contains the unique work and the newer branch is already landed, holdsUnlandedBranch can then purge the worker record, recreating the lost branch-to-thread link this change is intended to prevent. Preserve or evaluate every retained ref rather than overwriting the prior one.
Useful? React with 👍 / 👎.
| : {}), | ||
| trigger: hasTrigger ? { type: "github", ...triggerRaw } : null, | ||
| tier: args && args.tier, | ||
| ...(args && args.memory != null ? { memory: args.memory } : {}), |
There was a problem hiding this comment.
Add memory to the registered tool schema
Although the handler now forwards args.memory, the automation_create input schema at lines 1711–1739 does not declare a memory property. MCP clients therefore are not told they can supply it, and schema parsing may strip or reject it before this handler runs, so chat-created automations cannot use the optional memory field documented by this commit. Add the field to the registered schema and tool description.
Useful? React with 👍 / 👎.
HtmlPage used plain React.lazy, which mount() never preloads, so on a cold CI runner the tool.html card suspended past three flushes and its late resolve tripped the next test's act() gate. lazyNamed puts it in the preload set like every other lazy view. automation-create-mcp and store round-trip expectations predate the Linear/Sentry trigger fields (#1588) and prLinks normalization. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…indows CI node --test applies --test-timeout to each file as well as each test. On windows-latest several renderer files now take 17-20s, so whichever crosses 20s fails as testTimeoutFailure (appWiring on main #1615, threadView here) while running in under 3s locally. 60s still catches a wedged file well inside the 25-minute job limit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # electron/test/fixtures/replay/claude-2.1.283-steer.ndjson # electron/test/replay-scenarios.test.js
What changed
The per-orchestrator worker cap (
MAX_WORKERS_PER_ORCHESTRATOR) archived any finished worker that had noworktreePath. But a nullworktreePathdoesn't mean the worker had nothing left to land. When worktree GC orclearMissingWorktreeremoves a worker's directory, the branch ref stays in the repo. They were also clearingbranchon the thread, so the cap could purge the only record linking back to those commits (#1404).worktrees-gc.js/worktrees-lifecycle.js: when clearingworktreePathandbranch, save the old branch name asretainedBranchso the record still points at the ref.runner-orch-notices.js: addholdsUnlandedBranch(t). The cap now skips a worker if itsbranchorretainedBranchstill has commits that haven't landed on its base, i.e.recordedBaseBranchor, failing that, the repo's default branch. A worker can still be purged if:MERGED,branchLandedreports it as landed.If the answer is unknown (missing project, remote project, project path gone, or a git error), the worker is treated as unlanded and kept.
The cap only drops the thread record. It never deletes the branch ref.
Tests
Two new cases in
orchestrator-threads.test.js. Each creates a real worktree for the oldest worker, letsgcCleanreclaim it, then addsMAX_WORKERS_PER_ORCHESTRATORnewer workers:retainedBranchis set, and the crew ends at cap + 1.Notes
holdsUnlandedBranchruns git synchronously for each worker over the cap. Workers kept this way get checked again every time the crew finishes. Aponytail:comment notes that results could be cached by ref sha if crews grow large.🤖 Generated with Claude Code