Repository navigation
fix(evals): escape relative scaffold import URLs - #504
Merged
Merged
Conversation
u7-u7
marked this pull request as ready for review
October 28, 2026 03:08
iuyo5678
approved these changes
Oct 28, 2026
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.
Problem
The badcase scaffold puts a relative filesystem path directly into an ESM import. If the checkout path contains
#, Node treats the remainder as a URL fragment and cannot loadfixtures.mjs. A literal%20is decoded as a space;?has the same problem on platforms where it is a legal path character. The generated case is unusable even though all files exist.Change
Encode each relative path component as a URL component while preserving
/separators and relative..segments. Relative imports remain relocatable. The cross-drive Windows file-URL fallback introduced in #459 is unchanged.Add a regression that copies the actual scaffold/helper modules into checkout directories containing
#and literal%20, generates cases outside those directories, then imports and renders each generated fixture. Also cover?on non-Windows systems.This is independent of #503: it fixes fixture module resolution, not run IDs or event acceptance. The branch is based directly on current main and does not include #503.
Verification
ERR_MODULE_NOT_FOUND(the helper path was truncated at#).node --test evals/browser/tests/*.test.mjs: 26 passed, 0 failed.node evals/browser/cli.mjs validate: 10 cases / 19 fixture routes validated.git diff --check: clean.AI assistance
Prepared and tested with OpenAI Codex. No human-review attestation is made. Submitted as a draft without requesting reviewers.