fix: enable TypeScript strict mode and type-check tests in CI#7
Merged
Conversation
strict: false had the entire strict family off for a published binary parsing loosely-typed API responses. The burn-down turned out to be small — five errors: - upgrade.ts: DOM/Node web-stream typing clash on Readable.fromWeb (same cast pattern already used in api-gateway.ts and expo.ts) - results-polling: TestResult indexed an optional `results` array; duration_seconds needed an explicit null for absent values - version.service: resolveMaestroVersion could carry undefined through to its return — now fails fast with a clear message when compatibility data provides no default version Also closes the "tests get zero static checking" gap: tsconfig.test.json type-checks src + test strictly via `pnpm typecheck` (new CI step), and `pnpm lint` now covers test/ (with chai's property-style assertions exempted from no-unused-expressions). forceConsistentCasingInFileNames enabled alongside. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
870598d to
bb1d769
Compare
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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
Third deferred item from the #3 review:
strict: falsedisabled the entire strict family (strictNullChecks,noImplicitAny, …) across a published CLI that parses loosely-typed API responses, andtest/**had zero static checking of any kind (not compiled, not linted — tsx strips types without checking them).The burn-down turned out to be pleasantly small — 5 errors total, all now fixed:
upgrade.ts: DOM vs Node web-stream typing clash onReadable.fromWeb(same cast pattern the repo already uses inapi-gateway.ts/expo.ts)results-polling.service.ts:TestResultindexed an optionalresultsarray withoutNonNullable;duration_secondsneeded an explicit?? nullversion.service.ts:resolveMaestroVersioncould threadundefinedthrough to itsstringreturn — now fails fast with a clear message if compatibility data lacks a default versionToolchain wiring (so it stays clean)
tsconfig.json:strict: true+forceConsistentCasingInFileNamestsconfig.test.json+pnpm typecheck: stricttsc --noEmitoversrc/andtest/, added as a CI steppnpm lintnow coverstest/(chai's property-style assertions exempted fromno-unused-expressionsvia a test-files override)Test plan
pnpm buildclean (dist compiled under strict)pnpm typecheckclean (src + tests)pnpm lint0 errorspnpm test122/122 passingThis PR is also the first real test of the #6 review-permission fix — the
claude-reviewworkflow should now actually post comments here.🤖 Generated with Claude Code