Files
gaebal-gajae 5995ca0bfb fix(hooks): fit Windows git hooks, drop queued stdio, reap on cancel
3s Windows inner (2500ms) cannot cover 559ms supervisor startup plus a
2000ms nested git timeout. Git-bearing PreToolUse/PostToolUse hooks now
declare 5s (Windows inner 3500ms >= 600+2000+200). 3s budgets stay
honest and no longer claim to fit nested git.

Fail-open isolates output through owned PassThrough taps and destroys
them on timeout so a non-draining consumer cannot pin run.cjs. CLI
timeout also destroys process stdio to abort queued kernel writes.

Cancellation reaps the tree before detaching pipes so a Windows
supervisor EPIPE-exit cannot skip grandchild reap.
2026-09-01 04:22:57 +00:00

6 lines
298 B
JavaScript

// Budget-coherent PER-CALL ceiling for nested git calls in generic hooks.
// Git-bearing hooks declare 5s so Windows inner runtime (3500ms) covers
// supervisor startup (≤600ms) + 2000ms git + margin. Non-proportional
// by design (see #3493, #3920).
export const BOUNDED_GIT_TIMEOUT_MS = 2000;