refactor(typecheck): add staged wrapper for check:public:docapi#3477
Merged
Conversation
DocAPI parity with SuperDoc. The four check-* scripts previously ran
as a single `&&` chain in root package.json:
cmd1 && cmd2 && cmd3 && cmd4
That gave no per-stage timing, no progress markers, no failure-rerun
hint, and no place to document why each stage exists.
scripts/check-public-docapi.mjs adopts the same shape as
scripts/check-public-contract.mjs:
1. contract-parity - operation IDs / member maps / runtime
shape agree
2. contract-outputs - tracked outputs match the contract;
gitignored outputs built in memory
3. examples - required workflow example headings exist
4. overview-alignment - overview MDX structural correctness
Same display-name convention as the SuperDoc wrapper: plain kebab,
scope-only, no `check-` prefix, no flags-in-names. Cheap-to-expensive
ordering. Re-run hint on failure prints the actual command.
Root package.json change is a one-liner: check:public:docapi now
invokes `node scripts/check-public-docapi.mjs`. `docapi:check`
legacy alias preserved.
Verified:
- pnpm check:public:docapi β PASS, 4 stages, 2.0s
- pnpm check:public β PASS (both wrappers, end-to-end)
- pnpm check:types β PASS
The wrapper reports total elapsed time at the end, not per-stage timing. Match what the script actually prints.
Base automatically changed from
caio-pizzol/SD-typecheck-facade-source-of-truth
to
main
May 24, 2026 14:53
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.
DocAPI parity with the SuperDoc wrapper.
check:public:docapiwas a four-script&&chain in rootpackage.json; it now runs as a staged wrapper with the same shape ascheck:public:superdoc(named stages, progress markers, blurbs, stage headers + final elapsed time, re-run hint on failure).Same display-name rules as PR #3474: plain kebab, scope-only, no
check-prefix, no flags-in-names.Stages
contract-paritypnpm exec tsx packages/document-api/scripts/check-contract-parity.tscontract-outputspnpm exec tsx packages/document-api/scripts/check-contract-outputs.tsexamplespnpm exec tsx packages/document-api/scripts/check-examples.tsoverview-alignmentpnpm exec tsx packages/document-api/scripts/check-overview-alignment.tsCheap-to-expensive ordering: contract drift fails in seconds, before the slower output comparison and doc gates.
What did NOT change
docapi:checklegacy alias: stillpnpm run check:public:docapi.check:publicumbrella: stillcheck:public:superdoc && check:public:docapi.generate:docapinot a prerequisite.Verified
pnpm check:public:docapiβ PASS, 4 stages, 2.0s. All four stages print with the new display names.pnpm check:public(umbrella, both wrappers) β PASS end-to-end.pnpm check:typesβ PASS.Stacked on #3476.
Review: confirm the wrapper docstring lists the 4 stages and the legacy
docapi:checkalias still resolves. AGENTS.md and the README row forcheck:public:docapinow mention the four stage names.