Repository navigation
fix(orchestration): release completed worker terminals by default - #16217
sanshengai wants to merge 1 commit into
Conversation
|
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 (9)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe runtime now detects settled worker terminals that remain owned and schedules release after a 30-second grace period. It rebuilds timers during recovery, suppresses duplicate timers, preserves explicit user retention, and cancels release when a terminal is reused. Lifecycle reconciliation and federation acknowledgments trigger scheduling. Database failures are logged without propagation. Documentation and tests cover the new behavior. Merge Risk: ⚪ Minimal · up to The change enables delayed cleanup of completed worker terminals while preserving reuse and ownership safeguards; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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 |
|
Closing as stale. main has moved on substantially since this branch was opened on Aug 24, and I am no longer following it. Happy to reopen a rebased, single-change PR if maintainers still want the fix. |
Summary
worker_doneWhy
Completed orchestration workers currently remain live until every coordinator explicitly calls
worker-release. In multi-agent runs that omission accumulates idle agent processes, MCP subprocesses, and memory. The runtime already has a conservative exact-identity release pipeline; this change makes settled owned workers enter it by default after a short reuse window.Fixes #13047
Related performance umbrella: #16211
Safety
Validation
pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/rpc/methods/orchestration-worker-release.test.ts src/main/runtime/rpc/methods/orchestration-worker-release-recovery.test.ts src/main/runtime/rpc/methods/orchestration-send.test.ts src/main/runtime/rpc/methods/orchestration-federation-lifecycle-settlement.test.ts— 113 passedpnpm exec oxlint ...changed TypeScript files...pnpm run typecheck:nodepnpm run verify:bundled-skill-guidespnpm run verify:skill-bundle-manifestpnpm run check:max-lines-ratchetgit diff --checkpnpm testitself cannot load the optionalwindows-native-registrynative module under the local Node 24.19.0 environment, so the same repository Vitest config was invoked directly for the focused suites.AI assistance
This contribution was developed with AI assistance and manually reviewed against the terminal-ownership, federation, restart-recovery, and exact-process safety contracts.