Add a zero-tolerance TypeDoc documentation gate#110
Draft
leynos wants to merge 2 commits into
Draft
Conversation
added 2 commits
July 18, 2026 00:22
Prepare for a zero-tolerance TypeDoc documentation gate: add JSDoc to the nineteen declarations TypeDoc flags across the app shell, the display-mode provider, the observability logger, the application state machine unions, and the root props. Reflow the state-machine union members to multiline so each variant's discriminant can carry its own comment (shapes unchanged), and convert the two application barrel headers from `@file` (unknown to TypeDoc) to the `@module` form.
Add `docs:check` to the `test:all` aggregate (after `check:types`) and expose it as `make docs-check`: TypeDoc's `notDocumented` validation over `src` (`entryPointStrategy: "expand"`, `emit: "none"`, validation warnings as errors), configured by `typedoc.json` with a scoped `tsconfig.typedoc.json` (`skipLibCheck`, `src` only — the repository's `check:types` passes `--skipLibCheck` on the command line, which TypeDoc cannot see). Generated declarations, `*.gen.*`, `__generated__`, tests, and fixtures are excluded. The gate requires 100% documentation of the surface, reports the qualified name of each undocumented declaration, and writes no artefacts. The semantic-lint workflow gains a `bun run docs:check` step so CI reaches the gate. Also bump the stale transitive `playwright-core` from 1.59.1 to 1.61.1 so it deduplicates against `playwright@1.61.1` — the duplicated package made `check:types` (and therefore `test:all`) fail before this branch.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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
This branch adds a zero-tolerance TypeDoc documentation gate to the
test:allaggregate. TypeDoc'snotDocumentedvalidation runs oversrc(entryPointStrategy: "expand") withemit: "none"andvalidation warnings treated as errors: every exported declaration must
carry a JSDoc comment (unexported local helpers are not counted). The
gate reports the qualified name of each undocumented declaration,
writes no documentation artefacts, and fails on a single omission. It
is also exposed as
make docs-check, and the semantic-lint workflowgains a
bun run docs:checkstep so CI reaches it.The first commit documents the nineteen declarations TypeDoc flagged —
the existing Oxlint JSDoc rules had already kept the surface almost
fully documented; the second wires the gate and fixes a pre-existing
dependency problem that broke the aggregate (see notes).
Review walkthrough
and tsconfig.typedoc.json:
the surface (
src, expanded), the generated-file and testexclusions, and the scoped compiler view (
skipLibCheck,srconly —
check:typespasses--skipLibCheckon the command line,which TypeDoc cannot see).
(
docs:checkinserted intotest:allaftercheck:types),the Makefile
(
docs-checktarget), and.github/workflows/semantic-lint.yml.
src/application/machines/app.machine.ts
(union discriminants documented per variant),
src/app/observability/logger.ts,
the display-mode provider, the mobile shell, route props, and
src/main.tsx;
the two application barrels convert
@fileheaders to@module.Validation
bun lint,bun check:types,bun run docs:check,bun test,bun run test:a11y,bun run lint:ftl-vars,bun run semantic,make spelling, andbash scripts/e2e.sh(1 passed, with the devserver up and
tokens:buildrun first).AppRoutesPropsinterface makesbun run docs:checkexit 4 namingthe symbol; restoring it returns the gate to green.
docs:checkrun emits no files and no output.Notes
check:types(and thereforetest:all) was already failing onmain: the lockfile pinned a stale transitiveplaywright-core@1.59.1besideplaywright@1.61.1, and theduplicated package made the Playwright
Pagetypes incompatible intests/e2e/a11y.pw.ts. The gate commit bumpsplaywright-coreto1.61.1 so it deduplicates and the aggregate passes end to end.
Replace docstring-coverage with a zero-tolerance TypeDoc gate df12-build#62, Replace the docstring audit with a zero-tolerance TypeDoc gate dakar#5, Add a zero-tolerance TypeDoc documentation gate digitalpuddle#47, and
Add a zero-tolerance TypeDoc documentation gate simulacat-core#58).