Spun out of #179 closure 2026-05-31. The INT-02 substrate is shipped + proven; what's not settled is whether the satellite shell repo (hyperpolymath/affinescript-dom-loader) should still be scaffolded as a separate artifact, or whether packages/affine-js has effectively subsumed it.
State today
| Piece |
Where |
Status |
| Host-agnostic loader substrate |
packages/affine-js/loader.js |
PROVEN + locked (#250 + #267 → 14 unit tests + real-wasm e2e harness) |
| Browser/Deno/Node parity |
detectHost + readBytes via Deno.readFile / node:fs+fileURLToPath / fetch |
✅ in substrate |
| Multi-namespace import object |
buildImportObject (legacy env merge + INT-01 cross-module namespaces) |
✅ in substrate |
| Ownership-section accessor |
parseOwnershipSection (round-trips compiler binary format) |
✅ in substrate |
affinescript-dom-loader satellite repo |
nonexistent |
open question — this issue |
affinescript-dom reconciler |
#183, in-repo src/dom.affine, compiles end-to-end, runtime blocked by #255 |
separate track (INT-08) |
| INT-05 / INT-08 / INT-11 |
per ECOSYSTEM |
INT-02 dep cleared; reconciler runtime still needs #255 |
The question
When the satellite registry was reconstructed (#175, 2026-05-19), affinescript-dom-loader was an imaginary downstream shell. The substrate then landed in-tree in packages/affine-js and turned out to be fully host-agnostic — meaning a browser/DOM consumer can already import the loader directly from affine-js without any DOM-specific wrapper.
So: does the satellite repo still earn its keep?
Option A — Fold into affine-js, retire the satellite name (recommended pending owner call)
packages/affine-js already does Deno/Node/browser parity; there is no DOM-specific behavior the loader needs that isn't already in the substrate.
- INT-11 ("DOM loader + reconciler end-to-end") becomes:
affine-js loader + affinescript-dom reconciler, no third repo.
- ECOSYSTEM satellite-registry row gets removed, not just truthed.
- Pros: one fewer repo to maintain, one fewer publish/version surface, matches what the code actually is.
- Cons: loses the symmetry of "one satellite per integration concern"; if a DOM-specific loader surface emerges later (e.g.
<script type=\"application/wasm-affine\"> discovery, shadow-DOM-scoped instance roots, MutationObserver-driven re-hydration), it'd have to be re-extracted.
Option B — Scaffold the satellite as a thin re-exporter package
- New repo
hyperpolymath/affinescript-dom-loader: deno.json + mod.ts re-exporting from jsr:@hyperpolymath/affine-js plus DOM-side conveniences (mountWasmModule(el, url, opts), <affine-app src> custom element, etc.).
- Pros: clean public dep surface for browser apps ("
import { mountWasmModule } from '...'" is more discoverable than "reach into the runtime's loader").
- Cons: real maintenance cost; the DOM-side conveniences don't exist yet, so the repo would be ~empty on day one and would only justify itself once INT-08 wiring is real.
Option C — Defer until INT-08 reconciler runtime is unblocked (#255), then decide
Recommendation
Option C for now, with Option A as the likely landing if INT-08 doesn't surface anything DOM-loader-specific. The substrate did its job; creating an empty satellite repo today would be premature and just adds estate surface that has to be maintained, license-audited, hypatia-scanned, etc.
Acceptance criteria for closing this issue
Refs: #179 (substrate), #183 (INT-08 reconciler), #255 (wasm loop-codegen blocker), #175 (integration roadmap index).
Spun out of #179 closure 2026-05-31. The INT-02 substrate is shipped + proven; what's not settled is whether the satellite shell repo (
hyperpolymath/affinescript-dom-loader) should still be scaffolded as a separate artifact, or whetherpackages/affine-jshas effectively subsumed it.State today
packages/affine-js/loader.jsdetectHost+readBytesviaDeno.readFile/node:fs+fileURLToPath/fetchbuildImportObject(legacyenvmerge + INT-01 cross-module namespaces)parseOwnershipSection(round-trips compiler binary format)affinescript-dom-loadersatellite repoaffinescript-domreconcilersrc/dom.affine, compiles end-to-end, runtime blocked by #255The question
When the satellite registry was reconstructed (#175, 2026-05-19),
affinescript-dom-loaderwas an imaginary downstream shell. The substrate then landed in-tree inpackages/affine-jsand turned out to be fully host-agnostic — meaning a browser/DOM consumer can already import the loader directly fromaffine-jswithout any DOM-specific wrapper.So: does the satellite repo still earn its keep?
Option A — Fold into
affine-js, retire the satellite name (recommended pending owner call)packages/affine-jsalready does Deno/Node/browser parity; there is no DOM-specific behavior the loader needs that isn't already in the substrate.affine-jsloader +affinescript-domreconciler, no third repo.<script type=\"application/wasm-affine\">discovery, shadow-DOM-scoped instance roots, MutationObserver-driven re-hydration), it'd have to be re-extracted.Option B — Scaffold the satellite as a thin re-exporter package
hyperpolymath/affinescript-dom-loader: deno.json + mod.ts re-exporting fromjsr:@hyperpolymath/affine-jsplus DOM-side conveniences (mountWasmModule(el, url, opts),<affine-app src>custom element, etc.).import { mountWasmModule } from '...'" is more discoverable than "reach into the runtime's loader").Option C — Defer until INT-08 reconciler runtime is unblocked (#255), then decide
for-in/whileloop bodies never execute in compiled programs (pre-existing, untested) #255 (for-in/whilebody codegen) still open, the reconciler doesn't actually run end-to-end yet, so we don't know that surface.for-in/whileloop bodies never execute in compiled programs (pre-existing, untested) #255 + INT-08: DOM reconciler in affinescript-dom #183; re-evaluate when INT-08 runtime turns green.Recommendation
Option C for now, with Option A as the likely landing if INT-08 doesn't surface anything DOM-loader-specific. The substrate did its job; creating an empty satellite repo today would be premature and just adds estate surface that has to be maintained, license-audited, hypatia-scanned, etc.
Acceptance criteria for closing this issue
for-in/whileloop bodies never execute in compiled programs (pre-existing, untested) #255; re-evaluation issue auto-filed when INT-08: DOM reconciler in affinescript-dom #183 runtime turns greenRefs: #179 (substrate), #183 (INT-08 reconciler), #255 (wasm loop-codegen blocker), #175 (integration roadmap index).