test(#4525): migrate statusline/teams batch to named timeout constants (#4677)

Batch 14 of the ad hoc timeout literal migration (epic #4445). Replaces
every bare numeric timeout/timeoutMs object-literal property in
tests/gsd-statusline.test.cjs and tests/teams-status.test.cjs with a named
constant, per eslint-rules/no-adhoc-timeout-literal.cjs. Removes these 2
files from the rule's allowlist.

Issue #4525 cautions against forcing either file onto PROBE_TIMEOUT_MS
without checking, since both invoke a "long-lived status renderer."
Checking each file's actual production handler separately found the
caution applies to one file and not the other: gsd-statusline.test.cjs's 7
sites all spawn hooks/gsd-statusline.js, which does real rendering work
(context-window, git, teams state) -- two new file-local constants
(STATUSLINE_HOOK_TIMEOUT_MS=4000, 6 sites; STATUSLINE_HOOK_GIT_SHIM_TIMEOUT_MS
=5000, 1 site for a heavier git-shim test). teams-status.test.cjs's 5 sites
spawn `gsd-tools.cjs query teams-status`, whose handler
(gsd-core/bin/lib/teams-status.cjs's cmdTeamsStatus) is a lightweight
env-truthiness check with no rendering or fan-out -- genuinely matching
PROBE_TIMEOUT_MS's class, confirmed by reading the handler directly rather
than assumed from the matching value. No new shared-helper constant is
needed this batch. No src/bin file touched, no numeric value changed
anywhere.

Co-authored-by: sim <sim@local>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-09-13 00:23:50 -04:00
committed by GitHub
parent 56b706a07a
commit 0cee0eee47
3 changed files with 47 additions and 15 deletions

View File

@@ -7,7 +7,6 @@
"tests/code-review.test.cjs",
"tests/dispatcher.test.cjs",
"tests/gate-predicate-evaluator.test.cjs",
"tests/gsd-statusline.test.cjs",
"tests/phase6-capstone-conformance.test.cjs",
"tests/plan-phase-stall-detection.test.cjs",
"tests/plan-review-convergence.test.cjs",
@@ -17,6 +16,5 @@
"tests/reviewer-manifest-body.test.cjs",
"tests/reviewer-trust-disclosure.test.cjs",
"tests/run-tests-temp-root.test.cjs",
"tests/shell-command-projection-dispatch.test.cjs",
"tests/teams-status.test.cjs"
"tests/shell-command-projection-dispatch.test.cjs"
]