chore(createPR): remove subprocess + gadget timeouts so long pre-push hooks survive#1185
Merged
zbigniewsobiecki merged 1 commit intodevfrom Apr 24, 2026
Merged
Conversation
… hooks survive Three stacked wall-clocks were killing `cascade-tools scm create-pr` whenever a project's pre-push hook ran a real test suite: 1. `git commit` runCommand — wallTimeoutMs 120s, idleTimeoutMs 60s 2. `git push` runCommand — wallTimeoutMs 230s, idleTimeoutMs 90s 3. CreatePR gadget — outer timeoutMs 240s A 5-minute pre-push test suite is a legitimate use case. The agent harness that wraps this gadget already budgets long tool calls; the second shorter cap here was just re-creating the "PUSH FAILED at 2 min" failure mode of spec 013. Fix: pass `wallTimeoutMs: 0, idleTimeoutMs: 0` to both runCommand calls (runCommand treats 0 as "disabled", per its docstring at utils/repo.ts:75-86 and the enforced branches at :153,164,169). Set the CreatePR gadget's outer `timeoutMs: 0`, which llmist treats as "no outer timer" (see `if (timeoutMs && timeoutMs > 0)` in its dispatch path). Heartbeat stays on (default 30s stderr pulse) so operators still see `[git-push] still running (Ns)` ticks during slow hooks — observability without killing. Test coverage: - Two new `runCommand` tests pin the disabled-idle and disabled-wall paths (tests/unit/utils/repo.test.ts) - Three new regression tests pin that createPR passes 0/0 for both git commands (tests/unit/gadgets/github/core/createPR.test.ts) - The definitions-level assertion was flipped from "240s" to "0" and now documents why 0 is the correct value - Outdated spec-013 contract tests that asserted the old "finite" timeouts were deleted; the captured-output assertions from that block were kept Not touched: runCommand DEFAULT_IDLE_TIMEOUT_MS / DEFAULT_WALL_TIMEOUT_MS, and every other timeout in the inventory (HTTP clients, watchdogs, VerifyChanges, diagnostics tsc/biome, tmux, Sleep). Those guard genuine hang cases and were explicitly out of scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git commit+git pushnow callrunCommandwithwallTimeoutMs: 0, idleTimeoutMs: 0(disabled, perrunCommand's docstring convention).timeoutMs: 240000is now0, which llmist treats as "no outer timer" (if (timeoutMs && timeoutMs > 0)in its dispatch path).[git-push] still running (Ns)ticks.Why
Three wall-clocks used to stack on one code path, any of which could fire first:
git commitsubprocessgit pushsubprocessA recent agent session lost 10+ minutes looping on the 120 s push timeout when lefthook ran the full test suite. This PR lifts all three.
Scope (explicit)
In scope, per approved plan:
src/gadgets/github/core/createPR.ts— drop 4 timeout constants, pass0/0on bothrunCommandcallssrc/gadgets/github/definitions.ts— set outertimeoutMs: 0Out of scope (deliberately not touched):
runCommandDEFAULT_IDLE_TIMEOUT_MS / DEFAULT_WALL_TIMEOUT_MS — other callers (agent worker repo fetch/checkout/reset, setup.sh, npm install, tsc) still want defaults to catch genuine hangsTest coverage
Added:
Updated:
Totals: 6400 unit tests pass (up from 6398), typecheck clean, lint clean (0 warnings).
Test plan
Rollback
Single commit. Revert restores the four subprocess timeout constants and the gadget `timeoutMs: 240000`.
🤖 Generated with Claude Code