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
fix(spec): annotate the assembled package body with a STRUCTURAL type so the stack schema's printed declaration carries no named alias (#14439)
A named type alias inside `ObjectStackDefinitionSchema`'s printed type
(`manifest: z.ZodType<AssembledPackageBodyParsed, AssembledPackageBody>` on
the `packages` element) can only be IMPORTED by the declaration bundler, never
inlined. `system/environment-artifact.zod.ts` embeds the stack type, so the
bundler turned `stack.zod` into a shared chunk and gave the
`environment-artifact` chunk an import edge into it: every consumer of
`@objectstack/spec/system` started loading the entire stack schema
declaration it never loaded before.
Measured on the `qa/http-conformance` TEST_DEBT re-measure program, same
shape as the gate builds it, 8 GB cap so the peak is measured rather than
hit: base `53d36892` 691,580 lines of definitions / 4,473,321 K heap; PR
head `3878a582` 734,202 (+42,622 — the size of the stack schema's
declaration) / 4,875,249 K — over the 4096 MB ceiling
`scripts/check-type-check-coverage.mjs` pins as CI's, which is the red
`Type Check · debt ledger` lane on both earlier pushes.
`AssembledPackageBodySchema` is now annotated `z.ZodType<Record<string,
unknown>, Record<string, unknown>>` and the two ADR-0122 aliases are derived
FROM the schema (`z.input` / `z.infer`), so nothing named can re-enter the
stack schema's printed type. The runtime schema is unchanged: manifest fields
plus every collection, key set still derived from `COMPOSE_KEY_DISPOSITIONS`.
What consumers lose is static field typing inside an assembled body, which the
PR's readers (`compile.ts`, `artifact-packages.ts`) never relied on.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
0 commit comments