Skip to content

ci(types): collapse matrix + audit CI steps into check:public-contract (SD-673 Phase 1)#3450

Merged
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/SD-673-phase1-check-public-contract-ci
May 22, 2026
Merged

ci(types): collapse matrix + audit CI steps into check:public-contract (SD-673 Phase 1)#3450
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/SD-673-phase1-check-public-contract-ci

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

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 (scripts/check-public-contract.mjs):

  • Reordered stages: typecheck-matrix now runs before deep-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 --pack of its own. Drops one pack + install per invocation. Local full-run time: 199s → 135s.
  • Reuse is achieved by ordering (matrix before audit), so no separate --reuse-install flag is needed. Earlier sketch considered --reuse-install alongside --skip-build; the ordering approach turned out cleaner.
  • New --skip-build flag. CI's existing Build step already runs pnpm run build; the wrapper must not re-build. Local users get the full from-scratch behavior by default.
  • Skip output reports N ran, M skipped so CI logs make the skip explicit.

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)pnpm check:public-contract --skip-build
  • Net: 10 named CI steps → 9.

Why 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)
  • Clean-state test: removed tests/consumer-typecheck/node_modules/superdoc AND packages/superdoc/superdoc.tgz, then ran pnpm 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.

…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)
@caio-pizzol caio-pizzol requested a review from a team as a code owner May 22, 2026 16:45
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 22, 2026

SD-673

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol caio-pizzol merged commit d3b97cf into main May 22, 2026
18 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/SD-673-phase1-check-public-contract-ci branch May 22, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants