Orchestration follow-up: finishing-command sandbox allowlist + scheduledFollowups upsert (ADE-131)#885
Conversation
…lowups upsert (ADE-131) FIX 1 — Finishing-command sandbox allowlist. buildOrchestrationSandboxConfig now accepts { allowFinishingCommands } and, when set, adds a narrow safe list (git push / gh pr / ade) so a finishing worker (manifest.finishing.mode "pr") can push, open the PR, and drive the ade CLI under blockByDefault. Scoped at the call site to orchestrator-worker sessions only (never validators); the finishing role isn't tagged separately at sandbox-build time. Note: real finishing workers run a native provider whose shell bypasses this TS sandbox (SKILL §4.5), so this only governs the ADE-SDK bash-tool path — fixed for consistency. FIX 2 — scheduledFollowups upsert. recordScheduledFollowup now upserts by id: re-recording an existing id merges onto the same lifecycle row (arming stamps scheduledWorkId + "scheduled" in place) instead of appending a duplicate, preserves createdAt, and never regresses a terminal (fired/cancelled) status. The tool exposes/echoes the follow-up id so callers can target the same row. References PR #878 bookkept comments 3635693954 / 3635693962. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Warning Review limit reached
Next review available in: 21 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Implements the two bookkept P2s from PR #878 (merged as 78556e6), tracked in Linear ADE-131.
FIX 1 — Finishing-command sandbox allowlist
The finishing worker (
manifest.finishing.mode === "pr") must rungit push,gh pr create/view, andadecommands (Linear sync, deeplink mint, asset registration,ade actions run chat.createScheduledWork). UnderblockByDefault: truethe orchestration sandbox's safe list contained none of these.buildOrchestrationSandboxConfignow accepts{ allowFinishingCommands }and, when set, appends a narrow safe list —git push,gh pr <sub>,ade <sub>only. Everything dangerous stays inblockedCommands(checked first).orchestrator-workersessions only — never validators. The finishing role isn't tagged separately at sandbox-build time (it's a plainworkerspawned viaspawnAgent), so the allowance is worker-wide by necessity, documented inline.Does the block actually bite? For real finishing workers, no. They're spawned as native-provider workers (Claude
Bash, Codex shell, …) whose shell bypasses this TS sandbox entirely (SKILL §4 step 5 / §4.5), so they could already push/gh/ade. This allowance only governs the ADE-SDKcreateBashTool/checkWorkerSandboxpath; fixed for consistency so a finishing worker driven through that path can also finish a run.FIX 2 — scheduledFollowups upsert
recordScheduledFollowupappended a new row every call, so a follow-up first recordedpendingthen armed toscheduledaccumulated duplicate rows while the original stayed permanentlypending.id: re-recording an existing id merges onto the same lifecycle row (arming stampsscheduledWorkId+"scheduled"in place via a predicate-addressedreplace), preservescreatedAt, and merges scheduling identity so a late update can't drop it.fired/cancelled) status back to an earlier state.idso callers can target the same row when arming/firing.Tests
orchestrationTools.test.ts: finishing commands blocked without the allowance;git push/gh pr create/gh pr view/ade …allowed with it; unrelatedghsubcommands, piped-shell, andrm -rf /stay blocked.orchestrationService.test.ts: record intent → re-record same id with scheduledWorkId → exactly one row, statusscheduled,createdAtpreserved; fired entry not regressed by a latependingupdate.npx vitest run src/main/services/orchestration src/main/services/ai/tools— 496 passing + my 3 new tests (one pre-existing parallel-temp-dir flake inspawnAgent > delivers persisted outbox entries, reproduces identically on clean main).tsc --noEmitclean (only pre-existing../ade-climodule-resolution noise).🤖 Generated with Claude Code
Greptile Summary
This PR updates orchestration finishing and scheduled follow-up handling. The main changes are:
git push,gh pr, andade.id.createdAt, scheduling identity, and terminal statuses during lifecycle updates.Confidence Score: 5/5
This PR is safe to merge with minimal risk.
The changes are narrowly scoped and keep blocked-command and protected-file sandbox checks ahead of the new allowlist. The scheduled follow-up change preserves existing lifecycle data and includes tests for the updated upsert behavior. No blocking correctness or security issues were identified in the changed paths.
No files require special attention.
What T-Rex did
Important Files Changed
Sequence Diagram
Reviews (1): Last reviewed commit: "fix(orchestration): finishing-command sa..." | Re-trigger Greptile