test(#4514): migrate git-adjacent workflow checks to named timeout constants

Batch 3 of the ad hoc timeout literal migration (epic #4445). Replaces
every bare numeric timeout/timeoutMs object-literal property in
tests/ci-rebase-check.test.cjs, tests/gsd-validate-commit-crash-policy.test.cjs,
tests/pr-branch-planning-filter.test.cjs, tests/reapply-verify-hunks.test.cjs,
tests/ship-notes-wedged-pr.test.cjs, tests/slug-derivation-drift-guard.test.cjs,
and tests/worktree-safety.test.cjs with a named constant, per
eslint-rules/no-adhoc-timeout-literal.cjs. Removes the 7 files from the
rule's allowlist.

Mints a new shared class norm, QUICK_SPAWN_TIMEOUT_MS (10000ms), in
tests/helpers/timeouts.cjs: 5 sites across 4 of this batch's files had
independently arrived at the same value for the same shape (a cheap,
trivial subprocess/hook invocation with no real git/network/fan-out
work). No src/bin file touched, no numeric value changed anywhere.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sim
2026-09-09 07:05:48 -04:00
parent fd37b6a171
commit ab0405ad22
9 changed files with 82 additions and 24 deletions

View File

@@ -110,6 +110,23 @@ const INSTALL_TIMEOUT_MS = 120000;
*/
const SEAM_DEFAULT_TIMEOUT_MS = 60000;
/**
* A cheap, lightweight subprocess/hook invocation whose own work is
* trivial -- a synchronous in-process guard hook, a fully-mocked shell
* harness (git/gh functions stubbed out), a small `node -e` snippet, or a
* lint script scanning a tiny temp fixture -- with no real git/network/
* fan-out work inside. 10000ms leaves generous headroom over each call
* site's sub-second observed worst case (#4514, batch 3 of the ad hoc
* timeout literal migration, epic #4445 -- consolidates 5 call sites
* across 4 files that had all independently arrived at this exact value).
*
* Deliberately NOT the same as `PROBE_TIMEOUT_MS` (15000ms): consolidating
* onto that would RAISE these sites' bound with no bench citation, which
* this migration's scope (naming, not tuning) does not permit. This norm
* is for the even-lighter end of the spectrum PROBE_TIMEOUT_MS occupies.
*/
const QUICK_SPAWN_TIMEOUT_MS = 10000;
module.exports = {
PROBE_TIMEOUT_MS,
HOOK_FANOUT_TIMEOUT_MS,
@@ -118,4 +135,5 @@ module.exports = {
BUILD_TIMEOUT_MS,
INSTALL_TIMEOUT_MS,
SEAM_DEFAULT_TIMEOUT_MS,
QUICK_SPAWN_TIMEOUT_MS,
};