test(codemode): run test262 files verbatim from a local checkout - #48446
Merged
Conversation
rekram1-node
force-pushed
the
test262-runner
branch
from
September 11, 2026 15:25
2d0ca35 to
b649e58
Compare
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.
Adds a runner that executes upstream test262 files verbatim against the interpreter, so language and built-in behavior is checked against the spec's own tests instead of hand-written paraphrases. The test files themselves are not committed:
script/sync-test262.tscopies them from a local checkout at a pinned revision into gitignored directories. Without them the runner registers zero tests, so CI is unchanged.What's here
test/test262/manifest.json— pinned revision (250f204f), directories to copy (built-ins/Array/prototype,language/statements), and what is left out: unsupportedflags/features/includes, plusboundaries— code patterns for intentional interpreter limits (classes,this,arguments,call/apply/bind, prototype objects, descriptors, accessors, boxed primitives, sloppy mode,eval,Symbol(),new.target,$262).script/sync-test262.ts— copies from a checkout, verifying it is at the pinned revision and applying the manifest. 3993 files, 5.6 MB, all gitignored.test/test262/run.ts— runs one file: prepends"use strict"(sloppy-only tests are never copied), provides the harness (assert,Test262Error,compareArray,$DONE,$DONOTEVALUATE) as host globals, drains the job queue forasynctests, and interpretsnegative.test/test262.test.ts— one bun test per file present. Files inskipped.txtfail on a known gap and are skipped.script/test262-report.ts— runs everything including skipped files, groups failures by cause, reports skipped files that pass again, and--writeregeneratesskipped.txt.interpreter-support.md— one[ ]item per gap category found (18).src/interpreter/{runtime,execute}.ts— optionalextraGlobalshook so the harness can be host-provided (assert.sameValueis a property on a function, which programs cannot express).Results at the pinned revision
3252 pass, 741 skipped, 0 fail; ~3 s for the full set.
Largest gaps (all in
skipped.txtwith reasons): functionname/length(238),const { constructor } = errreadingundefined(154), async generator parameter evaluation timing (95), interpreter-raised errors typedErrorinstead ofTypeError/RangeError/ReferenceError(94), argument coercion in array methods (42),arr.length = n(21).Follow-ups: extend the manifest to the remaining directories we implement (
Object,JSON,String,Number,Math,Date,Map,Set,Promise,RegExp,language/expressions); decide later whether and how to vendor the files for CI.