Batch 13 of the ad hoc timeout literal migration (epic #4445). Replaces every bare numeric timeoutMs object-literal property in tests/task-content-resolution.test.cjs, tests/task-command-router-resolve-content.test.cjs, and tests/task-content-resolver-grammar-parity.test.cjs with a named constant, per eslint-rules/no-adhoc-timeout-literal.cjs. Removes these 3 files from the rule's allowlist. Every one of the 13 sites describes the same field -- a task-content- resolver manifest's invoke.timeoutMs -- as fixture/validation data; none is a real subprocess spawn timeout, verified by tracing each site to a pure function, a garbage-shape rejection path, or a fully-injected fake exec function. Adds one new shared constant, TASK_RESOLVER_INVOKE_TIMEOUT_MS, used by 2 files in this batch (crossing the promotion bar). Adds file-local constants for a value used by only 1 file, plus three deliberately-invalid values (zero, negative, non-integer) inside one findResolver garbage-shapes test proving the validator rejects a malformed manifest regardless of which way its timeout is invalid. Also fixes a review-caught defect outside the mechanical rule's own scope: a bare-literal duplicate of the new shared constant inside a ResolverTimeoutError assertion (a call argument, not an object-literal property, so the lint rule never flagged it) -- renamed in this same PR per the no-deferrals rule. 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:
@@ -300,6 +300,25 @@ const PATHOLOGICAL_INPUT_TEST_TIMEOUT_MS = 60000;
|
||||
*/
|
||||
const GSD_TOOLS_CLI_MODERATE_TIMEOUT_MS = 30000;
|
||||
|
||||
/**
|
||||
* NOT a subprocess spawn timeout. Fixture DATA -- the default, plausible-
|
||||
* looking `invoke.timeoutMs` value for a well-formed task-content-resolver
|
||||
* manifest, used as the base fixture across most "valid resolver" tests on
|
||||
* the RESOLUTION side of that system (tests/task-content-resolution.cjs and
|
||||
* its grammar-parity sibling). Coincides in value and role with epic #4445
|
||||
* batch 10's file-local `TASK_RESOLVER_FIXTURE_TIMEOUT_MS` in
|
||||
* tests/capability-validator-task-content-resolver.test.cjs (the VALIDATION
|
||||
* side of the same resolver system, a different file, not exported) --
|
||||
* disclosed, not merged; both independently describe the same manifest
|
||||
* field's plausible default, unsurprising for two suites covering the same
|
||||
* resolver.
|
||||
*
|
||||
* Shared across 2 files in batch #4524 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 TASK_RESOLVER_INVOKE_TIMEOUT_MS = 10000;
|
||||
|
||||
module.exports = {
|
||||
PROBE_TIMEOUT_MS,
|
||||
HOOK_FANOUT_TIMEOUT_MS,
|
||||
@@ -318,4 +337,5 @@ module.exports = {
|
||||
REAL_REPO_GIT_TIMEOUT_MS,
|
||||
PATHOLOGICAL_INPUT_TEST_TIMEOUT_MS,
|
||||
GSD_TOOLS_CLI_MODERATE_TIMEOUT_MS,
|
||||
TASK_RESOLVER_INVOKE_TIMEOUT_MS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user