chore(consumer-typecheck): retire check-public-types source-sync gate (SD-3213a)#3396
Merged
Merged
Conversation
caio-pizzol
added a commit
that referenced
this pull request
May 19, 2026
Two doc-only follow-ups in #3396 caught during review: - CONTRIBUTING.md Pull Request Process section still pointed contributors at check-public-types.mjs / check:types:write / the @typedef block in packages/superdoc/src/index.js. Replaced with guidance for the post-SD-3175 canonical gates: facade verifier, root snapshot, closure gate, consumer matrix, and the all-public-types.ts fixture pattern. - deep-type-audit.README.md said the root snapshot locks a '200-name root surface across four sources.' The four sources have different counts (200/200/41/41) and each has its own baseline. Rewrote to reflect that the inventories are locked independently with cross-source mismatches reported as evidence.
… (SD-3213a) After the SD-3212 PR C root types flip, the canonical root contract is `packages/superdoc/src/public/index.ts` (locked by superdoc-root-exports.json, classified by superdoc-root-classification.json, closure-gated by check-root-classification-closure.mjs, structure-verified by verify-public-facade-emit.cjs). The pre-flip source-sync gate (SD-2860, check-public-types.mjs) pointed at the legacy `packages/superdoc/src/index.js` JSDoc typedef block as the source of truth for the public-type assertion list. That source is no longer canonical after the flip; keeping the sync check would teach contributors to update the wrong file. Changes: - Remove tests/consumer-typecheck/check-public-types.mjs. - Remove the check-public-types invocation from typecheck-matrix.mjs (along with the --skip-public-types-check flag, which had no other use). - Remove check:types and check:types:write from tests/consumer-typecheck/package.json. - Update all-public-types.ts header: it is now a STATIC FIXTURE, not a generated artifact. New root exports get a manual import + assertion line. SD-2842 scenarios still exercise the file to catch any-collapses. - Update deep-type-audit.README.md gate inventory to list the current canonical gates (root snapshot, facade verifier, closure gate, deep audit) instead of the retired source-sync gate. Verified locally: - pnpm --filter superdoc build:es: green. - typecheck-matrix.mjs: 57/57 pass. - snapshot-superdoc-root-exports.mjs --check: matches. - check-root-classification-closure.mjs: 0 violations. This is PR A of the SD-3213 gate consolidation track. Stacked on SD-3212 PR C (#3392); merge after PR C.
Two doc-only follow-ups in #3396 caught during review: - CONTRIBUTING.md Pull Request Process section still pointed contributors at check-public-types.mjs / check:types:write / the @typedef block in packages/superdoc/src/index.js. Replaced with guidance for the post-SD-3175 canonical gates: facade verifier, root snapshot, closure gate, consumer matrix, and the all-public-types.ts fixture pattern. - deep-type-audit.README.md said the root snapshot locks a '200-name root surface across four sources.' The four sources have different counts (200/200/41/41) and each has its own baseline. Rewrote to reflect that the inventories are locked independently with cross-source mismatches reported as evidence.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a7f7365a0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
3a7f736 to
53da339
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…(SD-3213a) Codex review on #3396 caught a real coverage gap from retiring the SD-2860 source-sync gate: a future PR could add a type-only root export to src/public/index.ts and the snapshots, pass all gates, and never add an AssertNotAny<NewType> assertion to src/all-public-types.ts. The SD-2842 any-collapse scenarios only fire on names IN the fixture. Adds check-all-public-types-fixture.mjs: - Expected set = classification rows where inDts && !inEsm && !inCjs (= 159 type-only root exports today, irrespective of bucket; legacy-root and internal-candidate type-only symbols stay covered because they remain reachable from the published root). - Actual set = AssertNotAny<X> assertions parsed from src/all-public-types.ts. - Fails on missing OR extra; message names each diff symbol and shows the fix. Wired into typecheck-matrix.mjs before the matrix run, taking the slot the retired check-public-types.mjs used to occupy. Drift-tested both directions (one missing, one extra) — both fail clearly. Doc updates: - CONTRIBUTING.md adds the new gate to the public-API checklist. - src/all-public-types.ts header explains the new gate and what triggers it. Net change in coverage: SAME as pre-SD-3213a (159 type-only root exports each get an any-collapse assertion). The difference is the source of truth for 'what should be covered': it is now the classification artifact, not packages/superdoc/src/index.js's typedef block.
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.
Draft, stacked on #3392 (SD-3212 PR C root types flip). First sub-PR of the SD-3213 gate consolidation track.
Why now: after PR C flips root types to
dist/superdoc/src/public/index.d.ts, the canonical root contract ispackages/superdoc/src/public/index.ts— locked by the SD-3212 A0 snapshot, classified by A1, closure-gated by A1b, structure-verified by the facade verifier. The pre-flip source-sync gate (SD-2860,check-public-types.mjs) pointed at the legacypackages/superdoc/src/index.jsJSDoc typedef block. Keeping that gate teaches contributors to update the wrong file.Changes (5 files, +39 / -187):
tests/consumer-typecheck/check-public-types.mjs(153 lines).typecheck-matrix.mjs: remove the source-sync invocation block +--skip-public-types-checkflag (no other use). Add comment explaining the new canonical source of truth.tests/consumer-typecheck/package.json: removecheck:typesandcheck:types:writescripts.src/all-public-types.ts: update header — file is now a STATIC FIXTURE, not generated. Manual import + assertion line per new root export. SD-2842 scenarios still exercise it for any-collapse detection.deep-type-audit.README.md: update the gate inventory to list the current canonical gates (root snapshot, facade verifier, closure gate, deep audit) and note SD-2860's retirement.What stays the same:
all-public-types.tsstays as a fixture; the SD-2842 "all public types are real" matrix scenarios still exercise it.Verified locally:
pnpm --filter superdoc build:es: green.typecheck-matrix.mjs: 57/57 scenarios pass.snapshot-superdoc-root-exports.mjs --check: matches.check-root-classification-closure.mjs: 0 violations.SD-3213 track:
Related: