Repository navigation
fix(javascript): preserve literal CommonJS path punctuation - #576
Merged
morluto merged 1 commit intoOct 5, 2026
Merged
Conversation
9 tasks done
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 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.
Summary
Preserve literal
#and?characters in CommonJS filesystem specifiers. REA currently resolvesrequire("./dep.cjs#literal.cjs")todep.cjswhen both files exist, producing confidently wrong graph targets. Node resolves the literal filename.Found during a repository audit; no matching existing issue was found.
Change and scope
requirecalls.The loader-origin field is internal. Public input/output schemas and graph property shapes remain unchanged, confirmed by the generated-contract checks.
Evidence and regression coverage
The baseline has 13 failures and 14 passing controls across the new tests:
#/?, require/import/unspecified kinds, and literal-only/stripped-only/both-file inventories.require.resolveand both public require-edge projections, alongside unchanged ESM targets..nodepath.The real-file fixtures use
#for portable names;?is covered by the filesystem-independent matrix. Native addons are never loaded or executed.Independent review found no blocking issue and passed 76 additional assertions covering repeated/mixed/trailing punctuation, escaped literals, export variants, and rejection safeguards.
Contract and boundary impact
Validation performed
npm run check:fast: passed.npm run check:ci: all seven static tasks passed.npm run docs:check: passed; generated contracts remain current.npm run verify:package: Linux package/install, CLI, and MCP verifier passed.npm pack --dry-run --json: passed.git diff --check: passed.npm run check:pr: static stages passed; full suite reported 1,816 passed, 40 failed, and 1 skipped. The same 40 native bridge failures reproduce on unchanged base52bf709; this environment rejects Unix-domain socket listeners withEPERM, causing startup failures/timeouts. No tests or permission checks were relaxed.Compatibility and release
No public schema migration. Node v24.19.0 on Linux supplied the real resolution oracle. Native fixtures contain inert bytes and make no native execution claim. Real Hopper/Ghidra verification was not performed because those providers are unchanged.
Review checklist