ci(types): collapse matrix + audit CI steps into check:public-contract (SD-673 Phase 1)#3450
Merged
caio-pizzol merged 1 commit intoMay 22, 2026
Conversation
…t (SD-673 Phase 1) Makes `pnpm check:public-contract` the single official path for public-type validation, locally and in CI. **No coverage change**: exactly the same scenarios run; only the orchestration changes. Wrapper changes: - Reordered stages so `typecheck-matrix` runs BEFORE `deep-type-audit`. Matrix packs and installs the superdoc tarball into the consumer fixture as part of its normal run; the audit then reuses that install instead of doing a redundant `--pack` of its own. Drops one pack + install per invocation. Local full-run time: 199s → 135s. - New `--skip-build` flag. CI's existing Build step already runs `pnpm run build` (= `build:superdoc && type-check`); the wrapper must not re-build. Local users get the full from-scratch behavior by default. - Skip output now reports `N ran, M skipped` so CI logs make the skip explicit instead of silently dropping a stage. CI changes (`.github/workflows/ci-superdoc.yml`): - Removed: `Consumer typecheck (matrix)` step - Removed: `Deep public-type audit (supported-root strict, SD-3213e)` step - Added: `Public-contract check (matrix + supported-root strict audit)` which runs `pnpm check:public-contract --skip-build`. Single step, identical coverage. Net: 10 named CI steps → 9. Why now: SD-3256 Phase 1 shipped the wrapper but only as a DX tool. SD-673 Phase 1 makes it the load-bearing CI path so "is the public contract healthy?" has exactly one command answer, locally and in CI. Future phases (additional stages, stricter gates) extend one wrapper instead of duplicating CI yaml. Verified locally: pnpm check:public-contract → PASS (3 stages, 135.6s) pnpm check:public-contract --skip-build → PASS (2 ran, 1 skipped, 97.9s)
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Makes
pnpm check:public-contractthe single official path for public-type validation, locally and in CI. No coverage change. Exactly the same scenarios run; only the orchestration changes.Wrapper changes (
scripts/check-public-contract.mjs):typecheck-matrixnow runs beforedeep-type-audit. Matrix packs + installs the tarball into the consumer fixture as part of its normal run; the audit then reuses that install instead of doing a redundant--packof its own. Drops one pack + install per invocation. Local full-run time: 199s → 135s.--reuse-installflag is needed. Earlier sketch considered--reuse-installalongside--skip-build; the ordering approach turned out cleaner.--skip-buildflag. CI's existing Build step already runspnpm run build; the wrapper must not re-build. Local users get the full from-scratch behavior by default.N ran, M skippedso CI logs make the skip explicit.CI changes (
.github/workflows/ci-superdoc.yml):Consumer typecheck (matrix)stepDeep public-type audit (supported-root strict, SD-3213e)stepPublic-contract check (matrix + supported-root strict audit)→pnpm check:public-contract --skip-buildWhy now: SD-3256 Phase 1 shipped the wrapper as a DX tool. This makes it the load-bearing CI path so "is the public contract healthy?" has exactly one command answer, locally and in CI. Future phases extend one wrapper instead of duplicating CI yaml.
Verified locally:
pnpm check:public-contract→ PASS (3 stages, 135.6s)pnpm check:public-contract --skip-build→ PASS (2 ran, 1 skipped, 97.9s)tests/consumer-typecheck/node_modules/superdocANDpackages/superdoc/superdoc.tgz, then ranpnpm check:public-contract --skip-build→ PASS (98.4s). Confirms matrix correctly bootstraps the install for the audit; no reliance on stale state from previous runs.