fix(advisor): keep sandbox entrypoint process alive - #11605
Conversation
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe OpenShell termination wait now keeps the Node.js process alive with an interval. A subprocess integration test verifies that the process remains active during the timeout and exits cleanly. ChangesOpenShell termination handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The keep-alive behavior and subprocess regression coverage are complete, with no merge-blocking concerns identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit 566e6be in the TypeScript / code-coverage/cliThe overall line coverage in commit 566e6be in the Show a line coverage summary of the most impacted files.
Updated |
|
CI classification for exact head 566e6be:
Neither test nor its owning production path is changed by this PR. The port signature also appears on #11596, and the same shards passed in concurrent #11592 CI, so these are shared intermittent failures rather than regressions from this two-file Advisor change. I am not adding unrelated fixes to this PR or issuing an undocumented retry. |
rsliter
left a comment
There was a problem hiding this comment.
Reviewed exact commit 566e6be. The fix correctly keeps Node PID 1 alive with one owned timer until SIGTERM or SIGINT, clears that handle during shutdown, and preserves the existing listener cleanup. The real subprocess regression proves the prior unresolved-promise behavior no longer exits early. Focused validation passes 47/47 and all 19 repository checks pass locally; exact-head required CI passes after the classified shared-port flake; CodeRabbit found no actionable issue; DCO and commit verification pass. Approval applies to the implementation. Merge remains separately gated on the Advisor bootstrap decision.
Outcome
The Advisor sandbox initializer keeps its real Node process alive until OpenShell sends
SIGTERMorSIGINT. The supervisor relay no longer closes merely because no active event-loop handle remains after initialization.Reason
Post-merge Advisor run 34658298309 used the #11599 code from current
main, but all nine specialists still stopped before review withexec relay closed before the command reported an exit status. An unresolved promise plus signal listeners does not keep a Node process alive when no active handles remain, so the initializer still exited immediately.Related issues
Part of #10791
Changes
SIGTERM.Verification
npx vitest run test/automation/pull-requests/pr-review-advisor-openshell.test.ts --testTimeout=60000— 47 tests passed after formatting.NODE_OPTIONS=--max-old-space-size=8192pre-push TypeScript checks — passed after building the plugin artifact required by the local checkout.566e6be05dc4e17f11d92bae035878b1e48886f0is Verified.Review notes
This fixes the entrypoint-lifetime defect exposed after #11599 merged. PR #11596 separately owns the pinned OpenShell 0.0.116
sandbox execcommand compatibility change; the two root causes remain separate.Signed-off-by: Apurv Kumaria akumaria@nvidia.com
Summary by CodeRabbit
Bug Fixes
Tests