Enforce root-owned adapter lifecycles

This commit is contained in:
tmk241
2026-09-01 09:43:38 +02:00
parent 53f0a5db1a
commit 9e12b1eb46
5 changed files with 124 additions and 139 deletions
+5 -11
View File
@@ -7,18 +7,12 @@ Proof: Focused Redgate checks, workspace gates, request-boundary tests, navigati
Residual risk: Browser behavior is deterministically checked at generated-markup, runtime, and Axum boundaries rather than through an external browser harness.
## Slice HMX-003 — Direct adapters and explicit islands
## Closed receipt — HMX-003
Result: Direct SSE, WebSocket, polling, reveal, and event adapters bind once per owned root, clean removed fragments, carry canonical batches, and preserve explicit islands.
Proof: Focused lifecycle, nested-root ownership, transport-byte, island, closed-core, no-client-store, Axum boundary, Redgate, workspace, and fresh-context checks passed.
Residual risk: Browser lifecycle is deterministically checked at the runtime source boundary rather than through an external browser harness.
Outcome: Optional transports and local islands compose with the generic runtime without adding effect schemas, a plugin registry, or mirrored client application state.
Delta: runtime/006–008, boundary/001–004, axum/002.
Path: root-owned adapter or explicit island marker -> direct bind/scan/cleanup lifecycle -> unchanged effect batch or island-owned subtree -> deterministic ownership result.
Build: Keep generic runtime behavior in `hemx-js`, framework transport in `hemx-axum`, direct adapter lifecycle beside each adapter, and explicit morph boundaries around islands.
Risk: Duplicate binding, leaked cleanup, or ambiguous ownership can apply effects twice, cross roots, or overwrite island state.
Checks: Browser lifecycle scenarios for bind-once, inserted fragments, removal cleanup, wrong-root rejection, and island preservation; static/public-API checks excluding plugin registries, extra core effects, and client stores; unchanged-byte transport tests; `redgate check` for the slice IDs.
Non-goals: New transports, a general extension API, or application-specific island frameworks.
Residual risk: Adapter-specific network behavior remains owned by each optional adapter.
State: Ready
Blocked by: none
## Slice HMX-004 — Deterministic generation and portable server build