Repository navigation
Commit e167d43
committed
fix(spec): keep the assembled-body aliases key-precise but element-loose — the per-key mapped alias emitted the collections shape a second time and OOM'd the type-check-debt re-measure (#14439)
`AssembledPackageBody` / `AssembledPackageBodyParsed` referenced
`(typeof STACK_DEFINITION_COLLECTIONS_SHAPE)[K]` per collection key. Because
those aliases are exported, the declaration emit wrote the shape const into
`stack.zod-*.d.ts` a second time (21,443 lines beside the 42,449 the stack
schema already inlines), and every consumer program re-inferred all ~35
collection input/output types once more. `Type Check · debt ledger` on the
PR went red: the `qa/http-conformance` TEST_DEBT re-measure exceeded the
4096 MB ceiling the gate pins as CI's, while the merge-queue run on the base
passed the same step. Reproduced locally (exit 3) on b4b9732.
The aliases now keep the DERIVED key set (`AssembledPackageBodyKey`, still
read off `COMPOSE_KEY_DISPOSITIONS`) and type each collection as `unknown`.
Nothing exported references the shape const any more, so the second copy is
not emitted and the per-key inference does not run. `assembledPackageBodyShape()`
keeps its `Pick<typeof STACK_DEFINITION_COLLECTIONS_SHAPE, K>` return type
(internal, not emitted), so a disposition key missing from the collections
shape is still a compile error, and the RUNTIME schema still carries every
collection's full declaration — refusals are unchanged. One spec pin narrows
its element access at the point of use, as every reader of an assembled
body already does.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m1 parent b4b9732 commit e167d43
2 files changed
Lines changed: 35 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
244 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
1031 | | - | |
| 1031 | + | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | | - | |
| 1036 | + | |
1037 | 1037 | | |
1038 | 1038 | | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1042 | 1043 | | |
1043 | 1044 | | |
1044 | 1045 | | |
1045 | 1046 | | |
1046 | 1047 | | |
1047 | 1048 | | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1051 | 1070 | | |
1052 | 1071 | | |
1053 | 1072 | | |
| |||
0 commit comments