Skip to content

ci: type check the docs site - #754

Merged
av1155 merged 1 commit into
mainfrom
ci/typecheck-docs-site
Aug 12, 2026
Merged

ci: type check the docs site#754
av1155 merged 1 commit into
mainfrom
ci/typecheck-docs-site

Conversation

@av1155

@av1155 av1155 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Closes #753

Summary

test-deploy.yml ran only pnpm run build, and the Docusaurus build transpiles TypeScript without checking it. A type error in website/ passed CI silently.

Changes

  • test-deploy.yml: run pnpm run typecheck before the build. It is the cheaper of the two, so it fails first.
  • test-deploy.yml: trigger on changes to the workflow itself, so this PR exercises the new step rather than deferring proof to the next unrelated docs change.

Testing

Appended a deliberate type error to website/src/pages/index.tsx and ran both scripts against it:

pnpm run typecheck  -> exit 2   src/pages/index.tsx(279,7): error TS2322:
                                Type 'string' is not assignable to type 'number'
pnpm run build      -> exit 0   [SUCCESS] Generated static files in "build".
                                (and printed "not a number" during the build)

The build cannot catch this, which is the gap being closed. The probe was reverted and website/ confirmed clean before committing.

Also checked that typecheck passes from a clean checkout with no generated .docusaurus directory, so it does not depend on running after the build.

Verified against live branch protection that Test docs build is not one of the 11 required checks, and the job name is unchanged, so nothing about the required set moves. The new step is named Type check, but steps do not create check names, so there is no collision with the required Type check (mypy) job.

Type of Change

  • CI/CD (ci:)

Checklist

  • Issue exists and is linked above with Closes #N
  • Linked issue has exactly one type:* and one priority:* label
  • Linked issue has at most one phase:* label (or none when not roadmap work)
  • Branch name matches issue scope
  • Tests added/updated for all changes — N/A, CI config
  • No secrets or sensitive data committed
  • Scope check: CI coverage only, no runtime change

The Docusaurus build transpiles TypeScript without checking it, so a
type error builds clean. Verified: a deliberate string-to-number
assignment fails typecheck with TS2322 while the build exits 0 and
prints the bad value.

This is why the TypeScript 7 bump showed every check green while the
typecheck script was broken.

The workflow now also triggers on itself, so a change here is exercised
by the PR that makes it.
@av1155
av1155 merged commit a91f184 into main Aug 12, 2026
23 checks passed
@av1155
av1155 deleted the ci/typecheck-docs-site branch August 12, 2026 01:56
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.

ci: type check the docs site in CI

1 participant