Skip to content

fix(bench-arena): match the zod-isolation importer case-insensitively for CI#408

Merged
ozzyfromspace merged 1 commit into
mainfrom
fix/bench-zod-isolation-ci-path
Jun 14, 2026
Merged

fix(bench-arena): match the zod-isolation importer case-insensitively for CI#408
ozzyfromspace merged 1 commit into
mainfrom
fix/bench-zod-isolation-ci-path

Conversation

@ozzyfromspace

Copy link
Copy Markdown
Contributor

What

The dual-zod isolation that lets the arena host Attaform's zod-v4 adapter alongside the zod-v3
cohort did not fire in CI, so the zod-v4 adapter resolved the v3 zod and the discriminated-union
cells failed to mount. This makes the importer match case-insensitive.

Root cause

The isolation plugin redirects the Attaform dist's bare zod to the zod-v4 alias by testing
whether the importer path contains an attaform/dist/ segment. That path is the dist file's real
(symlink-resolved) location, and its attaform segment is the checkout directory. GitHub checks
this repo out to …/Attaform/Attaform/dist/ (capital), while the dev tree is …/attaform/dist/
(lowercase). The test was case-sensitive, so it matched only locally; in CI it silently missed, the
v4 adapter fell back to zod v3, and zod v3 parsing a v4-built discriminatedUnion threw on mount.

Only the discriminated-union shard went red because DU is the one construct that hard-fails on a
major-version mismatch; the other zod4 scenarios limped through measuring the wrong zod (so the
refresh would also have published wrong zod-v4 numbers had it completed).

The fix

Make the importer test case-insensitive. One character, and the minimal change that cannot
introduce a new match (the lowercase dev path still matches).

Verification

  • Deterministic check against the real CI path: the old pattern returns false on
    /home/runner/work/Attaform/Attaform/dist/…, the new one returns true; both still return
    false for the v3 cohort's dist and the arena's own zod-v3 scenario imports, so the redirect
    stays scoped.
  • All 54 discriminated-union cells (nine libraries) pass locally; bench typecheck, eslint, and
    prettier are green.

Follow-up

After merge, re-dispatch the bench refresh so results.json repopulates with the corrected
zod-v4 numbers.

🤖 Generated with Claude Code

… for CI

The dual-zod isolation redirected the Attaform dist's bare `zod` to the zod-v4 alias by
testing whether the importer path contained an `attaform/dist/` segment. That segment is the
dist file's real (symlink-resolved) path, whose `attaform` part is the checkout directory: the
dev tree is .../attaform/dist/, but GitHub checks the repo out to .../Attaform/Attaform/dist/.
The case-sensitive test matched only the lowercase dev path, so in CI the redirect never fired,
the published zod-v4 adapter resolved the v3 `zod`, and the discriminated-union cells failed to
mount (zod v3 parsing a v4-built discriminatedUnion). The other zod4 scenarios silently
measured the wrong zod.

Make the importer test case-insensitive. Verified against the real CI path, confirmed the v3
cohort and the arena's own zod-v3 imports stay unmatched, and all 54 DU cells pass locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
attaform Ready Ready Preview, Comment Jun 14, 2026 1:50am

@ozzyfromspace ozzyfromspace merged commit 1e835bc into main Jun 14, 2026
15 checks passed
@ozzyfromspace ozzyfromspace deleted the fix/bench-zod-isolation-ci-path branch June 14, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant