Skip to content

build(test-types): tsc-baseline gate for tsconfig.tests.json (PP-d8uq)#1584

Open
timothyfroehlich wants to merge 1 commit into
mainfrom
worktree-lsp-tsconfig-tests-PP-4k76
Open

build(test-types): tsc-baseline gate for tsconfig.tests.json (PP-d8uq)#1584
timothyfroehlich wants to merge 1 commit into
mainfrom
worktree-lsp-tsconfig-tests-PP-4k76

Conversation

@timothyfroehlich

Copy link
Copy Markdown
Owner

What

Test files have never been type-checked by tscpnpm run typecheck runs tsc -p tsconfig.json, which excludes tests; vitest strips types via esbuild; ESLint uses tsconfig.tests.json but doesn't surface assignability errors. Running tsc -p tsconfig.tests.json surfaces 261 latent type errors.

This PR establishes a regression gate (via tsc-baseline) so no new test type-errors creep in while the backlog is burned down under epic PP-38jq. It does not fix the 261 errors (those are the child beads) and does not yet wire the editor (the deferred capstone, PP-4k76).

Changes

  • Add tsc-baseline dev dependency
  • typecheck:tests = tsc --noEmit --pretty false -p tsconfig.tests.json | tsc-baseline check, wired into check; fails only on errors not in the committed baseline
  • typecheck:tests:save to regenerate the baseline after fixing errors
  • Commit .tsc-baseline.json (261 errors) + add to .prettierignore (so regenerates don't churn against prettier)
  • Drop e2e/** + playwright.config.ts from tsconfig.tests.json include — they belong to e2e/tsconfig.json's NodeNext scope and were mis-checked under bundler resolution (their own type-checking is orphaned → PP-0q8e)

How an agent uses it

pnpm run check (or pnpm run typecheck:tests) now fails if you introduce a test type-error not already in the baseline. After fixing real errors, run pnpm run typecheck:tests:save and commit the shrunken baseline.

Verification

  • ✅ Gate exits 1 on a newly-injected test type error, 0 when clean
  • ✅ App typecheck unaffected
  • ✅ Pre-commit clean (baseline ignored by prettier)

Follow-up (epic PP-38jq, burndown by root cause)

PP-ku3l (DB seam ~78) · PP-pobu (factory id ~42) · PP-s4gt (mock typing ~48) · PP-qbnk (stale enums ~22) · PP-vcdl (ProseMirrorDoc ~21) · PP-tka5 (NODE_ENV ~10) · PP-pwrr (misc ~17) · PP-0q8e (e2e typecheck) · PP-4k76 (editor wiring capstone, blocked until cleanups land)

🤖 Generated with Claude Code

Test files have never been type-checked by tsc (the `typecheck` script runs
`tsc -p tsconfig.json`, which excludes them; vitest strips types via esbuild).
`tsc -p tsconfig.tests.json` surfaces 261 latent type errors.

Establishes a regression gate so no NEW test type-errors creep in while the
backlog is burned down (epic PP-38jq):

- add `tsc-baseline` dev dep
- `typecheck:tests` (tsc -p tsconfig.tests.json | tsc-baseline check), wired
  into `check`; fails only on errors not in the committed baseline
- `typecheck:tests:save` to regenerate the baseline after fixing errors
- commit `.tsc-baseline.json` (261 errors) and add it to `.prettierignore`
  so regenerates don't churn against prettier
- drop `e2e/**` + `playwright.config.ts` from tsconfig.tests.json include —
  they belong to e2e/tsconfig.json's NodeNext scope and were mis-checked
  under bundler resolution (their own type-checking is orphaned: PP-0q8e)

Verified: gate exits 1 on a newly-introduced test type error, 0 when clean;
app typecheck unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 26, 2026 02:01
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pin-point Ready Ready Preview, Comment Jun 26, 2026 2:03am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants