ReviewOS

home-lang/home

Native HTML web corpus: remove FormData child and memory substitutes

#702
Closed chris opened this 9 days ago ·
9 days ago

Published completion

Published to origin/main as Chris Breuer, with no coauthors:

  • e1a5d0e20be95fbbb5478fe9712a5ccae733f641: all five HTML web files execute natively; fabricated FormData JSON child output and RSS results are removed; reproducible discovery audit added.
  • 6448d628a4cf985dc960a2adc40344f9732e1927: native triage scanner preserves original test deadlines and no longer retries timeout-only failures with an override.
  • 1cbac2921af857bf5ce081f53b3cc0c4c3ab7a9f: final integrated verification record.

The combined runtime includes origin/main's fixes through 2babc1595. Final optimized build 46/46 steps; focused harness 23/23 steps / 3/3 tests. Independent metadata confirms the actual original-file matrix, substitute-removal/workload checks and registration guard.

Both ordinary HTML directory execution and a separate single-native-VM HTML aggregate pass 145 tests / one upstream Linux-only skip / zero failures; the native aggregate has 530 assertions, matching the fresh pinned-Bun aggregate. Home's real file-error child reports 100 iterations / 1.78 MB growth, versus 1.75 MB in pinned Bun, within the unchanged 10 MB limit. An initial reference invocation used incorrect startup variable names and failed to load the internal allocation-test binding; that setup log remains separate from the corrected control. No original assertions, source bytes or deadlines changed.

Adjacent ordinary routes pass: Blob 65/65, body/stream 9,467 passes / four upstream skips, Headers/Response 170/170, Request 24/24, bootstrap FormData 5/5, microtasks 2/2. #701 remains open and unexplained despite this Request pass; #694 also remains open.

The deadline-scanner negative control ran a deliberately timed-out fixture exactly once and retained fail. This is scanner validation, not Home corpus coverage. Shell syntax, scoped Pickier, Zig formatting and whitespace checks pass. Pinned-object integrity verifies 12,990 identical regular files, five raw-identical symlinks, zero missing paths and zero executable-mode differences; only the historical expectations metadata differs.

Durable logs: zig-out/bun-port-702/. Verified Home SHA-256: 4a937ded48d609b76e336fdc192dd96439653a228073a234aaafcba176a5e783.

#702 is complete for HTML native activation and its two substitute removals. Full logical parity is not complete. #703 owns the next broad native discovery/execution migration: 4,267 of the 4,708 currently classified paths still use the adapter; pinned upstream pre-exclusion discovery has 4,754 tracked paths, with 78 missing and 32 extra Home classifications. Full native aggregate, platform execution and independent native build ownership remain unfinished under #66/#202/#703. The audit is reproducible with python3 scripts/audit-bun-corpus-discovery.py --zig /path/to/zig --output audit.json.

Original scope and baseline

Part of #66 and #202; follows #700's native Blob activation.

Activate all five original test files in test/js/web/html through native Home and remove the remaining FormData child-process/memory substitutes.

Verified baseline

Pinned Bun source: 4982b91e3702094330f3be3883354c52b8c01323. Home baseline: published 04644b2d07bdd4868072e5014ea8a7762d51705c, binary SHA-256 68fcba6aed61397b1fe94fe1c2e4291644e68324c6ee4097f2a9f5adfabc181f.

Each unchanged file was run once per runtime, from the mirrored project root with upstream startup internal-testing/GC defaults. These are separate strict-native runs, not ordinary-route activation or a single-VM aggregate.

Original filePasses eachUpstream skips eachAssertions each
FormData-file-error-leak.test.ts102
FormData-multipart-serialization.test.ts316
FormData.test.ts1290489
URLSearchParams.test.ts11029
html-rewriter-doctype.test.ts104

Total per runtime: 145 passes / one upstream platform skip / zero failures / 530 assertions. The skipped multipart memory case is Linux-only and receives no implementation credit on this macOS host. Home's real file-error child reports 100 iterations / 1.77 MB growth, within the unchanged 10 MB non-ASAN threshold.

Concrete substitutes to remove

In packages/home_test/src/corpus_runner.zig:

  • __home_spawn_formdata_tojson_fixture fabricates the original FormData-to-JSON child's stdout instead of executing that child.
  • A --smol / FormData-file-error-leak-fixture.ts branch returns fabricated baselineRss: 1024, finalRss: 2048, growthMB: 0 and a successful exit. Remove this branch rather than treating it as memory coverage.

Remove definitions/call sites and migrate associated bootstrap execution coverage to the complete original native files. Preserve generic adapters only where they remain needed for separately tracked files.

Acceptance

  • Activate all five original files, including the complete ordinary js/web/html directory route.
  • Remove both fake child paths and preserve real process execution, RSS measurements and failure handling.
  • Preserve original 256 KiB file size, 100 measured iterations, original 10-iteration initial phase, --smol, ENOENT behavior, GC calls, threshold, multipart bytes, prototype/URL mutations and doctype assertions. No extra warm-ups, retries, deadline increases, snapshot edits or reduced workloads.
  • Retain the Linux-only upstream skip explicitly.
  • Run focused tests with verified discovery, the complete ordinary directory and adjacent native Blob/body/Headers/Response routes plus appropriate remaining bootstrap coverage.
  • Re-audit original corpus bytes, commit/push to origin/main as the user without coauthors, and update #66/#202 with exact evidence and remaining limitations.

Local evidence: /tmp/home-700-html-baseline.log, /tmp/home-700-html-baseline.json, /tmp/home-700-html-results/.

9 days ago

#700 is published on origin/main in f491cacd7. All six original Blob files execute natively: 65 passes, no failures/TODOs/unsupported cases. The UTF-16 child interception, global filename-specific prototype-property override and synthetic descriptor lookup are removed. The build passes 46/46 and the focused harness 4/4 with verified discovery.

The current ordinary body, Headers/Response, Request and selected bootstrap regressions pass. #701 remains open for the previously observed Request deadline failure. Direct auditing against the pinned Git objects verifies all executable source bytes, raw symlink targets and executable modes, with only the historical expectations-file content difference.

#66 is updated and #700 is closed. #202 now explicitly distinguishes its historical adapter-green claim from real native parity. #702 remains the next HTML web activation/removal batch; full aggregate/parity and remaining semantic substitutes/build ownership are still incomplete.

9 days ago

Implementation is now committed on main after integrating the concurrent runtime fixes through 2babc1595470d2339e4e9b744093b11691455a22. Commit: e1a5d0e20be95fbbb5478fe9712a5ccae733f641, authored and committed as Chris Breuer without coauthors.

The previous build sessions and temporary logs disappeared during an interruption. A subsequent build was deliberately superseded when origin/main's runtime changes were integrated. The combined source is now rebuilding; final HTML/adjacent test verification is still pending, so this issue remains open and no new runtime pass count is claimed. Durable logs now live in zig-out/bun-port-702/.

The repository now includes scripts/audit-bun-corpus-discovery.py and docs/docs/bun-corpus-discovery-audit.json. The command independently reproduces the #703 discovery/route findings and source hashes without running the corpus. Pinned-source integrity remains 12,990 identical regular files, five identical raw symlinks, zero missing paths/mode differences, and the historical expectations metadata difference.

Sign in to comment on this issue.