Skip to content

feat(scripts): add check:public-contract wrapper command (SD-3256 Phase 1)#3445

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

feat(scripts): add check:public-contract wrapper command (SD-3256 Phase 1)#3445
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/SD-3256-phase1-check-public-contract-wrapper

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

One command for "is the public type contract healthy?" This does not add a new validator or change any pass/fail rule; it only gives the existing checks one entry point.

Today, validating the published superdoc public type surface requires three separate invocations across two working directories:

  • pnpm run build:superdoc
  • cd tests/consumer-typecheck && node deep-type-audit.mjs --pack --strict-supported-root
  • cd tests/consumer-typecheck && node typecheck-matrix.mjs

This wrapper orchestrates them as one:

  • Section headers per stage
  • Fail-fast (the real error stays visible)
  • PASS / FAIL summary with elapsed time at the end
  • On FAIL: prints the exact command to re-run the failing stage for iteration
  • Zero behavior change for the validators themselves; pure DX

Phase 1 of the SD-3256 umbrella (public-contract consolidation + ./super-editor facade curation). Phase 1 deliberately adds no new enforcement and no config changes. Phases 2-4 (tier metadata on type-surface.config.cjs, ./super-editor facade curation, ratchet for new public/legacy code) are tracked under SD-3256 and need design / team alignment before implementation.

AGENTS.md updated with a one-line entry that documents the runtime (~3 min) and scopes the command (validates the public type surface, not a replacement for pnpm test or pnpm build).

Verified: pnpm check:public-contract → PASS (3 stages, 189s) on post-SD-2980 main.

…se 1)

Today, validating the published superdoc public type surface requires
three separate invocations across different working directories:

  pnpm run build:superdoc
  cd tests/consumer-typecheck && node deep-type-audit.mjs --pack --strict-supported-root
  cd tests/consumer-typecheck && node typecheck-matrix.mjs

This wrapper orchestrates them as one command:

  pnpm check:public-contract

Behavior:

- Runs each stage in order, prints a section header per stage
- Fails fast on the first failure so the real error stays visible
- Prints a PASS / FAIL summary with elapsed time at the end
- On FAIL, prints the exact command to re-run the failing stage for
  iteration
- Zero behavior change for the validators themselves; pure DX

Phase 1 of the SD-3256 umbrella (public-contract consolidation +
./super-editor facade curation). Phase 1 deliberately adds no new
enforcement and no config changes; it just collapses three invocations
into one obvious entry point. Phases 2-4 (tier metadata,
./super-editor facade, ratchet) are tracked separately under SD-3256
and need design / team alignment before implementation.

Verified locally: pnpm check:public-contract → PASS (3 stages, 189s)
on post-SD-2980 main. Each stage's exit code is preserved.
@caio-pizzol caio-pizzol requested a review from a team as a code owner May 22, 2026 13:55
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 22, 2026

SD-3256

@caio-pizzol caio-pizzol merged commit 04a77bc into main May 22, 2026
30 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/SD-3256-phase1-check-public-contract-wrapper branch May 22, 2026 13:56
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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