Skip to content

Commit b33898f

Browse files
committed
wip: declare the new gate in the published-files and export-surface registries
Claude-Session: https://claude.ai/code/session_019srGWGCBBCBHqcDoRZpQRh Co-authored-by: Claude <noreply@anthropic.com>
1 parent ee17684 commit b33898f

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎scripts/check-published-files.mjs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ const EXTRA_ENTRIES = {
246246
'The Zod schemas are themselves the contract (Prime Directive #1); downstream code imports them directly, so these sources are product rather than build input. Narrowed to *.zod.ts so no test or helper rides along.',
247247
'api-surface':
248248
'Export snapshot used by downstream compatibility checks — one file per published entry point since #5837.',
249+
'api-surface-declarations':
250+
'The same snapshot one axis deeper (#16045): the .d.ts declaration TEXT of every export, per entry point, so a compatibility check reading two published tarballs can see WHICH declared shape moved between releases and not merely which names survived — the question api-surface cannot answer. 12 MiB of text, 1.02 MiB of the tarball.',
249251
'spec-changes.json': 'Machine-readable spec change log driving the upgrade guide.',
250252
},
251253
};

‎scripts/pm/dispatch-gates.mjs‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23763,15 +23763,31 @@ function selfTest() {
2376323763
// filter is `packages/**` and already covered them; it gains the right
2376423764
// PROVENANCE, and it is what this case exists to keep honest.
2376523765
const CLASS_SEVENTH = 'check:dual-build-cjs-loads';
23766+
// ⭐ THE EIGHTH, and it is the same question answered a second time by a gate
23767+
// that did not exist when the seventh was recorded. `check:api-surface-declarations`
23768+
// (#16045) walks the spec `exports` map to the packed `.d.ts` of every entry
23769+
// point and snapshots the declaration text it finds there, so that export
23770+
// surface is its subject in exactly the sense the six and the seventh are. It
23771+
// is declared here for one reason: the edge ALREADY gave it a population on
23772+
// the run that landed it, before any list named it — which is the ruling's
23773+
// question ("does the next gate of this class get covered automatically")
23774+
// answered live for a second time, by a family nobody wired in.
23775+
const CLASS_EIGHTH = 'check:api-surface-declarations';
2376623776
t(
2376723777
`and every family the edge gives a population to really re-derives from an export surface` +
2376823778
` (${[...new Set(manifestInherited.map(([c]) => c))].join(' · ') || 'none'})`,
23769-
manifestInherited.every(([c]) => EXPORT_SURFACE_SIX.includes(c) || c === CLASS_SEVENTH),
23779+
manifestInherited.every(
23780+
([c]) => EXPORT_SURFACE_SIX.includes(c) || c === CLASS_SEVENTH || c === CLASS_EIGHTH,
23781+
),
2377023782
);
2377123783
t(
2377223784
`⭐ and a SEVENTH live gate the card never named is covered by the same edge (${CLASS_SEVENTH})`,
2377323785
manifestInherited.some(([c]) => c === CLASS_SEVENTH),
2377423786
);
23787+
t(
23788+
`⭐ …and an EIGHTH, added after that reading was taken (${CLASS_EIGHTH})`,
23789+
manifestInherited.some(([c]) => c === CLASS_EIGHTH),
23790+
);
2377523791

2377623792
// Additive BY CONSTRUCTION, the claim the wiring comment makes: the manifest
2377723793
// edge appends AFTER own, imported and run hints, so it can only fill a hole.

0 commit comments

Comments
 (0)