eshost: run module-flagged .js tests as their real file#3
Merged
Conversation
The adapter copied module-flagged .js entries to a .mjs twin and ran
that, so a fixture's self- or cyclic-import of the original .js resolved
to a DIFFERENT file than the running entry — masking runtime module
dedup and double-evaluating the module graph. The copy is redundant:
the temp dir's package.json {"type":"module"} already parses .js
entries as ESM. Removing it lets the entry run under its real name so
self-imports dedupe.
Validated with a 4-cell matrix (old/new runtime x old/new adapter) on
language/module-code: +52 passes only with runtime fix d75351730 AND
this change; adapter alone is a no-op. Full test262 corpus with both:
92,732/103,361, +143 new passes, 0 regressions.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
The eshost adapter copied module-flagged
.jsentries to a.mjstwin and ran that. A fixture's self- or cyclic-import of the original.jsthen resolved to a different file than the running entry — double-evaluating the module graph and masking the runtime's entry-module dedup fix (elide-dev/WHIPLASHd75351730, part of the pending conformance batch 2). The copy is also redundant: the temp dir'spackage.json{"type":"module"}already parses.jsentries as ESM.Validation
Four-cell isolation matrix on
language/module-code(old/new runtime × old/new adapter): +52 passes only with both the runtime fix and this change; either alone is a no-op (1,137/1,197 in all three other cells; 1,189/1,197 with both, 0 regressions). Full test262 corpus with both: 92,732/103,361, +143 new passes, 0 regressions (the +143 = 70 error-stack + 15 evalScript shim + 52 module-identity + stragglers vs the frozen baseline).Remaining 6 module-code failures are separate issues: 2 harness include-path resolution for tests in nested subdirs (
ambiguous-export-bindings/), 4 source-phase imports (unimplemented proposal).Note: the +52 only materializes in CI once the batch-2 runtime fixes reach a nightly; until then this change is behavior-neutral on module-code (verified cell 2 of the matrix) and the full-corpus run shows no regression anywhere else.
🤖 Generated with Claude Code