test: fix 3 typecheck failures blocking all PR merges (PKT-565) - #456
Merged
bugsyhewitt merged 1 commit intoAug 8, 2026
Merged
Conversation
Defect 1 (TS2769): mock.calls.filter with destructured tuple annotation ([state]: [string]) fails TypeScript 7.x because any[] is not assignable to [string]. Replace with explicit call parameter and inline cast. Defect 2 (TS2345): getRegistry mock missing bestForTool/size members added since PKT-295. RegistryStore has private fields so use as unknown cast. Defect 3 (test/utils.test.ts:200) was only in a dirty working tree from prior cycles and does not exist on clean main — not applicable here. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bugsyhewitt
deleted the
fix/565-typescript-typecheck-failures-on-existing-test-code
branch
August 8, 2026 14:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 3 pre-existing TypeScript typecheck errors on
mainthat are causing theTypeScript typecheckCI gate to fail on every open PR. Zero production code changes.Blocked PRs unblocked by this fix: 30+ open PRs with
auto-merge-oklabel, including #418–#448.Defects fixed
Defect 1 (TS2769) —
governance-loop-handleJobFailed-legacy.test.tslines 191, 238([state]: [string]) =>in a.filter()callback fails TypeScript 7.x becauseany[](the inferred type ofmock.callselements) is not assignable to[string](a 1-tuple). Fixed by moving the tuple annotation inside the body as a cast:Defect 2 (TS2345) —
hierarchy-bootstrap-online-fitness.test.tsline 153The
getRegistrymock was missingbestForToolandsize(added toRegistryStoreafter this test was authored in PKT-295).RegistryStorehasprivate store/toolIndexfields so an object literal cannot satisfy it structurally — the fix adds the missing public members and usesas unknown as ReturnType<typeof getRegistry>, the only correct pattern for class types with private fields.Defect 3 (TS2345) —
test/utils.test.ts:200Only existed in a dirty working tree from prior cycles; not present on clean
main. Not applicable to this branch.Evidence
pnpm exec tsc --noEmitexits 1 with 3 errors on cleanmainalienclaw-architect(no blocking items)Refs
🤖 Generated with Claude Code