test(#4518): migrate loop/hook-point e2e batch to named timeout constants
Batch 7 of 17 in the ad hoc timeout literal migration (epic #4445). Replaces every bare numeric timeout/timeoutMs object-literal property in tests/loop-render-hooks.test.cjs, tests/loop-walk.qa.test.cjs, tests/loop-hooks-empty-points-e2e.test.cjs, tests/loop-hooks-ship-pre-e2e.test.cjs, tests/loop-hooks-verify-post-e2e.test.cjs, tests/check-gap-analysis-plan-post-e2e.test.cjs, tests/check-tdd-review-checkpoint-e2e.test.cjs, tests/execute-wave-post-gate-pipeline-e2e.test.cjs, tests/plan-pre-hook-e2e.test.cjs, and tests/qa/tdd-walk.cjs with a named constant, per eslint-rules/no-adhoc-timeout-literal.cjs. Removes the 10 files from the rule's allowlist. Promotes a new shared class norm to tests/helpers/timeouts.cjs, LOOP_HOOK_POINT_CLI_TIMEOUT_MS: 7 files independently arrived at the same value for a single gsd-tools.cjs CLI subcommand invocation with no confirmed subprocess fan-out. Reuses the existing PROBE_TIMEOUT_MS for loop-render-hooks.test.cjs's 11 sites (same class, exact value match). Adds 4 file-local constants for values that share a class with the new norm or an existing one but diverge in pre-existing value, or that numerically coincide with an unrelated existing constant without matching its actual operation. Isolated Standards-axis review caught that the new shared constant's doc comment exhaustively enumerated 3 verb families while a 7th genuine site (an `init new-project` invocation) also correctly belonged to the class; fixed by rewording the comment to state the class definition (call shape) first and list all 4 representative verbs, explicitly illustrative rather than exhaustive. No value changed, no site's classification changed. No src/bin file touched, no numeric value changed anywhere. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -159,6 +159,35 @@ const FIXTURE_HOOK_TIMEOUT_SECONDS = 5;
|
||||
*/
|
||||
const STAGED_HOOK_SCRIPT_TIMEOUT_MS = 20000;
|
||||
|
||||
/**
|
||||
* A single `gsd-tools.cjs` CLI subcommand invocation, spawned directly (never
|
||||
* via an intermediate shell script), used by a loop/hook-point e2e test. The
|
||||
* command does real in-process work -- capability/config resolution, project
|
||||
* scaffolding, or (for the `check` verbs that inspect git-tracked state) real
|
||||
* git plumbing calls -- but as ONE process with no confirmed nested-subprocess
|
||||
* fan-out, verified per-site by reading each file's own runner function, not
|
||||
* assumed from "hook" in the filename. Representative verbs seen at this
|
||||
* norm's 7 sites: `loop render-hooks <point>`, `check <check-id>`,
|
||||
* `execute <hook-point>`, and `init new-project` (tests/loop-walk.qa.test.cjs's
|
||||
* concurrency test) -- the norm describes the CALL SHAPE (single direct
|
||||
* gsd-tools.cjs spawn, no fan-out), not one specific verb family, so this list
|
||||
* is illustrative, not exhaustive.
|
||||
*
|
||||
* Distinct from `HOOK_FANOUT_TIMEOUT_MS` (a bash-hosted script that itself
|
||||
* shells out to further subprocesses) despite the coincidentally-matching
|
||||
* value: this norm's sites spawn `gsd-tools.cjs` and nothing beneath it.
|
||||
* Distinct from `PROBE_TIMEOUT_MS`: the same underlying `loop render-hooks`
|
||||
* command is ALSO called at `PROBE_TIMEOUT_MS` (15000ms) elsewhere in the
|
||||
* suite against lighter temp-project fixtures -- the two bounds are kept
|
||||
* separate rather than equalized, since this migration never raises or
|
||||
* lowers a value without a fresh bench citation.
|
||||
*
|
||||
* Shared across 7 files in batch #4518 of the ad hoc timeout literal
|
||||
* migration, epic #4445 -- every site independently arrived at this exact
|
||||
* value -- that is why it lives here rather than as a file-local constant.
|
||||
*/
|
||||
const LOOP_HOOK_POINT_CLI_TIMEOUT_MS = 60000;
|
||||
|
||||
module.exports = {
|
||||
PROBE_TIMEOUT_MS,
|
||||
HOOK_FANOUT_TIMEOUT_MS,
|
||||
@@ -170,4 +199,5 @@ module.exports = {
|
||||
QUICK_SPAWN_TIMEOUT_MS,
|
||||
FIXTURE_HOOK_TIMEOUT_SECONDS,
|
||||
STAGED_HOOK_SCRIPT_TIMEOUT_MS,
|
||||
LOOP_HOOK_POINT_CLI_TIMEOUT_MS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user