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,434 @@
1
+ # Miscompile Reduction and IR Checklist
2
+
3
+ Use this checklist for wrong-code reproduction, optimization localization, compiler-specific fuzz
4
+ oracles, IR or MIR validity, analysis preservation, CFG and SSA defects, borrow or dataflow
5
+ discrepancies, and predicate-preserving reduction.
6
+
7
+ ## Contents
8
+
9
+ 1. [Reproduction universe](#reproduction-universe)
10
+ 2. [Defect classification](#defect-classification)
11
+ 3. [Definedness gate](#definedness-gate)
12
+ 4. [Stage map](#stage-map)
13
+ 5. [Interestingness predicate](#interestingness-predicate)
14
+ 6. [First-divergence localization](#first-divergence-localization)
15
+ 7. [Translation validation](#translation-validation)
16
+ 8. [Reduction matrix](#reduction-matrix)
17
+ 9. [Probabilistic failures](#probabilistic-failures)
18
+ 10. [IR generation and mutation](#ir-generation-and-mutation)
19
+ 11. [Verifier and analysis checks](#verifier-and-analysis-checks)
20
+ 12. [CFG and SSA matrix](#cfg-and-ssa-matrix)
21
+ 13. [Incremental analysis differential](#incremental-analysis-differential)
22
+ 14. [Idempotence and preservation](#idempotence-and-preservation)
23
+ 15. [Poison and deferred choice](#poison-and-deferred-choice)
24
+ 16. [Borrow and dataflow checking](#borrow-and-dataflow-checking)
25
+ 17. [Artifact and corpus classification](#artifact-and-corpus-classification)
26
+ 18. [Invariants](#invariants)
27
+ 19. [Skill handoffs](#skill-handoffs)
28
+
29
+ ## Reproduction universe
30
+
31
+ Capture enough information to reproduce outside the original checkout and process:
32
+
33
+ - compiler source revision, build identity, and executable hash;
34
+ - driver command and actual subordinate commands;
35
+ - target triple, architecture, CPU, and feature set;
36
+ - object format, code model, relocation model, and calling convention mode;
37
+ - sysroot, headers, modules, generated inputs, runtime libraries, and startup objects;
38
+ - assembler, archiver, linker, loader, emulator, remote runner, and relevant versions;
39
+ - source closure or preprocessed input;
40
+ - profiles, generated metadata, response files, link scripts, and archive members;
41
+ - runtime data, command arguments, standard input, file layout, environment, locale, working
42
+ directory, rounding mode, exception mode, and thread count;
43
+ - compiler seed, runtime seed, pass trace, and actual schedule decisions where applicable;
44
+ - expected baseline result, observed candidate result, and normalization policy.
45
+
46
+ Reproduce from a clean directory or equivalent isolated fixture. A command that works only because
47
+ of ambient headers, libraries, caches, profiles, working-directory files, or environment variables
48
+ is not yet a portable reproducer.
49
+
50
+ ## Defect classification
51
+
52
+ Classify the original event before reduction:
53
+
54
+ | Class | Required evidence |
55
+ | --- | --- |
56
+ | Frontend semantic defect | Closed source input and wrong unoptimized semantic IR or decision. |
57
+ | Optimization miscompile | Defined pre-pass IR, first divergent transform, and wrong observation. |
58
+ | Verifier defect | One explicit invariant accepted or rejected incorrectly. |
59
+ | Analysis preservation defect | Recomputed analysis differs after a pass claiming preservation. |
60
+ | Backend miscompile | Correct optimized IR but wrong machine-stage or runtime result. |
61
+ | Diagnostic defect | Wrong structured identity, span, note graph, recovery, or fix-it. |
62
+ | ABI defect | Independent producer and consumer disagree at a specified boundary. |
63
+ | Object or linker defect | Wrong structural metadata, resolution, relocation, or emitted image. |
64
+ | Crash or resource defect | Exact stage, input, failure class, and resource policy. |
65
+ | Nondeterminism defect | Same frozen universe produces incompatible artifacts or observations. |
66
+ | Specification discrepancy | Implementations differ but no authoritative semantics selects one. |
67
+
68
+ Do not let reduction silently move between classes. A smaller compiler crash is not a valid
69
+ reduction of an optimization wrong-code result.
70
+
71
+ ## Definedness gate
72
+
73
+ Record which observations the language and IR actually define.
74
+
75
+ For source programs, inspect:
76
+
77
+ - signed and unsigned overflow rules;
78
+ - shift ranges and integer conversions;
79
+ - aliasing, lifetime, alignment, provenance, and object representation;
80
+ - uninitialized reads and invalid values;
81
+ - sequence and evaluation-order guarantees;
82
+ - data races and concurrency memory model;
83
+ - floating-point contraction, rounding, exceptions, NaNs, and fast modes;
84
+ - implementation-defined and unspecified behavior;
85
+ - foreign-function, inline assembly, and platform contracts.
86
+
87
+ For compiler IR, inspect:
88
+
89
+ - poison and undefined values;
90
+ - no-overflow, in-bounds, non-null, dereferenceable, alignment, range, and alias promises;
91
+ - control dependence and whether poison reaches a branch, address, call target, or other immediate
92
+ undefined boundary;
93
+ - memory effects, atomics, ordering, and synchronization scope;
94
+ - target-specific intrinsics and feature requirements;
95
+ - the operation that chooses one stable value from otherwise nondeterministic possibilities.
96
+
97
+ A structural verifier proves only the structural rules it implements. A sanitizer proves only the
98
+ executed path and enabled check set. An alternate compiler disagreeing is a discrepancy signal, not
99
+ definedness proof.
100
+
101
+ ## Stage map
102
+
103
+ Persist the narrowest available artifacts across:
104
+
105
+ 1. source closure;
106
+ 2. parsed and semantically analyzed representation;
107
+ 3. unoptimized compiler IR;
108
+ 4. each relevant optimization boundary;
109
+ 5. lowered or target IR;
110
+ 6. machine IR before and after relevant backend stages;
111
+ 7. assembly;
112
+ 8. object and object metadata;
113
+ 9. linked image;
114
+ 10. loaded runtime state and test input;
115
+ 11. normalized observable result.
116
+
117
+ For each boundary, record:
118
+
119
+ - producer and consumer identities;
120
+ - serialization format and schema;
121
+ - verification performed;
122
+ - semantics or invariants promised;
123
+ - input and output hashes;
124
+ - target and feature context;
125
+ - whether the artifact is replayable without upstream stages.
126
+
127
+ Swap one stage at a time. If unoptimized IR already differs semantically from the source, do not
128
+ blame a later optimization because its output is where the symptom becomes visible.
129
+
130
+ ## Interestingness predicate
131
+
132
+ A wrong-code reducer predicate should require all conditions needed to preserve the original event:
133
+
134
+ - candidate source or IR remains accepted by the intended stage;
135
+ - structural verification passes where it passed originally;
136
+ - baseline compilation or interpretation succeeds;
137
+ - candidate compilation succeeds through the disputed stage;
138
+ - baseline and candidate executions terminate under the same resource policy;
139
+ - baseline matches the declared reference observation;
140
+ - candidate alone matches the exact wrong-result fingerprint;
141
+ - no undefinedness or unsupported validator feature newly enters the observed path;
142
+ - first divergent stage remains the same when that identity is part of the bug;
143
+ - output normalization does not erase meaningful differences.
144
+
145
+ Reject candidates whose interesting event is only:
146
+
147
+ - any nonzero exit;
148
+ - any signal;
149
+ - any timeout or out-of-memory event;
150
+ - any verifier error;
151
+ - any compiler diagnostic;
152
+ - any output difference;
153
+ - any failure observed once in a flaky loop.
154
+
155
+ Fingerprint exact values, selected memory, file or object hashes, floating-point bit patterns,
156
+ diagnostic IDs and spans, invariant IDs, or other repository-owned observations.
157
+
158
+ ## First-divergence localization
159
+
160
+ - Capture the executed pass or transform sequence rather than relying on a configured pipeline name.
161
+ - Bisect the execution position between last known good and first known bad artifacts.
162
+ - Persist the artifact on both sides of the narrowed transform.
163
+ - Record nested pass managers and sub-transform numbering when one named pass produces multiple
164
+ execution positions.
165
+ - Verify that disabling the candidate transform restores the oracle without changing definedness or
166
+ bypassing the required trigger.
167
+ - Use temporary no-inline, no-optimize, externalization, extraction, or stage barriers only for
168
+ localization; remove them from the final reduced artifact unless they are part of the real defect.
169
+ - For whole-program optimization, separate frontend generation, summary or index construction,
170
+ distributed or thin backend work, native object production, and final link.
171
+
172
+ The first pass that crashes is not necessarily the first pass that corrupted state. Run structural
173
+ and analysis checks immediately after each transform to move detection closer to the violation.
174
+
175
+ ## Translation validation
176
+
177
+ When an independent validator covers the transformation:
178
+
179
+ - feed it the exact pre-transform and post-transform artifacts;
180
+ - preserve target data layout, features, memory model, and relevant attributes;
181
+ - record unsupported instructions, calls, intrinsics, memory behavior, interprocedural effects, and
182
+ solver limits;
183
+ - separate counterexample, proven refinement, timeout, unsupported, and tool failure;
184
+ - replay a counterexample through the compiler pipeline when possible;
185
+ - do not treat validator timeout or silence as success;
186
+ - do not generalize one validated instance into a proof of the whole pass implementation.
187
+
188
+ If validator and execution disagree, inspect undefinedness, observation model, target semantics,
189
+ unsupported features, and artifact mismatch before selecting one as authority.
190
+
191
+ ## Reduction matrix
192
+
193
+ Reduce these axes independently, then alternate them while preserving the exact predicate:
194
+
195
+ | Axis | Typical units |
196
+ | --- | --- |
197
+ | Source | File, declaration, function, statement, expression, type, token. |
198
+ | Compiler IR | Module, function, block, edge, instruction, operand, attribute, metadata. |
199
+ | Machine IR | Function, block, instruction, register class, frame object, target flag. |
200
+ | Runtime input | File, record, element, byte range, bit pattern, argument, iteration. |
201
+ | Flags | Optimization group, target feature, profile mode, alias or math mode, debug or sanitizer mode. |
202
+ | Pipeline | Stage, pass group, pass instance, sub-transform. |
203
+ | Program graph | Translation unit, module, object, archive member, function linkage. |
204
+ | Link graph | Section, symbol, relocation, library, script rule, order. |
205
+ | Environment | Locale, path, variable, file layout, rounding, thread count. |
206
+ | Nondeterminism | Seed, worker count, scheduling decision, repetition count. |
207
+
208
+ Rules:
209
+
210
+ - Reduce runtime data with code fixed, then code with data fixed, and repeat.
211
+ - Reduce dependent options as groups; a profile-use option without its profile or a target flag
212
+ without the feature-enabling mode may produce a different pipeline.
213
+ - Preserve the target feature that triggers the first failing transform.
214
+ - Keep source and direct-stage regressions when both carry different value.
215
+ - Do not let source reduction change the generated IR shape so far that a different pass fails.
216
+ - Do not let IR reduction remove the source-level construct needed for a user-facing regression.
217
+ - Close all external inputs before calling the result minimized.
218
+
219
+ ## Probabilistic failures
220
+
221
+ Separate compiler nondeterminism from program nondeterminism.
222
+
223
+ Record per attempt:
224
+
225
+ - compiler seed and actual pass or scheduler decisions;
226
+ - compilation worker count;
227
+ - object, IR, MIR, and executable hashes;
228
+ - runtime seed and runtime schedule;
229
+ - reference and candidate observations;
230
+ - crash, timeout, resource, or wrong-code class;
231
+ - environment and target identity.
232
+
233
+ Use a repository-owned statistical policy. A reducer predicate should preserve the original wrong
234
+ observation distribution, not accept any rare failure. Repeatedly generating different object hashes
235
+ with stable runtime behavior is a different defect from stable objects producing nondeterministic
236
+ runtime output.
237
+
238
+ ## IR generation and mutation
239
+
240
+ Use separate lanes:
241
+
242
+ - raw bytes or text for parser, decoder, and rejection behavior;
243
+ - structurally valid generated IR for optimizer and verifier depth;
244
+ - minimally invalid IR that violates exactly one verifier rule;
245
+ - structure-preserving mutation for CFG, SSA, type, dominance, and analysis-sensitive paths;
246
+ - meaning-preserving metamorphic transforms for semantic comparisons;
247
+ - target-aware machine IR for backend stages.
248
+
249
+ Valid IR generation must preserve the minimum stage invariants: types, block terminators, edge and
250
+ phi agreement, dominance where required, calling convention, data layout, target features, and
251
+ machine operand constraints. Do not repair every mutation into validity; retain a separate invalid
252
+ lane for robust diagnostics and rejection.
253
+
254
+ Parse-print-parse should compare normalized structure and semantics, not raw text. Canonical names,
255
+ block ordering, attribute spelling, and harmless serialization choices may differ.
256
+
257
+ ## Verifier and analysis checks
258
+
259
+ Place checks directly after each mutation or pass:
260
+
261
+ - structural IR verifier;
262
+ - machine verifier;
263
+ - dominance and post-dominance;
264
+ - loop and region structure;
265
+ - memory or alias analysis;
266
+ - liveness and register constraints;
267
+ - dataflow fixed-point invariants;
268
+ - analysis-preservation declaration;
269
+ - repository-specific ownership, effect, or type invariants.
270
+
271
+ Verifier negative fixtures should start from one valid input and violate one rule. Require stable
272
+ rejection, bounded diagnostics, no crash, and a location tied to the violated contract. Do not make
273
+ one fixture violate several rules and then snapshot whichever error happens to appear first.
274
+
275
+ Keep these claims separate:
276
+
277
+ - the artifact parses;
278
+ - the artifact is structurally valid;
279
+ - the execution meaning is defined;
280
+ - the pass preserves meaning;
281
+ - preserved analyses remain current;
282
+ - the final program matches the source contract.
283
+
284
+ ## CFG and SSA matrix
285
+
286
+ Include:
287
+
288
+ - diamond and nested diamond;
289
+ - critical edge and duplicate edge to the same destination;
290
+ - self-loop and exitless loop;
291
+ - unreachable block and unreachable cycle;
292
+ - reducible and irreducible loop;
293
+ - duplicate predecessor and edge-sensitive phi input;
294
+ - exceptional, cleanup, suspend, and resume edges;
295
+ - block with multiple exits or target-specific terminators;
296
+ - edge split, block merge, tail duplication, and unreachable elimination;
297
+ - value rename, temporary copy, independent instruction reorder, and redundant diamond insertion.
298
+
299
+ After each transform, verify:
300
+
301
+ - every block terminates correctly;
302
+ - predecessor and successor multiplicity agrees;
303
+ - phi or block-argument inputs agree with incoming edges;
304
+ - dominance and post-dominance are correct;
305
+ - loop membership and nesting are correct;
306
+ - liveness, memory, and ownership facts agree;
307
+ - removed blocks and values have no stale references;
308
+ - observable execution remains equivalent for meaning-preserving transforms.
309
+
310
+ Do not hardcode temporary names or block numbering as semantic truth.
311
+
312
+ ## Incremental analysis differential
313
+
314
+ For each CFG or instruction mutation:
315
+
316
+ 1. update the maintained analysis through its incremental API;
317
+ 2. independently recompute the analysis from the mutated IR;
318
+ 3. normalize representation-only differences;
319
+ 4. compare the complete semantic result;
320
+ 5. reduce the first mutation that separates them;
321
+ 6. repeat in different mutation orders.
322
+
323
+ Cover dominance, post-dominance, loop structure, memory SSA, alias summaries, liveness, reaching
324
+ definitions, borrow or ownership facts, and repository-specific caches. If both paths share code,
325
+ name that common-mode risk and seek a third invariant or execution oracle.
326
+
327
+ ## Idempotence and preservation
328
+
329
+ For canonicalization or normalization passes, compare normalized `P(x)` with `P(P(x))`. If they
330
+ differ, classify:
331
+
332
+ - intentional bounded discovery of new opportunities;
333
+ - monotonic convergence with a declared bound;
334
+ - oscillation between forms;
335
+ - unstable naming or ordering only;
336
+ - semantic or analysis corruption.
337
+
338
+ For each declared preserved analysis:
339
+
340
+ - recompute from the output;
341
+ - compare semantic results;
342
+ - verify invalidation when the pass changes its dependency;
343
+ - test no-op, local mutation, CFG mutation, clone, deletion, and exceptional-control cases;
344
+ - check that a later consumer does not observe stale state.
345
+
346
+ Correct final output in one pipeline does not excuse a false preservation declaration.
347
+
348
+ ## Poison and deferred choice
349
+
350
+ Build a propagation matrix across:
351
+
352
+ - scalar and vector lanes;
353
+ - selected and unselected branch arms;
354
+ - branch or switch conditions;
355
+ - memory addresses and stored values;
356
+ - call arguments and return values;
357
+ - duplicated or merged computations;
358
+ - speculative motion and dead-code elimination;
359
+ - value selection or freeze-like boundaries;
360
+ - overflow and in-bounds promises;
361
+ - phi or block arguments across control flow.
362
+
363
+ Distinguish a value that may independently vary per use from one arbitrary choice shared by all
364
+ uses. Optimizations that duplicate, sink, hoist, or turn data dependence into control dependence
365
+ must preserve the appropriate choice and poison semantics.
366
+
367
+ ## Borrow and dataflow checking
368
+
369
+ Compare more than accept versus reject. Preserve facts such as:
370
+
371
+ - loan or borrow identity;
372
+ - region and program-point membership;
373
+ - move and initialization state;
374
+ - reborrow and two-phase activation state;
375
+ - partial move and projection path;
376
+ - drop and destructor order;
377
+ - closure or coroutine capture;
378
+ - suspension and resume points;
379
+ - lattice input, transfer, and fixed-point output.
380
+
381
+ Use meaning-preserving transformations: introduce a temporary, split one statement, add an unrelated
382
+ block, make an implicit operation explicit, rename or duplicate a harmless value, or restructure
383
+ equivalent control flow. Compare independent checkers or recomputed facts where available.
384
+
385
+ When a result changes, identify whether source semantics, lowered IR, fact generation, solver,
386
+ diagnostic mapping, or temporary lifetime rules changed first.
387
+
388
+ ## Artifact and corpus classification
389
+
390
+ Fingerprint compiler regressions by:
391
+
392
+ - earliest failing stage or pass instance;
393
+ - violated semantic or verifier property;
394
+ - minimized CFG or machine shape;
395
+ - target and feature set;
396
+ - defect class;
397
+ - stable observation fingerprint.
398
+
399
+ Do not deduplicate only by crash stack. One early invariant violation can crash many later passes,
400
+ and one assertion site can receive several distinct corrupt states.
401
+
402
+ Keep:
403
+
404
+ - original reproduction universe;
405
+ - minimized user-facing source fixture;
406
+ - minimized direct-stage fixture;
407
+ - exact interestingness predicate;
408
+ - before and after stage artifacts;
409
+ - unsupported-validator notes;
410
+ - flaky distribution evidence where applicable;
411
+ - link to the regression suite and fuzz seed corpus that owns the case.
412
+
413
+ ## Invariants
414
+
415
+ - Every wrong-code claim names a defined observation.
416
+ - Every reducer candidate preserves the original defect class and normalized fingerprint.
417
+ - Every first-bad-stage claim has a replayable artifact on both sides of the boundary.
418
+ - Every verifier claim states which invariant was checked.
419
+ - Every preserved-analysis claim is compared with recomputation or an independent invariant.
420
+ - Every differential result has an authority other than majority vote.
421
+ - Every probabilistic predicate preserves the original distribution class under a repository-owned policy.
422
+ - Every final regression is assigned to the earliest owning stage.
423
+
424
+ ## Skill handoffs
425
+
426
+ - Use `compiler-engineering-review` as the owner of compiler semantics, stage localization, and
427
+ compiler-specific oracles.
428
+ - Use `parser-engineering-review` for lexer, grammar, CST, AST construction, parser recovery, and
429
+ source-unit contracts.
430
+ - Use `fuzz-harness-review` for harness reset, instrumentation, feedback, corpus, campaign,
431
+ sanitizer, generic minimization infrastructure, and CI lifecycle.
432
+ - Use `race-condition-review` for compiler-internal nondeterministic schedules and shared analyses.
433
+ - Use `memory-lifetime-review` for compiler implementation lifetime, arena, and ownership defects.
434
+ - Use the matching language skill for source-language semantics and undefined behavior.