Repository navigation
refactor(process): remove unused spawn fallback controls - #139326
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 4:06 PM ET / 20:06 UTC. ClawSweeper reviewWhat this changesSimplifies the internal process-launch helper by removing unused retry controls and labels, updating its caller, and trimming redundant test fixtures. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, maintainer-requested cleanup absent from the inspected main and release sources. No actionable correctness or security findings were identified. Priority: P3 Review scores
Verification
How this fits togetherThe process-launch helper starts subprocesses for the supervisor and Windows Scheduled Task fallback. It returns the child process and whether fallback options were used, which the supervisor uses to choose safe termination behavior. flowchart TD
A[Supervisor command] --> C[Process launch helper]
B[Windows task fallback] --> C
C --> D[Check caller authority]
D --> E[Spawn process]
E -->|EBADF with fallback available| D
E -->|Started| F[Child and fallback result]
F --> G[Supervision and safe termination]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -28, Tests -54. Total -82 across 5 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one small internal spawn helper with fixed EBADF retry behavior, direct fallback options, and explicit detachment reporting. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes unused internal surface rather than reporting a runtime defect; caller inspection supports that premise. Is this the best way to solve the issue? Yes: simplifying the existing helper and migrating its sole fallback-supplying caller is narrower than retaining unused compatibility controls or introducing another abstraction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against df804fc6ff43. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
f07a51f to
b879c0e
Compare
|
Merged via squash.
|
Related: #135868
What Problem This Solves
Maintainer-requested cleanup companion to stage 3 of the #135868 split (decision brief concern C: process/agent authority and cleanup certification). The spawn fallback helper carries unused policy overrides, callbacks, and labels, while its tests still build process fixtures for a readiness implementation already removed on main.
Why This Change Was Made
Remove the private
retryCodes,onFallback, andfallbackLabelsurfaces and pass fallback spawn options directly. All three production calls were inspected: the child adapter uses only the child andusedFallback, and both Scheduled Task calls use only the child. None supplies a retry override or callback. There is no plugin SDK export of this helper.Keep
usedFallbackbecause it prevents process-group signaling after a non-detached retry. Preserve the authority assertion outside retry handling, Node spawn readiness, error normalization, and fallback order. Remove the duplicate weaker revocation test and obsolete stream/PID/kill fixture setup; retain the EBADF-coded authority regression and real ENOENT coverage. No automatic-recovery or cleanup-certification changes are imported from #135868.User Impact
No intended user-visible behavior change. The private process helper and its tests have less unused surface for subsequent ownership changes to maintain.
Evidence
Production: +7/-35, net -28 lines. Tests/support: +10/-64, net -54. Tooling/docs: unchanged.
node scripts/run-vitest.mjs src/process src/daemon/schtasks.startup-fallback.test.ts: 639 passed, 62 existing platform-specific skips across three shards. Native Windows integration is not claimed from this macOS run.pnpm check:import-cycles: passed, zero runtime cycles.node scripts/check-changed.mjs: passed (exit 0), including all selected types, lint, dead-export scans, and repository guards.The branch was rebased onto current main after local validation; none of the five owned files changed in that main drift. The patch remained identical. Exact-head hosted CI passed on
b879c0e76f7c2ec23bc4b7cd863336fc299c1076: run 33988858000. The native review/prepare/merge flow landed this as befc0c24a243; remote merge state, main ancestry, and all five landed file contents were independently verified.ClawSweeper review found no correctness or security findings and no pre-merge actions. No rank-up changes were requested. The review independently confirmed the three production callers and the retained authority and detachment coverage.