Repository navigation
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. What this changesAdds the child exit code to help-render failure messages when neither stderr nor a termination signal is available. Example: A bundled help renderer exits with code 23 and produces no stderr or signal.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR provides a useful, focused diagnostic fix that current main still lacks; the new entry-point capture resolves the previous proof request, and no actionable defects remain. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe build-time metadata generator runs help-renderer subprocesses, collects their output, and publishes startup metadata only after successful rendering. flowchart TD
A[Build command] --> B[Startup metadata generator]
B --> C[Help renderer subprocess]
C --> D[Shared subprocess owner]
D --> E[Failure diagnostic]
D --> F[Successful metadata publication]
Technical reviewBest possible solution: Land the existing fallback-detail change while preserving stderr, signal, and earlier-failure precedence. Do we have a high-confidence way to reproduce the issue? Current-main source demonstrably drops a silent child's exit code, and the contributor supplies a controlled parent-versus-head entry-point capture; this review executed no target code. Is this the best way to solve the issue? The patch is the smallest complete repair: use the exit code in both existing diagnostic fallback sites, retain the current subprocess owner, and add one regression for the lost information. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6c672d42f2de. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +18, Other +7. Total +25 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 29, 2026, 10:25 AM ET / 14:25 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Related: #160064
What Problem This Solves
CLI startup metadata failures omit the child exit code when a help renderer exits unsuccessfully without stderr or a signal.
User Impact
Failed build or update preflights now report that exit code, giving users a concrete diagnostic instead of only a generic render failure. This diagnostic change does not fix the original Windows update failure reported in #160064.
Why This Change Was Made
Use the child exit code as the existing error-detail fallback. Stderr still takes precedence over the signal, and the signal over the exit code; timeout, cancellation, and earlier-error precedence remain unchanged.
Evidence
node scripts/run-vitest.mjs test/scripts/write-cli-startup-metadata.test.ts --maxWorkers=1passed 15 tests; 6 POSIX/Linux process-lifecycle tests were skipped on Windows. Test-file time: 720 ms; wrapper wall time: 13.67 s. Hosted CI timing is not yet available.process.exit(23)) failed on the base because the diagnostic omitted 23, then passed with this fix. It also verifies that failed metadata is not published.git diff --checkpassed.Shipped entrypoint capture on Windows x64, Node 24.22.1: disposable checkouts of unchanged upstream parent
74f111a74dbdand PR headf4e74e31eb85both used the same ignored, injecteddist/root-help-proof.jscontainingexport function outputRootHelp() { process.exit(23); }. The generator and all tracked files were unchanged; no in-process metadata API or mocked spawn was used.Independent child controls exited 23 with empty stdout/stderr and no signal in both checkouts. Both generators exited 1, retained
ECLI_STARTUP_METADATA_RENDER/nonzero-exit, and published nodist/cli-startup-metadata.json. This controlled failure proves the entrypoint diagnostic; no full build or original Windows update failure was reproduced.