Repository navigation
fix(orchestration): expose unsupervised dispatch lanes - #15105
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: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change adds unsupervised handling for operator-started 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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: 2
🧹 Nitpick comments (1)
src/main/runtime/rpc/methods/orchestration-manual-dispatch-observation.test.ts (1)
231-241: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the fencing warning text.
contextOnlyAbandonWarningis new shared code in this change, andcontextOnlyStopWarningselects between two messages based onreleasedCurrentTask. No test in this change asserts either output. Add thewarningfield to this assertion so the branch selection is covered.♻️ Proposed assertion
- expect(result).toMatchObject({ state, processAction: 'none' }) + expect(result).toMatchObject({ + state, + processAction: 'none', + warning: expect.stringContaining('terminal process') + })
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 111707f5-a0e4-482e-ad97-2fe87f15024a
📒 Files selected for processing (14)
skill-guides/orchestration.mdsrc/cli/bundled-skill-guides.tssrc/cli/specs/orchestration-worker-specs.tssrc/main/runtime/orchestration/context-only-dispatch-release.tssrc/main/runtime/orchestration/db/worker-terminal/worker-terminal-archive.tssrc/main/runtime/orchestration/db/worker-terminal/worker-terminal-listing.tssrc/main/runtime/orchestration/db/worker-terminal/worker-terminal-release.tssrc/main/runtime/orchestration/worker-terminal-ownership.tssrc/main/runtime/rpc/methods/orchestration-manual-dispatch-observation.test.tssrc/main/runtime/rpc/methods/orchestration-worker-control.tssrc/main/runtime/rpc/methods/orchestration-worker-observation.tssrc/main/runtime/rpc/methods/orchestration-worker-release.tssrc/main/runtime/rpc/methods/orchestration-worker-stop-liveness-verdict.test.tssrc/main/runtime/rpc/methods/orchestration-worker-stop.ts
💤 Files with no reviewable changes (1)
- src/main/runtime/rpc/methods/orchestration-worker-release.ts
Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/runtime/orchestration/db/worker-terminal/worker-terminal-listing.ts (1)
92-111: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winPreserve dispatch identity and deterministic ordering. The join returns one row per dispatch and correctly defaults missing workers to
unsupervised, but the list omits the current dispatch pane/process identity and orders equal timestamps nondeterministically. Return the assignee identity and add a unique tie-breaker such asd.id ASC.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3ac4a0b7-5aa6-460f-997d-8980defadc15
📒 Files selected for processing (2)
src/main/runtime/orchestration/db/worker-terminal/worker-terminal-listing.tssrc/main/runtime/rpc/methods/orchestration-worker-stop-liveness-verdict.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/runtime/rpc/methods/orchestration-worker-stop-liveness-verdict.test.ts
Included review availability: Your plan includes up to 10 reviews per rolling hour; 7 remain after this review.
ELI5
orchestration dispatch --injectadopts an operator-started agent pane without taking supervision ownership. It records a durable Dispatch context but intentionally creates noworker_dispatchesrow. The landed context-only stop/abandon fix (#13376) protected the pane, but show/read/list/retain/release still treated the lane as missing.This change exposes a truthful degraded
unsupervisedread model at the dispatch-context boundary. It does not add supervision and never makesworker-stop,worker-abandon,worker-retain, orworker-releaseclose an operator-started pane.Addresses #13678
Linear: https://linear.app/stably/issue/STA-3848
Behavior
worker-showandworker-readuse the Dispatch's exact pane/process identity and reportunsupervisedworker-listincludes context-only lanes asunsupervised/retainedworker-retainandworker-releasereturnretained,no_owned_resource,processAction: nonestagedistinguishes capability-backedinjectedcontexts from neutralcontext_onlycontextsDeterministic evidence
Invariant: a Dispatch with an assignee handle, pane key, and process incarnation remains observable and manageable even without a worker row, while no lifecycle verb closes its operator-owned process.
The same regression test file (SHA-256
c4da2fef1d02adbc28510e8a21780ca5ef302274dbee5b3ddb2027f093759acd) produced:7ae6aedc02c7b236b16cIndependent signals are the persisted Dispatch/absent worker row and the RPC/terminal observation; stop/abandon additionally assert DB fencing and zero
closeTerminalcalls.Validation
worker-listcontract is now wider (explicit CLI path, run-indexed, no polling/provider fanout)Design choice
PR #13681's
--superviseproposal changes ownership and lifecycle semantics. That is unnecessary here and risks conflating supervised workers with operator-started panes. The narrower dispatch-context projection preserves that distinction and is compatible with mixed client/host versions: no new RPC parameter, required field, or stream opcode.Downside: unfiltered
worker-listremains O(history) and now includes context-only Dispatch history. Pagination should be designed separately rather than expanding this ownership fix.