You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inventory all (..._args: unknown[]): never throwing stubs across src/ and classify live-caller status. Sibling to #2337 (which covers silent-neuter stubs: => false, => {}, => []). This audit targets the unconditional-throw variant that shipped in #2408.
Rationale
The resolveAgentRuntimeOrThrow regression (#2408) is one instance of a class: a stub replaced with an unconditional throw during upstream sync, left with live production callers, passing CI because tests mock the stub. #2337 documents the related silent-neuter class — 3 files with hidden runtime regressions (Telegram vision, node-host skills, TUI listModels). Neither #2337 nor #2406 enumerates the throwing-stub variant. Likelihood other instances exist: moderate — the pattern is grep-able.
Scope
Enumerate all exports whose body is an unconditional throw, matching any of:
# Pattern A: explicit never-return stub with variadic unknown args
rg --type ts 'function\s+\w+\([^)]*\.\.\._?args:\s*unknown\[\][^)]*\):\s*never\s*\{' src/
# Pattern B: any "is not available in RemoteClaw fork" throw
rg --type ts 'throw new Error\("[^"]*is not available in RemoteClaw fork[^"]*"\)' src/
# Pattern C: stubs throwing "gutted" / upstream-compat messages
rg --type ts -B 2 'throw new Error\("[^"]*(gutted|upstream-compat)[^"]*"\)' src/
For each matching symbol:
Identify live callers via rg --type ts "\b<symbol>\b" src/ extensions/ excluding *.test.ts, *.test-helpers.ts, test-helpers/**, *.test-mocks.ts, *.test-utils.ts.
Classify:
(a) Deletable dead: no live callers; safe to remove both stub and any test-only mocks.
(b) Transitively dead: live callers exist, but those callers are themselves dead (reachable only through other gutted chains). Document the chain.
Summary
Inventory all
(..._args: unknown[]): neverthrowing stubs acrosssrc/and classify live-caller status. Sibling to #2337 (which covers silent-neuter stubs:=> false,=> {},=> []). This audit targets the unconditional-throw variant that shipped in #2408.Rationale
The
resolveAgentRuntimeOrThrowregression (#2408) is one instance of a class: a stub replaced with an unconditionalthrowduring upstream sync, left with live production callers, passing CI because tests mock the stub. #2337 documents the related silent-neuter class — 3 files with hidden runtime regressions (Telegram vision, node-host skills, TUI listModels). Neither #2337 nor #2406 enumerates the throwing-stub variant. Likelihood other instances exist: moderate — the pattern is grep-able.Scope
Enumerate all exports whose body is an unconditional throw, matching any of:
For each matching symbol:
rg --type ts "\b<symbol>\b" src/ extensions/excluding*.test.ts,*.test-helpers.ts,test-helpers/**,*.test-mocks.ts,*.test-utils.ts.Deliverable
A comment on this issue containing:
symbol | file:line | live callers (count + first 3 locations) | class a/b/c | disposition.Acceptance criteria
Related
resolveAgentRuntimeOrThrowregression that triggered this audit.