Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change documents that worker placement is selected once per Run and reused for later Merge Risk: ⚪ Minimal · up to Worker placement guidance now stays consistent for an entire Run, including explicit remote requirements, with regression coverage for the documented behavior. The change is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 26e8149b-cc7c-4805-903d-7b157de9e21a
📥 Commits
Reviewing files that changed from the base of the PR and between 1f483c3 and 54a3eb742284988743e0840b9052841c8e1dc364.
📒 Files selected for processing (3)
config/scripts/orchestration-skill-guidance.test.mjsskill-guides/orchestration.mdsrc/cli/bundled-skill-guides.ts
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.
ebb84dc to
a66111c
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
a66111c to
3013fc4
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
The placement reference already gates worktree creation, but says nothing about when the choice is made or what an omitted --worktree means. Bind placement to the Run and state the default: an omitted --worktree resolves to current, which --on rejects.
3013fc4 to
2515171
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Rewritten on Scope shrank. #16904 already carries the worktree-creation gate ("A fresh worker means a fresh agent terminal, not a new Git worktree… Create a worktree only when the user requested one or a concrete checkout or filesystem conflict makes sharing unsafe"), so this PR no longer restates it. What is left is the part that is still missing on Dropped: removing The default is confirmed in the runtime, not assumed: Head is |
|
Closing: |
ELI5
When a coordinator starts several workers for one goal, the guide never said when it picks where those workers run. So it decided again for every task, and one Run ended up with some lanes as child worktrees and others as top-level ones. This adds one rule — pick the placement once when you open the Run and reuse it — and states the one fact the guide was missing: leaving
--worktreeoff meanscurrent.What Changed
Documentation only, in
skill-guides/orchestration/references/placement-and-remote.md:worker-start, not re-derived per Task. The reason is spelled out: tasks decomposed from one objective read as dependent and independent at the same time, so a per-Task reading splits one Run across both lineages.--worktreeresolves tocurrent, the coordinator's own workspace.--ongets the matching caveat: the resolvedcurrentdefault is rejected there too, so a remote start must name placement explicitly.Two follow-on edits:
src/cli/bundled-skill-guides.tsis regenerated withpnpm generate:bundled-skill-guides(generated file, not hand-edited), andconfig/scripts/orchestration-skill-guidance.test.mjsgains oneitthat pins the new sentences. No existing assertion was changed or removed.Why
#14840 reported two separate gaps behind the mixed-lineage Run: the missing worktree-creation gate on the preferred path, and the missing rule about when placement is chosen.
The first gap is already closed on
main. The orchestration guide rewrite in #16904 moved the gate intoreferences/placement-and-remote.md, which now opens with "A fresh worker means a fresh agent terminal, not a new Git worktree… Create a worktree only when the user requested one or a concrete checkout or filesystem conflict makes sharing unsafe." Nothing here touches that.What is still absent after that rewrite is the timing rule and the default. Grepping the current guide and its references returns no statement that placement is a Run-level decision, and none that
--worktreeis optional. Both are load-bearing:new-child) and parallelizable (reads as independent →new-top-level). Both readings are true of the same task, so the outcome tracks task wording. Deciding once per Run removes the judgment call instead of asking the model to apply a criterion that cannot discriminate.--worktreeexplicitly, which teaches by example that a lineage decision is always required. The default is real:src/main/runtime/rpc/methods/orchestration-workers.ts:57readsconst requestedWorktree = params.worktree ?? 'current', andcurrentthen resolves to the coordinator terminal's own workspace. The remote path applies the same default atsrc/main/runtime/rpc/methods/orchestration-federated-worker-start.ts:45and immediately rejects it, which is why the--oncaveat is stated rather than left implicit.The original version of this PR also deleted
--worktree currentfrom the examples, per the third bullet of the issue's proposal. That part is dropped: after #16904 those spellings are a test contract (orchestration-skill-guidance.test.mjsasserts the reference contains--worktree current --agent codex), and stating the default in prose is enough without churning the examples.Scope notes: the change stays inside the conditional reference, so the always-loaded kernel is untouched and its 202-line budget is unaffected. The wording is placement-neutral for folder workspaces — it constrains when the choice is made, not what can be chosen — and adds nothing to any wire, RPC, or client-host exchange.
Linked Issue
Fixes #14840
Visual Proof
N/A — Markdown guide text plus its generated CLI bundle and a guidance test. No UI, no runtime behavior change.
Testing
Windows 11, Node 24.19.0, pnpm 12.0.0, on
upstream/mainat9d29e6878e.The new
itpasses. The one failing test —keeps heartbeat and worker_done recipes bound to the injected capability, which readsworker-contract.md— fails identically on a cleanupstream/maincheckout with no changes applied (28 passed / 1 failed there, 29 passed / 1 failed here). It is a local Windows artifact: that test extracts fenced blocks with a regex anchored on\n, and this checkout hascore.autocrlf=true, so the file's\r\nline endings make the match returnundefined. Nothing in this PR touches that file or that test.pnpm verify:skill-bundle-manifestalso fails here, and likewise fails on the unmodified upstream tree (verified withgit stash, exit 1 both times, same three stale artifacts:current-manifest.json,snapshot-registry.json,release-mapping.json). Pre-existing and unrelated, so the generated manifest was deliberately left alone.AI Disclosure
Written with Claude (Opus). Every claim about current
mainand about the CLI default was checked against the tree and the linked source lines before it was written.Review
--onsentence describes existing runtime behavior (orchestration-federated-worker-start.ts:45-51rejects a resolvedcurrent), and does not change the execution boundary or thelive/unverifiable/exitedvocabulary.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) — ran the gates listed under Testing; fullpnpm lintandpnpm buildleft to CIAuthor
X/Twitter: @EnricoPin