|
89 | 89 | * is WHICH gate reports it. `check:error-code-casing` owns the lowercase |
90 | 90 | * sweep, and every pattern it has needs a QUOTED lowercase literal beside |
91 | 91 | * the token `code` — `code: 'x'`, `.code = 'x'`, `code === 'x'`, |
92 | | - * `code?: 'x' | 'y'`. In those positions (`objlit`, `assign`) the |
| 92 | + * `code?: 'x' | 'y'`, and [#10760] `code: parsed?.code || 'x'` / |
| 93 | + * `.code = e?.code ?? 'x'` — the OUR-DEFAULT slot of a `||`/`??` |
| 94 | + * fallback chain, that gate's `fallback` pattern. It still captures only |
| 95 | + * a string literal, and a literal in our source is by construction the |
| 96 | + * default WE author. That fifth one is a position this gate has NO shape |
| 97 | + * for rather than one it hands over: an intervening expression leaves |
| 98 | + * `objlit` and `assign` with no quote to match. |
| 99 | + * In those positions (`objlit`, `assign`) the |
93 | 100 | * delegation is real: that gate reads the same characters and carries the |
94 | 101 | * D6/D6b/D6c discrimination — field-addressed catalogs, persisted audit |
95 | 102 | * columns, diagnostics payloads, Zod's own issue codes — that decides which |
|
126 | 133 | * Reduction is ALL-OR-NOTHING — a chain with one runtime limb reduces to |
127 | 134 | * nothing rather than to its literal half, since half an expression's |
128 | 135 | * values is a finding that is wrong in both directions at once. |
| 136 | + * [#10762] WHO owns a runtime-limbed chain then depends on WHERE it sits, |
| 137 | + * and the two answers differ — measured against both gates' recognizers, |
| 138 | + * not inferred from either one's prose. At the STAMP SITE |
| 139 | + * (`{ code: parsed?.code || 'lit' }`, `err.code = e?.code ?? 'lit'`) no |
| 140 | + * reduction is involved at all: `objlit`/`assign` need the quote |
| 141 | + * immediately, so this gate never had a shape there — and since #10760 |
| 142 | + * `check:error-code-casing`'s `fallback` pattern reads that literal, so |
| 143 | + * the shape is DELEGATED, not dropped. That is the position the two live |
| 144 | + * SSO codes in `register-sso-provider.ts` shipped through. In a LOCAL'S |
| 145 | + * INITIALIZER (`const code = parsed?.code || 'lit'; err.code = code`) it |
| 146 | + * is neither: the ALL-OR-NOTHING rule above declines it here, and that |
| 147 | + * gate's `fallback` pattern anchors on `code:`/`code?:`/`.code =`, so a |
| 148 | + * `const code =` is out of ITS reach too. That one is still owned by |
| 149 | + * NOBODY — deliberately on this side, filed as #10897 for the other. |
| 150 | + * Stated so the next reader does not re-derive the hole and close it in |
| 151 | + * the wrong gate. |
129 | 152 | * - A constant this gate cannot resolve is REPORTED as unresolved, never |
130 | 153 | * dropped: a deriver that goes quietly blind is the same failure one layer |
131 | 154 | * down. [#9223] A constant imported from a WORKSPACE package is resolved |
@@ -801,7 +824,11 @@ export function deriveSites({ registered, files, readFile, packageDirs = new Map |
801 | 824 | * |
802 | 825 | * `check:error-code-casing` owns the lowercase sweep, and every pattern it |
803 | 826 | * has requires a QUOTED lowercase literal sitting next to the token `code`: |
804 | | - * `code: 'x'`, `.code = 'x'`, `code === 'x'`, `code?: 'x' | 'y'`. Where this |
| 827 | + * `code: 'x'`, `.code = 'x'`, `code === 'x'`, `code?: 'x' | 'y'`, and |
| 828 | + * [#10760] `code: parsed?.code || 'x'` / `.code = e?.code ?? 'x'`, the |
| 829 | + * OUR-DEFAULT slot of a `||`/`??` fallback chain (that gate's `fallback` |
| 830 | + * pattern; it still captures only a literal, which in our source is the |
| 831 | + * default we author). Where this |
805 | 832 | * gate finds a lowercase code in one of those same positions — `objlit`, |
806 | 833 | * `assign` — the delegation is real: that gate sees the identical text, and |
807 | 834 | * it carries the D6/D6b/D6c discrimination (field-addressed catalogs, |
|
0 commit comments