Filed by the dev seat that opened #8332 (the superseding better-auth 1.6.28 → 1.7.2 bump). Unassigned, ungraded — triage's. Related to #8326 but a different fact: #8326 is about a stale resolution carried across a rebase; this one reproduces from a clean base, so #8326's proposed "regenerate from a clean base" remedy would not prevent it.
Measured
Two independent worktrees, both cut fresh from d8ab2dc0 (main), pnpm@10.31.0:
- edit
packages/auth/package.json to "better-auth": "^1.7.2" (nothing else)
pnpm install --lockfile-only
Both runs resolve better-auth to 1.7.3 (registry latest for that range) and produce:
zod peer contexts, base d8ab2dc0 : 99 x zod@4.4.3
zod peer contexts, after : 25 x zod@4.4.3 + 89 x zod@4.5.4
The 89 that move are ai@7.0.65, @ai-sdk/gateway, @ai-sdk/mcp, @ai-sdk/provider-utils, better-call@1.4.0, fumadocs-core@16.15.4 and better-auth itself. The 25 that stay are the workspace-declared ones (packages/types, components, app-shell, test-support, plugin-timeline, all "zod": "^4.4.3").
Why it is not a declared constraint
Diffing the two lockfiles' full identity sets (3,634 identities), the delta from the 1.7.2 tree to the 1.7.3 tree is:
@better-auth/{core,drizzle-adapter,kysely-adapter,memory-adapter,
mongo-adapter,prisma-adapter,telemetry} 1.7.2 -> 1.7.3
better-auth 1.7.2 -> 1.7.3
zod@4.5.4 (added)
Nothing else. The better-auth@1.7.2 and better-auth@1.7.3 package entries are byte-identical modulo the version string and integrity hash, and neither declares zod at all. better-call@1.4.0 — the only thing in that subtree with a zod peer — is unchanged at zod: ^4.0.0, optional: true, in both. So the second zod is peer-group re-resolution, not a range anyone wrote.
Control
pnpm install --lockfile-only on unmodified d8ab2dc0 reproduces the committed lockfile byte-identically (git diff --stat empty). The resolver is deterministic here; the fork is caused by the 1.7.3 subtree, not by drift.
Why it matters
A second physical zod is the same shape of defect #8326 was filed on — a single-copy dependency ending up twice in the tree — and zod is reachable from the console bundle through @objectstack/spec. #8332 sidesteps it by committing a lockfile that pins 1.7.2 (pnpm preserves that resolution on every subsequent pnpm install, verified idempotent), but the sidestep expires: the next dependabot bump of better-auth, or any pnpm update better-auth, walks straight into it, and the reading a reviewer will get is "this bump bloats the bundle" — which is again the wrong attribution.
Shape of a remedy — not a ruling, the lane decides
Refs: #8326 · #8332 · #7053.
Generated by Claude Code
Filed by the dev seat that opened #8332 (the superseding better-auth 1.6.28 → 1.7.2 bump). Unassigned, ungraded — triage's. Related to #8326 but a different fact: #8326 is about a stale resolution carried across a rebase; this one reproduces from a clean base, so #8326's proposed "regenerate from a clean base" remedy would not prevent it.
Measured
Two independent worktrees, both cut fresh from
d8ab2dc0(main),pnpm@10.31.0:packages/auth/package.jsonto"better-auth": "^1.7.2"(nothing else)pnpm install --lockfile-onlyBoth runs resolve better-auth to 1.7.3 (registry latest for that range) and produce:
The 89 that move are
ai@7.0.65,@ai-sdk/gateway,@ai-sdk/mcp,@ai-sdk/provider-utils,better-call@1.4.0,fumadocs-core@16.15.4and better-auth itself. The 25 that stay are the workspace-declared ones (packages/types,components,app-shell,test-support,plugin-timeline, all"zod": "^4.4.3").Why it is not a declared constraint
Diffing the two lockfiles' full identity sets (3,634 identities), the delta from the 1.7.2 tree to the 1.7.3 tree is:
Nothing else. The
better-auth@1.7.2andbetter-auth@1.7.3package entries are byte-identical modulo the version string and integrity hash, and neither declares zod at all.better-call@1.4.0— the only thing in that subtree with a zod peer — is unchanged atzod: ^4.0.0,optional: true, in both. So the second zod is peer-group re-resolution, not a range anyone wrote.Control
pnpm install --lockfile-onlyon unmodifiedd8ab2dc0reproduces the committed lockfile byte-identically (git diff --statempty). The resolver is deterministic here; the fork is caused by the 1.7.3 subtree, not by drift.Why it matters
A second physical zod is the same shape of defect #8326 was filed on — a single-copy dependency ending up twice in the tree — and
zodis reachable from the console bundle through@objectstack/spec. #8332 sidesteps it by committing a lockfile that pins 1.7.2 (pnpm preserves that resolution on every subsequentpnpm install, verified idempotent), but the sidestep expires: the next dependabot bump of better-auth, or anypnpm update better-auth, walks straight into it, and the reading a reviewer will get is "this bump bloats the bundle" — which is again the wrong attribution.Shape of a remedy — not a ruling, the lane decides
@objectstack/*family 17.3.0 → 17.2.0 and forked zod, doublingpackages/specin the console bundle — on three PRs at once #8326 already asks for would name this in one line instead of costing another seat a day.pnpm.overridesentry, or bumping the five^4.4.3declarations in step) is a real question with a cost either way, and is not answered here.Refs: #8326 · #8332 · #7053.
Generated by Claude Code