You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applies the review feedback from PR #56 that merged before it could be folded
in. The Yama reviewer was steered toward 'no Obj.magic/@unwrap/%identity' but
not toward the subtler class of bug that every mechanical gate (golden compile,
bench) passes green on — an unsound type that compiles. That's exactly the #55
regression a human had to catch (an output-only 'a from an `any` getter return).
- workflowInstructions: a 'compilation is NOT soundness' lens (CI proves
compiles + matches baseline, not soundness; a fake behind a shared typeRef
doesn't bubble to the report) and a PRODUCE/RECEIVE polarity rule ('a is sound
only in a consumer-supplied input position).
- focusAreas: an all-cases-or-flag line (every union/overload variant must be
reachable or the whole prop is flagged — never silently dropped).
- blockingCriteria (+2 -> 6): output-only 'a that doesn't round-trip; a fake
emitted UNFLAGGED inside a shared *Types.res entry.
Config-only; doesn't touch the generator.
(distinct runtime tags) or an opaque module; `any` is a defect, never
110
126
silently typed.
127
+
- All-cases-or-flag: every TS variant of a union / overload must be
128
+
reachable in the emitted output, or the WHOLE prop is flagged — never
129
+
silently drop one (e.g. two string literals colliding on one constructor
130
+
ident like `'trap-focus'`/`'trapFocus'`, or a dropped overload arm, both
131
+
still compile).
111
132
- name: "Determinism & reproducibility"
112
133
priority: "CRITICAL"
113
134
description: |
@@ -157,6 +178,12 @@ review:
157
178
- condition: "Generated ReScript introduces an unsafe cast that violates the contract — Obj.magic, @unwrap, or a bare %identity outside the two documented allowances (opaque-module from*/as* accessor, render-prop <prop>Fn wrapper)"
158
179
action: "BLOCK"
159
180
reason: "Breaks the core 'no unsafe casts' guarantee in docs/TYPE_MAPPING.md / CLAUDE.md"
181
+
- condition: "Generated ReScript introduces a type variable ('a) that does NOT round-trip — it appears only in OUTPUT positions (a getter/method return, or a callback param the consumer receives) and never in a consumer-supplied input, so it unifies with anything (e.g. an `any` field surfacing as `routes(): RouterRoute<'a>[]`)"
182
+
action: "BLOCK"
183
+
reason: "An output-only 'a is an unsound cast (rule #4: a type var is only for a genuine round-tripping generic) — strictly worse than a flagged placeholder, and it compiles, so no other gate catches it"
184
+
- condition: "A fake / plausible-but-wrong type (e.g. `string` where the TS type was richer) is emitted UNFLAGGED inside a shared *Types.res entry (an @unboxed arm, a record field, or a views-module member) — no ⚪/🔍/🛑 bucket comment, because the prop only holds a typeRef and the imperfection does not bubble up"
185
+
action: "BLOCK"
186
+
reason: "'Flag, don't fake' must hold even when the fake hides behind a shared type reference and the report shows the prop as usable"
160
187
- condition: "A change makes generated output nondeterministic (same input → differing output across runs) — e.g. unordered iteration, time, or randomness reaching emitted code"
161
188
action: "BLOCK"
162
189
reason: "Determinism is a core product guarantee; nondeterministic output is unshippable"
0 commit comments