mustflow 2.116.1 → 2.116.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/package.json +1 -1
  2. package/templates/default/i18n.toml +72 -6
  3. package/templates/default/locales/en/.mustflow/skills/INDEX.md +37 -11
  4. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/SKILL.md +477 -0
  5. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-diagnostics-abi-linker-checklist.md +778 -0
  6. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-generators-properties-checklist.md +501 -0
  7. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-test-strategy-differential-checklist.md +498 -0
  8. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/debug-symbol-symbolication-checklist.md +412 -0
  9. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/ir-design-ssa-pass-pipeline-checklist.md +759 -0
  10. package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/miscompile-reduction-ir-checklist.md +434 -0
  11. package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/SKILL.md +55 -36
  12. package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/references/path-containment-handle-checklist.md +251 -0
  13. package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/SKILL.md +133 -32
  14. package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/references/file-upload-parser-ssrf-resource-checklist.md +306 -0
  15. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/SKILL.md +310 -0
  16. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-concurrency-model-checking-smt-checklist.md +457 -0
  17. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-contracts-modeling-checklist.md +434 -0
  18. package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-memory-bounds-ci-checklist.md +509 -0
  19. package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/SKILL.md +439 -0
  20. package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-harness-campaign-checklist.md +379 -0
  21. package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-oracle-triage-ci-checklist.md +307 -0
  22. package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/SKILL.md +48 -28
  23. package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/references/operation-ordering-stale-write-checklist.md +259 -0
  24. package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/SKILL.md +329 -0
  25. package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/references/input-boundary-security-checklist.md +319 -0
  26. package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/SKILL.md +306 -0
  27. package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/input-session-state-checklist.md +298 -0
  28. package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/remote-input-transport-interaction-checklist.md +328 -0
  29. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/SKILL.md +353 -0
  30. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-diagnostics-recovery-checklist.md +267 -0
  31. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-execution-closure-performance-checklist.md +428 -0
  32. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-gc-verification-checklist.md +457 -0
  33. package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-semantics-runtime-checklist.md +391 -0
  34. package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/SKILL.md +294 -0
  35. package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/modal-loop-reentrancy-checklist.md +290 -0
  36. package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/nested-modal-state-lifetime-checklist.md +297 -0
  37. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/SKILL.md +252 -0
  38. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/dns-network-resolution-checklist.md +394 -0
  39. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/language-symbol-resolution-checklist.md +282 -0
  40. package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/module-package-loader-resolution-checklist.md +352 -0
  41. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/SKILL.md +103 -17
  42. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/cst-ast-lowering-checklist.md +260 -0
  43. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/lexer-tokenization-checklist.md +397 -0
  44. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-serialization-compatibility-checklist.md +164 -0
  45. package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-traversal-rewrite-checklist.md +209 -0
  46. package/templates/default/locales/en/.mustflow/skills/race-condition-review/SKILL.md +68 -11
  47. package/templates/default/locales/en/.mustflow/skills/race-condition-review/references/race-reproduction-memory-model-checklist.md +268 -0
  48. package/templates/default/locales/en/.mustflow/skills/routes.toml +151 -0
  49. package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/SKILL.md +343 -0
  50. package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-auth-stream-resume-checklist.md +413 -0
  51. package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-handoff-protocol-checklist.md +485 -0
  52. package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/SKILL.md +267 -0
  53. package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/admission-decision-recovery-checklist.md +308 -0
  54. package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/two-phase-transition-checklist.md +229 -0
  55. package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/SKILL.md +300 -0
  56. package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-affinity-event-loop-checklist.md +277 -0
  57. package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-dispatch-lifecycle-checklist.md +292 -0
  58. package/templates/default/manifest.toml +115 -1
@@ -0,0 +1,498 @@
1
+ # Compiler Test Strategy and Differential Checklist
2
+
3
+ Use this checklist when a compiler test suite, feature-interaction plan, differential matrix,
4
+ determinism lane, corpus policy, or change-gate, periodic, canary, and release evidence plan is in
5
+ scope.
6
+
7
+ ## Contents
8
+
9
+ 1. [Semantic-distance and oracle-cost ladder](#semantic-distance-and-oracle-cost-ladder)
10
+ 2. [Stage boundary contracts](#stage-boundary-contracts)
11
+ 3. [Oracle separation](#oracle-separation)
12
+ 4. [Feature-interaction grid](#feature-interaction-grid)
13
+ 5. [Execution lanes](#execution-lanes)
14
+ 6. [Verifier placement](#verifier-placement)
15
+ 7. [Snapshot scope](#snapshot-scope)
16
+ 8. [Corpus classes](#corpus-classes)
17
+ 9. [Failure capsule, reduction, and deduplication](#failure-capsule-reduction-and-deduplication)
18
+ 10. [Transformation activation coverage](#transformation-activation-coverage)
19
+ 11. [Oracle sensitivity checks](#oracle-sensitivity-checks)
20
+ 12. [Determinism perturbation](#determinism-perturbation)
21
+ 13. [Cadence and failure budgets](#cadence-and-failure-budgets)
22
+ 14. [Implementation lineage map](#implementation-lineage-map)
23
+ 15. [Option and execution-tier lattice](#option-and-execution-tier-lattice)
24
+ 16. [Cross-target differential](#cross-target-differential)
25
+ 17. [Frontend differential](#frontend-differential)
26
+ 18. [Canonical execution outcome](#canonical-execution-outcome)
27
+ 19. [Runtime input vectors](#runtime-input-vectors)
28
+ 20. [Definedness and permitted variation](#definedness-and-permitted-variation)
29
+ 21. [Input-related differential relations](#input-related-differential-relations)
30
+ 22. [First-divergence evidence](#first-divergence-evidence)
31
+ 23. [Discrepancy classification](#discrepancy-classification)
32
+ 24. [Failure matrix](#failure-matrix)
33
+ 25. [Invariants](#invariants)
34
+ 26. [Skill handoffs](#skill-handoffs)
35
+
36
+ ## Semantic-distance and oracle-cost ladder
37
+
38
+ Do not copy a generic unit-to-end-to-end pyramid without mapping compiler semantics. Arrange test
39
+ lanes by distance from the violated contract and cost of deciding correctness.
40
+
41
+ | Lane | Typical scope | Primary oracle | Localization distance |
42
+ | --- | --- | --- | --- |
43
+ | Local algorithm | Arena, graph, bitset, solver primitive | Data-structure invariant or reference algorithm | Very short |
44
+ | Stage regression | One parser rule, type rule, transform, verifier, or lowering | Boundary contract and minimal fixture | Short |
45
+ | Pipeline integration | Several adjacent stages | Persisted artifacts and stage relations | Medium |
46
+ | Whole-program execution | Compile, link, load, run | Defined semantic outcome | Long |
47
+ | Differential or metamorphic | Several implementations, modes, or related inputs | Independent authority or relation | Variable |
48
+ | Generated campaign | Broad state exploration | Stable property or divergence identity | Variable |
49
+ | Real-project compatibility | Build graph, libraries, macros, LTO, runtime | Project tests, ABI, artifact, and behavior evidence | Very long |
50
+
51
+ Use the cheapest lane that can falsify the claim, but keep higher-distance evidence when the defect
52
+ requires cross-stage, ABI, target, or real-build interaction. A large count of cheap tests does not
53
+ replace a missing semantic execution or cross-producer oracle.
54
+
55
+ ## Stage boundary contracts
56
+
57
+ For every exposed boundary from source through linked image, record:
58
+
59
+ - producer and consumer;
60
+ - serialized or in-memory artifact identity;
61
+ - structural verifier;
62
+ - semantic relation to the prior artifact;
63
+ - normalized representation for stable comparison;
64
+ - supported invalid-input lane;
65
+ - source and diagnostic mapping;
66
+ - target, feature, and data-layout assumptions;
67
+ - stage-local fixture ownership;
68
+ - evidence needed to replay without upstream stages.
69
+
70
+ Typical contracts include monotonic token ranges, well-formed syntax, typed expressions, resolved
71
+ bindings, valid CFG and SSA, dominance and use-def agreement, preserved analyses, legal machine
72
+ operands, correct object metadata, resolved symbols, and defined runtime observation.
73
+
74
+ Do not freeze a complete dump when a smaller invariant or semantic relation owns the behavior. Do
75
+ not skip boundary checks merely because the final executable happens to run correctly.
76
+
77
+ ## Oracle separation
78
+
79
+ Keep these oracle classes independent:
80
+
81
+ - acceptance or rejection;
82
+ - stable diagnostic identity, source, cause, and recovery;
83
+ - semantic execution result and side effects;
84
+ - normalized IR, machine, object, or link structure;
85
+ - code size, compile time, runtime performance, or resource use;
86
+ - deterministic or reproducible output;
87
+ - transformation activation and rejection reason;
88
+ - ABI or binary compatibility.
89
+
90
+ A single fixture may participate in several lanes, but its assertions should not force unrelated
91
+ oracles to share one brittle snapshot. Diagnostic wording must not invalidate a code-generation
92
+ oracle. Register allocation churn must not invalidate a semantic execution oracle. A performance
93
+ threshold must not masquerade as correctness.
94
+
95
+ ## Feature-interaction grid
96
+
97
+ Compiler failures cluster where features intersect. Build axes from the actual language and
98
+ pipeline, such as:
99
+
100
+ - semantic type and generic form;
101
+ - nullable, ownership, lifetime, or effect state;
102
+ - control-flow and exception shape;
103
+ - storage class, address space, alignment, and alias relation;
104
+ - call form, dispatch, inlining, and recursion;
105
+ - optimization level and pass family;
106
+ - integer width, vector width, and floating-point mode;
107
+ - ABI, target, CPU feature, code model, and relocation model;
108
+ - LTO, profile data, incremental cache, and module mode.
109
+
110
+ Use pairwise or another bounded covering design for ordinary changes. Add high-risk tuples from
111
+ the changed pass, previous defects, and unsupported boundaries. Keep the full product out of change
112
+ gates unless a repository-owned budget supports it.
113
+
114
+ Every selected combination needs an oracle. Counting combinations that merely compile or execute a
115
+ pass is not semantic coverage.
116
+
117
+ ## Execution lanes
118
+
119
+ Separate at least the lanes that own different failure boundaries:
120
+
121
+ 1. syntax and semantic check only;
122
+ 2. compiler IR production;
123
+ 3. optimized IR production;
124
+ 4. machine or target IR production;
125
+ 5. object emission;
126
+ 6. link only;
127
+ 7. native execution;
128
+ 8. emulated, simulated, or remote execution;
129
+ 9. whole-program or link-time optimization;
130
+ 10. profile generation and profile-use recompilation;
131
+ 11. binary-compatibility or cross-version loading.
132
+
133
+ Do not attach link and execution cost to a frontend rejection test. Do not claim optimizer, ABI, or
134
+ runtime correctness from compile-only evidence. Persist the artifact at the earliest lane whose
135
+ contract fails.
136
+
137
+ ## Verifier placement
138
+
139
+ Run the owning verifier immediately after every mutation and transform in assertion-heavy,
140
+ generated, or deep validation lanes. Check structural IR, CFG, SSA, type, effect, analysis,
141
+ machine-operand, frame, object, and link invariants at their first observable boundary.
142
+
143
+ Separate:
144
+
145
+ - parseability;
146
+ - structural validity;
147
+ - defined semantics;
148
+ - refinement or equivalence;
149
+ - current analysis state;
150
+ - final execution behavior.
151
+
152
+ A later pass can accidentally repair malformed state or merely crash after the original corruption.
153
+ Immediate verification shortens the evidence path. Final-verifier-only success is not proof that
154
+ every intermediate artifact respected its contract.
155
+
156
+ ## Snapshot scope
157
+
158
+ Use full snapshots only when complete textual or binary presentation is itself the contract, such
159
+ as selected user diagnostics, declared public IR syntax, ABI text, or stable debug rendering.
160
+
161
+ For other behavior prefer:
162
+
163
+ - parsed structural assertions;
164
+ - normalized IR relations;
165
+ - required and forbidden patterns;
166
+ - object metadata fields;
167
+ - selected link graph facts;
168
+ - canonical semantic outcomes;
169
+ - stable property identifiers.
170
+
171
+ Avoid full AST, IR, assembly, or object snapshots when harmless naming, scheduling, instruction
172
+ selection, register allocation, section ordering, or formatting changes are permitted. A snapshot
173
+ that detects every refactor teaches maintainers to update evidence blindly.
174
+
175
+ ## Corpus classes
176
+
177
+ Keep corpus purposes physically or logically distinct:
178
+
179
+ | Class | Purpose | Retention rule |
180
+ | --- | --- | --- |
181
+ | Specification or conformance | Cover declared language and target rules | Stable, curated, traceable to contract |
182
+ | Minimized regression | Preserve one explained historical defect | Exact predicate and earliest owning stage |
183
+ | Generated discovery | Grow exploration and activation | Evolving, instrumentation or generator versioned |
184
+ | Real-project compatibility | Exercise build graph, ecosystem, ABI, and scale | Versioned project snapshot and license boundary |
185
+
186
+ Do not let coverage minimization delete a semantic regression it cannot observe. Do not treat an
187
+ untriaged generated artifact as a curated regression. Do not mix real customer or private source
188
+ into public corpora without provenance, privacy, and license authority.
189
+
190
+ For a fixed bug, build a bounded neighborhood by varying the proven trigger dimensions: type,
191
+ constant, loop shape, alias relation, option, target feature, or input vector. Keep the original
192
+ minimal predicate visible.
193
+
194
+ ## Failure capsule, reduction, and deduplication
195
+
196
+ Capture:
197
+
198
+ - input and runtime data;
199
+ - compiler and subordinate tool revisions;
200
+ - complete option, target, feature, and link closure;
201
+ - environment and determinism variables;
202
+ - baseline and candidate canonical outcomes;
203
+ - pass trace and earliest divergent artifact;
204
+ - stable assertion, invariant, property, or divergence identity;
205
+ - timeout and resource policy;
206
+ - original and minimized forms.
207
+
208
+ The reducer predicate must preserve the original class. A wrong result that becomes a crash,
209
+ frontend rejection, timeout, verifier failure, or different stage divergence is not the same bug.
210
+
211
+ Deduplicate with earliest failing stage, invariant or property ID, pass instance, semantic outcome,
212
+ and minimized structural shape. Source hash or final crash stack alone is too weak: one corrupt state
213
+ can crash at several later sites, and one assertion site can receive several distinct corrupt states.
214
+
215
+ ## Transformation activation coverage
216
+
217
+ Executed pass code is not proof that its transform fired. Record bounded semantic feedback such as:
218
+
219
+ - pass and rewrite identity;
220
+ - trigger matched, declined, or blocked;
221
+ - stable decline reason;
222
+ - source and target opcode or operation kinds;
223
+ - integer and vector widths;
224
+ - loop depth and control shape;
225
+ - alias, range, dominance, memory, or cost decision;
226
+ - target feature and code-model state;
227
+ - inlining, unrolling, vectorization, legalization, or instruction-selection outcome.
228
+
229
+ Keep activation feedback low-cardinality and versioned. A rewrite count without a result oracle still
230
+ cannot prove correctness, but it exposes dead zones where line coverage claims success while every
231
+ interesting pattern is rejected.
232
+
233
+ ## Oracle sensitivity checks
234
+
235
+ Measure whether tests can detect plausible compiler defects, not only whether compiler code ran.
236
+ Use repository-owned negative controls or mutation operators where practical:
237
+
238
+ - invert a comparison condition;
239
+ - drop a side effect;
240
+ - change an alias or range result;
241
+ - skip invalidation;
242
+ - swap an operand or successor;
243
+ - corrupt a relocation or ABI classification;
244
+ - suppress one diagnostic relation.
245
+
246
+ The injected defect must be bounded, reviewable, and tied to the target oracle. Do not report a
247
+ global mutation score as proof of compiler correctness. Use surviving mutations to identify blind
248
+ oracles or unreachable generators.
249
+
250
+ ## Determinism perturbation
251
+
252
+ Vary permitted environmental and scheduling inputs instead of repeating one frozen process:
253
+
254
+ - hash or map seed;
255
+ - worker and thread count;
256
+ - task and pass schedule;
257
+ - file discovery and object order;
258
+ - temporary root, path length, and remapped path;
259
+ - locale and timezone;
260
+ - source timestamp and build metadata policy;
261
+ - incremental and persistent cache state;
262
+ - profile record order;
263
+ - allocator or address layout when it should be unobservable.
264
+
265
+ Compare normalized IR, object metadata, diagnostics, link result, or executable outcome according to
266
+ the product contract. Normalize only declared noise such as timestamp, remapped path, address, or
267
+ build identity. Do not normalize symbol order, section facts, diagnostic ownership, serialization,
268
+ or semantic output when they are expected to be stable.
269
+
270
+ ## Cadence and failure budgets
271
+
272
+ Assign lanes by cost, flakiness, and diagnostic distance:
273
+
274
+ - change gate: stage verifiers, affected feature combinations, minimized regressions, bounded
275
+ generator or property replay;
276
+ - periodic lane: broader option and target matrices, generated exploration, assertion-heavy or
277
+ sanitizer builds, determinism perturbation;
278
+ - canary lane: selected real projects, shadow compilation, backend or toolchain candidates;
279
+ - release lane: supported target, ABI, LTO, compatibility, project, size, and performance evidence.
280
+
281
+ Each lane needs a time, memory, artifact, retry, and ownership budget plus a stop or quarantine
282
+ policy. Do not move an unbounded campaign or real-project fleet into a change gate because a defect
283
+ felt important. Do not call an omitted high-cost lane passed.
284
+
285
+ ## Implementation lineage map
286
+
287
+ For every compared implementation or mode, record shared ancestry:
288
+
289
+ - frontend and parser;
290
+ - semantic or type checker;
291
+ - source and target IR;
292
+ - optimizer and analysis libraries;
293
+ - code generator;
294
+ - assembler and linker;
295
+ - runtime, standard library, numeric helpers, and allocator;
296
+ - reference model or interpreter.
297
+
298
+ Several executables that share the same optimizer or backend are not independent votes. Group
299
+ results by lineage and seek a specification, independent model, translation validator, executable
300
+ property, or meaning-preserving relation before assigning fault.
301
+
302
+ ## Option and execution-tier lattice
303
+
304
+ Compare more than named optimization levels. Build a bounded lattice from:
305
+
306
+ - no optimization through aggressive and size modes;
307
+ - individual pass or pipeline groups;
308
+ - vectorization, inlining, alias, math, overflow, and exception modes;
309
+ - profile generation and use;
310
+ - full and thin whole-program optimization;
311
+ - previous stable, current, and candidate revisions;
312
+ - alternative backend paths;
313
+ - interpreter, baseline, optimizing, JIT, and AOT tiers;
314
+ - warm-up count, tier transition, deoptimization, and inline-cache state.
315
+
316
+ Do not treat one low-optimization mode as absolute truth. It is a comparison signal unless the
317
+ language or a separate reference makes it authoritative. For tiered systems, repeat inputs across
318
+ transition points and compare the entire result vector.
319
+
320
+ ## Cross-target differential
321
+
322
+ Cross-target execution can expose legalization, instruction selection, register allocation, object,
323
+ and ABI defects only after permitted target differences are controlled.
324
+
325
+ Start with a portable observation subset:
326
+
327
+ - fixed-width values;
328
+ - explicit byte order;
329
+ - specified alignment;
330
+ - stable floating-point mode;
331
+ - no address or target-width observation;
332
+ - controlled runtime and I/O;
333
+ - equivalent external libraries.
334
+
335
+ Then add target-specific relations for pointer width, endianness, aggregate layout, calling
336
+ convention, long floating formats, and implementation-defined source behavior. Distinguish host
337
+ structural validation, emulator or simulator execution, remote runner, and real hardware evidence.
338
+
339
+ ## Frontend differential
340
+
341
+ Compare structured decisions rather than raw text:
342
+
343
+ - accepted or rejected;
344
+ - semantic or diagnostic category;
345
+ - primary and related source ranges;
346
+ - selected overload, type, effect, or constraint result;
347
+ - recovered structure and bounded cascade count;
348
+ - extension or language-mode capability;
349
+ - typed or semantic IR relation.
350
+
351
+ Use a capability table for intentional implementation extensions. Do not compare a standard mode
352
+ against an extension mode and call every difference a defect. If implementations accept the same
353
+ source but produce different typed meaning, preserve the first semantic boundary.
354
+
355
+ ## Canonical execution outcome
356
+
357
+ Compare a stable semantic envelope rather than stdout alone:
358
+
359
+ - compilation, link, load, and execution terminal classes;
360
+ - return value and selected globals;
361
+ - logical heap or aggregate state;
362
+ - exception or signal category under the declared source contract;
363
+ - ordered external effects;
364
+ - volatile or otherwise protected checksums where valid;
365
+ - stable diagnostics for rejected inputs;
366
+ - ABI, object, or link observations when part of the claim.
367
+
368
+ Exclude raw addresses, allocator layout, permitted unordered state, host paths, timestamps, and
369
+ other representation facts unless the contract exposes them. Preserve raw results beside the
370
+ canonical envelope so normalization remains auditable.
371
+
372
+ ## Runtime input vectors
373
+
374
+ One generated program with one runtime input explores too little. Generate or select a bounded
375
+ vector covering relevant branches and boundaries:
376
+
377
+ - zero, one, negative one;
378
+ - signed and unsigned extrema;
379
+ - bit-width, shift, and overflow boundaries;
380
+ - equal and unequal aliases;
381
+ - null and non-null where defined;
382
+ - empty, singleton, short, and longer arrays;
383
+ - true and false control paths;
384
+ - exception and non-exception paths;
385
+ - target-specific legal boundary values.
386
+
387
+ Compare the whole outcome vector. Preserve inputs that reach new semantic branches or change the
388
+ first divergent observation. Do not include values that make the source or IR meaning undefined.
389
+
390
+ ## Definedness and permitted variation
391
+
392
+ Classify separately:
393
+
394
+ - undefined behavior;
395
+ - unspecified behavior;
396
+ - implementation-defined behavior;
397
+ - floating-point relation and tolerance;
398
+ - target ABI variation;
399
+ - nondeterministic language or runtime behavior;
400
+ - data races and scheduling;
401
+ - time, randomness, address, environment, or external I/O.
402
+
403
+ Generate defined inputs by construction where possible. Use dynamic checks as a filter for covered
404
+ paths, not as proof that no undefined behavior exists. Define floating-point comparison with exact
405
+ mode, NaN, infinity, signed zero, exception, and rounding rules rather than one arbitrary epsilon.
406
+
407
+ ## Input-related differential relations
408
+
409
+ When no independent compiler exists, compare related inputs or configurations:
410
+
411
+ - a program and a meaning-preserving transformed program;
412
+ - a program and an equivalent form under one runtime input;
413
+ - optimized and unoptimized forms;
414
+ - cached and fresh compilation;
415
+ - serial and parallel compilation;
416
+ - different legal pass schedules;
417
+ - canonicalized once and twice;
418
+ - direct and round-tripped IR or object form.
419
+
420
+ Every edge needs named side conditions and observed fields. A dead-code transform must exclude
421
+ compile-time effects, destructors, reflection, macros, imports, and annotations that make the code
422
+ observable. An algebraic identity must exclude overflow, poison, NaN, signed zero, traps, and changed
423
+ evaluation count unless the relation explicitly models them.
424
+
425
+ ## First-divergence evidence
426
+
427
+ On a discrepancy:
428
+
429
+ 1. repeat the frozen binary and environment to classify flakiness;
430
+ 2. preserve raw and canonical outcomes;
431
+ 3. narrow option, tier, target, or compiler revision dimensions;
432
+ 4. capture the executed pass trace;
433
+ 5. persist the artifact before and after the first divergent stage;
434
+ 6. run the immediate verifier and analysis comparison;
435
+ 7. apply an independent translation or property check within its supported model;
436
+ 8. reduce source, runtime input, flags, pipeline, target, and environment while preserving identity.
437
+
438
+ An `optimized only` report without the first divergent artifact and exact observation is still a
439
+ triage lead, not a localized compiler defect.
440
+
441
+ ## Discrepancy classification
442
+
443
+ Classify the final evidence as:
444
+
445
+ - confirmed compiler defect under named semantics;
446
+ - implementation-specific but permitted difference;
447
+ - specification discrepancy;
448
+ - unsupported mode or validator gap;
449
+ - shared-lineage common-mode risk;
450
+ - harness, runtime, or environment defect;
451
+ - nondeterministic or probabilistic candidate;
452
+ - unreproduced artifact;
453
+ - duplicate of a stable stage and property identity.
454
+
455
+ Do not use majority vote to name the wrong implementation. Report the authority, lineage, definedness,
456
+ first divergence, minimized predicate, and remaining uncertainty.
457
+
458
+ ## Failure matrix
459
+
460
+ | Failure or test smell | Required response |
461
+ | --- | --- |
462
+ | Many unit tests, no execution oracle. | Report the missing semantic lane rather than claiming broad correctness. |
463
+ | One fixture checks diagnostics, IR, execution, and size. | Split oracle classes or narrow the contract. |
464
+ | Pass line coverage is high but no rewrite fires. | Add activation and decline evidence. |
465
+ | Snapshot changes after harmless register allocation. | Replace whole dump with structural or semantic assertions. |
466
+ | Generated corpus is minimized by edge coverage. | Preserve semantic regressions and corpus class separately. |
467
+ | Same backend appears in three compared compilers. | Record one lineage cluster, not three independent votes. |
468
+ | Low optimization disagrees with high optimization. | Treat it as a signal until defined semantics or an independent authority selects one. |
469
+ | Cross-target outputs differ in pointer width. | Remove or model the permitted target observation. |
470
+ | Same source passes under one hash seed only. | Preserve determinism perturbation and first differing artifact. |
471
+ | Real-project shadow build is unavailable. | Report the missing canary or release lane without blocking bounded stage evidence. |
472
+
473
+ ## Invariants
474
+
475
+ - Every test lane names a compiler contract and an oracle that can falsify it.
476
+ - Every boundary contract separates structural validity from semantic preservation.
477
+ - Oracle classes do not share one accidental snapshot.
478
+ - Feature coverage includes interactions and an observable result, not feature presence alone.
479
+ - Corpus classes have distinct ownership and retention rules.
480
+ - Transformation coverage proves activation or decline, not merely pass execution.
481
+ - Differential confidence reflects shared implementation lineage.
482
+ - Canonical outcomes preserve semantic state beyond stdout.
483
+ - Every discrepancy excludes or models permitted variation before defect classification.
484
+ - Determinism tests perturb hidden inputs and normalize only declared noise.
485
+ - Change-gate, periodic, canary, and release evidence stay within owned budgets.
486
+
487
+ ## Skill handoffs
488
+
489
+ - Use `compiler-engineering-review` for compiler-stage semantics, test ladders, differential
490
+ authority, feature grids, canonical outcomes, and earliest-stage regression ownership.
491
+ - Use `fuzz-harness-review` for persistent harness reset, instrumentation, feedback, corpus
492
+ mutation, sanitizer campaigns, and CI artifact lifecycle.
493
+ - Use `test-suite-performance-review` for runner selection, sharding, caching, retries, and feedback
494
+ latency once compiler semantic coverage is preserved.
495
+ - Use `test-design-guard` for selecting focused regression cases from a specific requirement or bug.
496
+ - Use `parser-engineering-review` for lexer and parser source-unit, recovery, and incremental
497
+ equivalence contracts.
498
+ - Use `interpreter-engineering-review` when an interpreter or VM is an independent semantic oracle.