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
Our PR CI (.github/workflows/tests.yml) has no type-checking or documentation-validation gate, and the test matrix lags the Node versions we support. Three related gaps:
Tests run via vitest run, which only transpiles — type errors never fail CI, and __tests__/ are never type-checked at all.
Nothing validates our TSDoc or compiles the @example snippets in doc comments.
The Node matrix is [22, 24] while engines is >=22.
The only de-facto type gate today is the tsupdts: true emit that happens incidentally as a build dependency — not explicit, and it doesn't validate doc prose or examples.
Motivating near-miss: in #497 the wasm-inline OidcFederationStrategy JSDoc example omitted workspaceCrn, which wouldn't have type-checked against the (then-required) field. It was caught only by a human/Copilot reviewer — no CI check would have flagged it. (We ultimately relaxed the type so the example is valid, but the gap in CI remains.)
This is a general "improve CI" task.
1. Add a tsc --noEmit typecheck gate
Add a typecheck script per package (tsc --noEmit) covering src/ and __tests__/ — tests currently escape all type-checking.
Wire it as a turbo typecheck task and a dedicated job in tests.yml (or fold into the existing test job).
Acceptance: a type error in source or tests fails the PR.
2. Validate TSDoc + compile-verify doc examples
Two layers:
TSDoc syntax validation — choose one:
eslint-plugin-tsdoc — precise TSDoc linting, but pulls ESLint in alongside Biome.
@microsoft/api-extractor — reports TSDoc warnings during a .d.ts rollup; also gives us API reports.
TypeDoc with --treatWarningsAsErrors — validates {@link} resolution + tag correctness and doubles as an API-doc build check.
Acceptance: a malformed TSDoc tag, an unresolved {@link}, or a non-compiling @example fails the PR.
Recommendation: TypeDoc --treatWarningsAsErrors for syntax/{@link} + a small compiled-examples harness for snippet verification — keeps the toolchain lean since we run Biome (not ESLint) today.
Note: the existing rebuild-docs.yml only fires on release tags and curls an external DOCS_WEBHOOK_URL to rebuild a separate docs site after release. It is not a PR gate and does not validate source TSDoc.
3. Expand the Node test matrix to 26
.github/workflows/tests.yml:17 is node-version: [22, 24] → make it [22, 24, 26] (engines is >=22).
Caveat: Node 26 GA is expected ~Oct 2026. Until then, either hold this sub-task or track 26 via a nightly/RC (actions/setup-node supports 26-nightly). Land as GA-blocking if we want a clean green matrix.
Notes
The dts: true tsup emit stays the declaration generator; the new typecheck task is the explicit enforcement.
Summary
Our PR CI (
.github/workflows/tests.yml) has no type-checking or documentation-validation gate, and the test matrix lags the Node versions we support. Three related gaps:vitest run, which only transpiles — type errors never fail CI, and__tests__/are never type-checked at all.@examplesnippets in doc comments.[22, 24]whileenginesis>=22.The only de-facto type gate today is the
tsupdts: trueemit that happens incidentally as a build dependency — not explicit, and it doesn't validate doc prose or examples.Motivating near-miss: in #497 the wasm-inline
OidcFederationStrategyJSDoc example omittedworkspaceCrn, which wouldn't have type-checked against the (then-required) field. It was caught only by a human/Copilot reviewer — no CI check would have flagged it. (We ultimately relaxed the type so the example is valid, but the gap in CI remains.)This is a general "improve CI" task.
1. Add a
tsc --noEmittypecheck gatetypecheckscript per package (tsc --noEmit) coveringsrc/and__tests__/— tests currently escape all type-checking.typechecktask and a dedicated job intests.yml(or fold into the existing test job).2. Validate TSDoc + compile-verify doc examples
Two layers:
eslint-plugin-tsdoc— precise TSDoc linting, but pulls ESLint in alongside Biome.@microsoft/api-extractor— reports TSDoc warnings during a.d.tsrollup; also gives us API reports.--treatWarningsAsErrors— validates{@link}resolution + tag correctness and doubles as an API-doc build check.@examplesnippets — so an example can't silently drift from the types it documents (the feat(stack): protect-ffi 0.26.0 + auth 0.39 OidcFederationStrategy (stacked on #496) #497 case). Candidates: extract examples into a compiled fixtures dir checked bytsc, or a tool liketypescript-docs-verifierthat compiles fenced code blocks.{@link}, or a non-compiling@examplefails the PR.--treatWarningsAsErrorsfor syntax/{@link}+ a small compiled-examples harness for snippet verification — keeps the toolchain lean since we run Biome (not ESLint) today.3. Expand the Node test matrix to 26
.github/workflows/tests.yml:17isnode-version: [22, 24]→ make it[22, 24, 26](enginesis>=22).actions/setup-nodesupports26-nightly). Land as GA-blocking if we want a clean green matrix.Notes
dts: truetsup emit stays the declaration generator; the newtypechecktask is the explicit enforcement.USER_JWT).