@@ -16,17 +16,21 @@ import { findProvenanceKindViolations, requiredProvenanceKind } from './provenan
1616const CORPUS_DIR = fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
1717
1818/**
19- * Every historical surface the corpus exists to hold still. A coverage tag with
20- * no entry means the corpus stopped covering a compat surface #1417 named.
19+ * Every historical surface the corpus exists to hold still. Keyed by the coverage
20+ * union so the typechecker — not a hand-kept list — forces a new surface to be
21+ * required here; a tag with no entry means the corpus stopped covering a compat
22+ * surface #1417 named.
2123 */
22- const REQUIRED_COVERAGE : ReplayCompatCoverage [ ] = [
23- 'context-header' ,
24- 'env-vars' ,
25- 'quoting' ,
26- 'retired-gesture' ,
27- 'target-annotation' ,
28- 'wait-landmark' ,
29- ] ;
24+ const REQUIRED_COVERAGE_KEYS : Record < ReplayCompatCoverage , true > = {
25+ 'context-header' : true ,
26+ 'env-vars' : true ,
27+ quoting : true ,
28+ 'retired-gesture' : true ,
29+ 'target-annotation' : true ,
30+ 'wait-landmark' : true ,
31+ } ;
32+
33+ const REQUIRED_COVERAGE = Object . keys ( REQUIRED_COVERAGE_KEYS ) as ReplayCompatCoverage [ ] ;
3034
3135function readCorpusScript ( entry : ReplayCompatEntry ) : Buffer {
3236 return readFileSync ( join ( CORPUS_DIR , entry . file ) ) ;
@@ -133,6 +137,10 @@ describe('replay-compat corpus', () => {
133137 // say which form or refusal it is the sole witness of, and the count stays a
134138 // reviewable set of deliberate entries rather than a mirror of the replay
135139 // fixtures. Raising the ceiling is allowed; doing it silently is not.
140+ //
141+ // 30 is headroom over the 22 witnesses the shipped grammar needs today: enough
142+ // for the next few retirements without another pruning pass, small enough that
143+ // a re-mirrored fixture tree (52 entries at first cut) cannot land quietly.
136144 test ( 'every entry states why it exists, and the corpus stays small' , ( ) => {
137145 for ( const entry of REPLAY_COMPAT_CORPUS ) {
138146 expect ( entry . note . trim ( ) , entry . id ) . not . toBe ( '' ) ;
0 commit comments