Repository navigation
fix(scripts): bound check-workflows subprocesses - #110562
sunlit-deng wants to merge 1 commit into
Conversation
|
Codex review: blocked before merge. Reviewed September 20, 2026, 9:35 PM ET / September 21, 2026, 01:35 UTC (Revision 32). ClawSweeper reviewWhat this changesBounds workflow-check subprocesses with separate scan and bootstrap deadlines, shared process cleanup, actionable diagnostics, and regression coverage. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain The PR remains useful because main still lacks subprocess deadlines. The corrected timeout proof is sufficient, and the previous repairs are substantially addressed, but discovery still mishandles SIGHUP cancellation. Priority: P2 Review scores
Verification
How this fits togetherThe workflow checker selects installed linters or bootstrap fallbacks, then checks repository workflows and runs local guards. Its subprocess results determine whether the developer command succeeds or reports a failure. flowchart TD
A[Workflow files] --> B[Tool discovery]
B --> C[Installed tool or bootstrap fallback]
C --> D[Managed subprocess runner]
E[Deadline or cancellation] --> D
D --> F[Process cleanup and exit status]
F --> G[Next check or failure diagnostic]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +252, Other +146. Total +398 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep subprocess lifecycle ownership in the shared runner and preserve every forwarded cancellation outcome through discovery while retaining ordinary missing-tool fallbacks. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the remaining trigger: send SIGHUP while actionlint discovery is running; the runner returns 129 and discovery proceeds to fallback. This review did not execute contributor code. Is this the best way to solve the issue? Yes, using the existing managed runner is the appropriate repair, but the caller must preserve its complete cancellation contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4c63f0046ad5. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (31 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
d9fbe24 to
2acf615
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
2acf615 to
965f7ee
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
dc7aabb to
cbaf27f
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
f183970 to
e4e4712
Compare
e4e4712 to
cd8f187
Compare
Review Repair (2026-09-21)
Head
ba5f668de873213c66a841334b9c6912ac5d7cbcresolves all three actionable review findings:commandExistsnow exits with status 130/143 when a discovery probe resolves to a SIGINT/SIGTERM cancellation outcome, somaincan no longer launch Go or pre-commit fallback work after the caller asked to terminate. The Python interpreter probe stops the same way.setTimeout1,200ms) instead ofsleep 1.2, which failed instantly under the binDir-restrictedPATH; the delay stays longer than the shortened linter budget (500ms) and shorter than the bootstrap budget (2,000ms), so the test fails if Go is given the wrong budget.ENOENT) degrades to an unavailable runtime.Regression:
test/scripts/check-workflows.test.ts— 17/17 passed at this head.Corrected after-fix terminal proof against a SIGTERM-resistant child (the printed invocation is the actual executed script; the transcript is its real output, with the workflow file list redacted for length):
What Problem This Solves
Fixes an issue where local workflow sanity checks could hang indefinitely when an external linter, Go fallback, or pre-commit bootstrap command stopped making progress.
Why This Change Was Made
scripts/check-workflows.mtsnow runs subprocesses through the repository's managed child-process runner. Linter and guard scans have a fixed five-minute deadline, dependency bootstrap commands have a separate bounded fifteen-minute deadline, and timed-out process trees are terminated with an actionable command and budget diagnostic. Discovery probes and temporary-venv bootstrap failures retain their specific error context.User Impact
Developers and CI jobs receive a clear failure instead of a stuck workflow sanity check when a dependency command hangs.
Evidence
ba5f668de873213c66a841334b9c6912ac5d7cbc.4a39ca6539cc5cb7555ec5652be106faf93fd1e7.spawnSync. The resolution keeps main's floor check and routes its interpreter probe through the same bounded managed runner as every other subprocess (pipe-captured--versionbanner, five-minute budget), so the feature is preserved without reintroducing unbounded synchronous subprocesses.scripts/check-workflows.mts; its focused command passed all 17 tests.Captured output:
proof/repro source: proof-check-workflows-timeout.sh (corrected invocation, exactly as executed)
AI-assisted: built with Codex