Measured while landing #10031 (branch claude/issue-10096-schema-free-meta-spelling @a9be45a86); filed unassigned as an observation — the #10031 verification criterion (delta reproduced shrinking) is met, this records what the chosen instrument cannot reach.
What was measured
esbuild --bundle --minify --format=esm --platform=browser --external:fs, probe importing only postureEnforcesWall from @objectstack/spec/security, workspace spec dist:
| state | root + /security marginal (min) | (gz) |
|---|
| origin/main @cc21aad8e | +261.5 KB | +82.4 KB |
after sideEffects: false + PURE-marked lazySchema | +202.0 KB | +63.8 KB |
+ PURE-marked strictObject, defineForm | +177.8 KB | +56.6 KB |
Identical in both graph directions (/ui + /security gives the same marginal), same as the card's original observation.
Why the residue resists name-based PURE marking
The tsup esbuild onLoad transform annotates call sites by callee name, which only makes a top-level statement droppable when EVERY call in the initializer is annotated. The dist/security/index.mjs survey (pre-annotation) counted, at top level: 109 lazySchema( (now annotated), 27 z.enum(, 5 z.object(, 4 z.union(, 4 z.string(, 4 z.lazy(, 1 z.discriminatedUnion(, 9 strictObject( and 1 defineForm( (now annotated). The z.* sites are mostly CHAINED (z.enum([...]).describe(...)) — the outermost call is a method on an intermediate result, which no callee-name list can mark, so the statement and everything it transitively retains (zod core included) stays in the consumer bundle.
Directions (not a decided fix)
Measured while landing #10031 (branch
claude/issue-10096-schema-free-meta-spelling@a9be45a86); filed unassigned as an observation — the #10031 verification criterion (delta reproduced shrinking) is met, this records what the chosen instrument cannot reach.What was measured
esbuild
--bundle --minify --format=esm --platform=browser --external:fs, probe importing onlypostureEnforcesWallfrom@objectstack/spec/security, workspace spec dist:sideEffects: false+ PURE-markedlazySchemastrictObject,defineFormIdentical in both graph directions (
/ui+/securitygives the same marginal), same as the card's original observation.Why the residue resists name-based PURE marking
The tsup esbuild onLoad transform annotates call sites by callee name, which only makes a top-level statement droppable when EVERY call in the initializer is annotated. The
dist/security/index.mjssurvey (pre-annotation) counted, at top level: 109lazySchema((now annotated), 27z.enum(, 5z.object(, 4z.union(, 4z.string(, 4z.lazy(, 1z.discriminatedUnion(, 9strictObject(and 1defineForm((now annotated). Thez.*sites are mostly CHAINED (z.enum([...]).describe(...)) — the outermost call is a method on an intermediate result, which no callee-name list can mark, so the statement and everything it transitively retains (zod core included) stays in the consumer bundle.Directions (not a decided fix)
z.*constructions inlazySchemawhere they are schema definitions (the package's own convention; each wrap is a reviewed source edit, and two files are held by in-flight claims as of 2026-08-20).@objectstack/spec/sharedcosts a consumer 60.1 KB gzipped to import one string fold — the /meta spelling contract has no fine-grained export #10096) makes new browser-reachable vocabulary cheap regardless; the residue only prices reaching into schema-carrying entries from a browser.