fix(bench-arena): match the zod-isolation importer case-insensitively for CI#408
Merged
Merged
Conversation
… 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
zodand the discriminated-unioncells failed to mount. This makes the importer match case-insensitive.
Root cause
The isolation plugin redirects the Attaform dist's bare
zodto thezod-v4alias by testingwhether the importer path contains an
attaform/dist/segment. That path is the dist file's real(symlink-resolved) location, and its
attaformsegment is the checkout directory. GitHub checksthis 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
discriminatedUnionthrew 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
falseon/home/runner/work/Attaform/Attaform/dist/…, the new one returnstrue; both still returnfalsefor the v3 cohort's dist and the arena's own zod-v3 scenario imports, so the redirectstays scoped.
prettier are green.
Follow-up
After merge, re-dispatch the bench refresh so
results.jsonrepopulates with the correctedzod-v4 numbers.
🤖 Generated with Claude Code