ReviewOS

home-lang/home

VM parity: separate script construction and execution option semantics

#891
Open chris opened this 8 days ago ·
8 days ago

Tracked from #66 and #885, following #889 and #890.

Native Home's Script constructor reads and validates contextName/contextOrigin/timeout even though they are not construction options. Script execution reads filename/lineOffset/columnOffset even though those belong to construction. Has-property lookups cause observable Proxy has operations, and validation runs before all constructor getters have been read.

The diagnostic comparison with Node v26.10.0 establishes these differences, plus execution timeouts above uint32 being accepted, and valid integer source offsets being rejected when supplied as double-backed JavaScript values (including negative zero). Arrays/functions are accepted as option objects, and raw ArrayBuffer cachedData is accepted instead of rejecting the non-view input.

Acceptance includes independent construction/execution parsing, ordinary property reads, constructor snapshots and validation/getter exception order, GC protection for earlier getter results, strict object/view types, positive uint32 timeouts, and signed int32 offsets regardless of JS numeric storage representation.

The Node trace also contains internal script parsing-context and debugger-first-line symbols that Home does not read. Fresh-source empty-cache results now match exactly for Buffer, typed-array and DataView inputs. Warm-source cache rejection flags still differ. These remaining observations must stay visible in the broader compatibility audit; no exact full diagnostic-match credit is claimed for them.

Published and verified in 197c167da, with 798 evidence artifacts in f07cacdea. Build 56/56, all 59 selected unchanged originals, and seven focused commands pass. Original reports contain 14 passing test cases and 54 passing process checks, with no failed files, skips, TODOs, filtering or retries. Constructor snapshots, execution field isolation, ordinary Proxy reads, getter precedence, strict types, GC during getters, timeout bounds and signed offsets are covered. Empty supplied-cache rejection uses a constructor-local parse output; the native class ABI and guards are preserved. Omitted cache data and cache production after rejecting empty input are also verified. Node/Home memory, Home collection and console checks pass; Pickier and whitespace checks pass. All 15 additional unchanged pinned script/cache/source-location files passed at the baseline, including test-vm-basic.js. Baseline main: 59d35c06682ece3b876ff8ee80b47c6c4650838e; Bun pin: 4982b91e3702094330f3be3883354c52b8c01323.

Remaining acceptance: the complete traces retain two internal-symbol differences and two warm-source cachedDataRejected differences. These rows receive no full-match credit; this issue remains open. The initial hot-source cache fixture failure, unavailable cast-helper build failure and rejected class-layout experiment remain preserved in the evidence.

8 days ago

Verified native script-options checkpoint (2026-10-14): #891 now has separate construction/execution parsing, ordinary property reads, getter snapshots/precedence, GC-safe temporary values, strict object/view types, uint32 timeout bounds, numeric signed-int32 offsets and empty supplied-cache rejection. Source 197c167da, 798 verified evidence artifacts in f07cacdea. Build 56/56, 59 unchanged pinned originals (14 test cases, 54 process checks, no skips/filtering/retries), seven focused commands and fresh-source empty-cache comparisons passed. Full diagnostic rows retain internal-symbol and warm-cache status differences; #891 stays open. Earlier #889/#890 scopes are complete. Full suite/platform acceptance, independent builds and #885 lifetime acceptance remain open.

Sign in to comment on this issue.