feat(dom): prove INT-08 reconciler runs end-to-end; ship the e2e harness#680
Merged
Conversation
…ess (Refs #183) The dom.affine header said "RUNTIME blocked by #255; no runtime e2e harness is shipped until then (a harness that cannot pass would be dishonest)". #255 was fixed in PR #257 — and the harness now CAN pass, so per the header's own bar, it ships: - affinescript-dom/e2e/run.sh — concatenates src/dom.affine + a driver `main`, compiles to core-WASM, runs under Node against an Int-handle host DOM, asserts the mutation log + final tree. Skips loudly (exit 0) when the compiler or node is absent; AFFINESCRIPT_BIN overrides the binary path for CI. - affinescript-dom/e2e/driver_main.affine — mounts <div id=app class=old>["hello", <span>["x"]]</div>, then reconciles to <div id=app title=t2>["world"]</div>. Exercises every loop-bearing path (the #255 class): render attr+children loops, patch_attrs add+remove (attr_has), and the `while` child-reconcile loop (in-place text patch + surplus-child removal). The affine discipline is load-bearing in the driver itself: `mount` consumes its tree, so reconcile takes a fresh copy — reuse would be a use-after-move type error. - affinescript-dom/e2e/dom_host.mjs — the host: Int-handle node map, mutation log, hard assertions (title added, class removed, text patched in place, span removed, reconcile returned the in-place handle). Observed run (2026-07-07, node 26, dune 3.24 build): query(#root) … setAttr(#2,title=t2) removeAttr(#2,class) setText(#3,"world") remove(#2,#4) <#root> └ <div id="app" title="t2"> └ "world" ALL ASSERTIONS PASS Docs reconciled to VERIFIED (dom.affine header; ECOSYSTEM satellite + INT-08/INT-11 rows; TECH-DEBT INT-08; bindings-roadmap DOM row). INT-11's remaining leg is browser-host parity (this run is Node). Gates: dune build exit 0; doc-truthing OK; soundness ledger all-5 OK; e2e harness exit 0 from the branch's own build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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.




What
dom.affine's header said "RUNTIME blocked by #255; no runtime e2e harness is shipped until then (a harness that cannot pass would be dishonest)." #255 was fixed in PR #257 — and the harness now can pass, so per the header's own bar, it ships. Refs #183 (INT-08).The proof
affinescript-dom/e2e/run.shconcatenatessrc/dom.affine+ a drivermain, compiles to core-WASM, runs under Node against an Int-handle host DOM, and asserts the mutation log + final tree:<div id=app class=old>["hello", <span>["x"]]</div><div id=app title=t2>["world"]</div>for-in/whileloop bodies never execute in compiled programs (pre-existing, untested) #255 class): render attr+children loops,patch_attrsadd+remove (viaattr_has), and thewhilechild-reconcile loop — in-place text patch and surplus-child removalObserved (node 26, dune 3.24 build):
A nice detail: the affine discipline is load-bearing in the driver itself —
mountconsumes its tree, so the reconcile call takes a freshly built copy; reuse would be a use-after-move type error.Docs reconciled to VERIFIED
dom.affineheader;ECOSYSTEM.adoc(satellite + INT-08/INT-11 rows);TECH-DEBT.adoc(INT-08);bindings-roadmap.adoc(DOM row). INT-11's remaining leg is browser-host parity (this run is Node).Gates
dune buildexit 0 · doc-truthing OK · soundness ledger all-5 OK · e2e harness exit 0 from this branch's own build. Harness skips loudly (exit 0) without the compiler or node;AFFINESCRIPT_BINoverrides the binary path for CI.🤖 Generated with Claude Code