feat(scripts): add check:public-contract wrapper command (SD-3256 Phase 1)#3445
Merged
caio-pizzol merged 1 commit intoMay 22, 2026
Merged
Conversation
…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.
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.
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:superdoccd tests/consumer-typecheck && node deep-type-audit.mjs --pack --strict-supported-rootcd tests/consumer-typecheck && node typecheck-matrix.mjsThis wrapper orchestrates them as one:
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.mdupdated with a one-line entry that documents the runtime (~3 min) and scopes the command (validates the public type surface, not a replacement forpnpm testorpnpm build).Verified:
pnpm check:public-contract→ PASS (3 stages, 189s) on post-SD-2980 main.