Skip to content

eshost: run module-flagged .js tests as their real file#3

Merged
Sam Gammon (sgammon) merged 1 commit into
mainfrom
fix/eshost-mjs-copy
Jul 18, 2026
Merged

eshost: run module-flagged .js tests as their real file#3
Sam Gammon (sgammon) merged 1 commit into
mainfrom
fix/eshost-mjs-copy

Conversation

@sgammon

Copy link
Copy Markdown
Member

Summary

The eshost adapter copied module-flagged .js entries to a .mjs twin and ran that. A fixture's self- or cyclic-import of the original .js then 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/WHIPLASH d75351730, part of the pending conformance batch 2). The copy is also redundant: the temp dir's package.json {"type":"module"} already parses .js entries 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

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>
@sgammon
Sam Gammon (sgammon) merged commit 0637cdc into main Jul 18, 2026
1 check passed
@sgammon
Sam Gammon (sgammon) deleted the fix/eshost-mjs-copy branch July 18, 2026 17:14
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