Browse documentation

test262 LoaderBare harness

Date: 2026-05-04 Area: testing Pull Request: #513

test262 conformance harness reframed around the standard tc39 convention. Previously the wrapper ran inside GocciaTestRunner and had to selectively hide / capture / restore the test-library globals (expect, describe, test, runTests, etc.) it registered, with failure capture leaning on an undefined sentinel that collided with thrown undefined and chunked-runner crashes that masked thousands of conformance failures as wrapper failures (#491 history). Replaced with: per-test GocciaScriptLoaderBare subprocess, stock tc39/test262 harness files read directly from the pinned checkout's harness/ directory (with a small set of bundled adaptations under scripts/test262_harness/ for stock files that depend on language features Goccia excludes by design or that work around specific engine bugs — see test262.md § Bundled harness adaptations), exit-code + stdout-marker wire protocol identical to test262-harness/eshost/test262.fyi, and a thin TypeScript orchestrator (scripts/run_test262_suite.ts). No eligibility filter — every discovered test runs; per-test subprocess + --timeout + --max-memory bound the blast radius. Wrapper-template drift is now structurally impossible because the "template" is harness + body string concatenation. Wrapper-infra failures are classified separately and gated to zero in CI. Surfaced eleven engine bugs (all milestoned 0.8.0, all labeled engine per the architecture split where engine covers TGocciaEngine — language semantics + ECMAScript built-ins — and runtime is reserved for TGocciaRuntime host extensions like console/fetch/JSON5): #514 (Iterator.concat SIGSEGV), #515 (RegExp.test SIGSEGV), #516 (Reflect.construct rejects function decls/exprs), #517 (script-mode unattached call this), #518 (bytecode VM Range-check on top-level Promise.then drain), #519 (Error.prototype.constructor missing), #520 (module arrow this lexical inheritance), #521 (var/function shadowing built-in globals), #522 (String(obj) doesn't invoke toString), #523 (yield* accesses .next on null), #524 (for-of re-fetches iterator.next each iteration). Each bundled-harness adaptation under scripts/test262_harness/ references its tracking issue and is to be removed when the underlying engine bug is fixed. test262.md.