Repository navigation
refactor(node-host): share the command execution owner - #150434
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 17, 2026, 4:04 AM ET / 08:04 UTC (Revision 3). ClawSweeper reviewWhat this changesMoves node-host command execution into a module shared by the dispatcher and tests, removing the test-only global bridge while preserving command results and diagnostics. Merge readiness✅ Ready for maintainer review This maintainer-requested cleanup remains useful because current main still publishes the test-only bridge. The reviewed extraction preserves execution behavior, and no actionable introduced defect was found. Priority: P3 Review scores
Verification
How this fits togetherThe node host receives command requests from the Gateway, checks local execution policy, and runs approved commands through the shared process runner. It returns bounded output, exit status, and execution errors. flowchart TD
A[Gateway command request] --> B[Node dispatcher]
B --> C[Local execution policy]
C --> D[Shared node command owner]
E[Command contract tests] --> D
D --> F[Process runner]
F --> G[Bounded output and status]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -6, Tests -26, Other 0. Total -32 across 7 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one production-used node command adapter with private diagnostics and retain behavioral tests at its execution boundary. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a source-verified cleanup of test-only indirection, rather than a reported runtime defect. Is this the best way to solve the issue? Yes. Sharing the production adapter removes the global bridge while retaining the existing process runner and execution-policy boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a09a0461bc08. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
05aa1b8 to
c9173df
Compare
Move runCommand into the production-used execution module and remove the VITEST-only Symbol publication, test bridge, and publication registry entry. Keep cwd diagnostics private and exercise them through command results. Preserve launch-policy callbacks, cancellation, output bounds, and stdin closure. Retain the original lifecycle timeout and diagnostic evidence; this extraction does not claim a timeout or performance fix.
c9173df to
6ff26a7
Compare
|
Merged via squash.
|
Move runCommand into the production-used execution module and remove the VITEST-only Symbol publication, test bridge, and publication registry entry. Keep cwd diagnostics private and exercise them through command results. Preserve launch-policy callbacks, cancellation, output bounds, and stdin closure. Retain the original lifecycle timeout and diagnostic evidence; this extraction does not claim a timeout or performance fix.
What Problem This Solves
Node-host command tests depend on a production global published only for tests and a separate bridge that reads it.
User Impact
No intended user-visible behavior changes. Existing command execution, launch-policy callbacks, cancellation, output bounds, stdin closure, and working-directory diagnostics are preserved.
Why This Change Was Made
Move command execution into a focused module used by the real invoke dispatcher and its tests. Keep the cwd diagnostic helper private and test its errors through command results. Remove the test-only Symbol publication, bridge, and registry entry, and shrink only the owning assertion-baseline row.
Production: net -6 lines. Tests and test support: net -26 lines.
The same seven-path cleanup is now composed on main b54d624 and saved as signed commit 6ff26a7. The signed mechanical rebase preserves its stable patch identity and all owned runtime/test afterimages; the assertion baseline retains the new main rows and shrinks only invoke.ts from 7 to 4.
Evidence
Historical evidence remains separate. On the older 226-based checkout, the pristine baseline had 148 passes and one shared-runner timeout; the same-order diagnostic passed 149 with a separate recorder failure and verified restoration. The fresh green pair does not establish a general timeout or performance fix.
The earlier hosted CI run 35168910744 failed on 05aa1b8 in four test jobs: skill-read byte accounting and missing-module imports in copied-repository fixtures, followed by the aggregate gate. Those failures and their diagnostic limits remain recorded. This refresh does not claim they are cured. Production changes remain confined to the command-execution owner extraction.
The subsequent c917 CI run35185062938 passed all 71 selected compact Node test jobs, but failed its test compiler on an unrelated Slack RawData overload error introduced on main. Source attribution identified the canonical fix in #149291 and its follow-up refinement #150678; this refresh includes both. No duplicate Slack repair is part of this PR. The retained 149-case proof applies to the unchanged cleanup; it is not presented as a new b54 test run. Fresh exact-head hosted CI remains required before landing.
Closes #150430.