mirror of
https://github.com/Yeachan-Heo/oh-my-claudecode.git
synced 2026-10-22 03:02:58 -05:00
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.
6 lines
298 B
JavaScript
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;
|