-
Notifications
You must be signed in to change notification settings - Fork 0
Umbrella WASM Plugin Compilation
Kadyapam edited this page Jun 17, 2026
·
16 revisions
Tracking issue: noetl/ai-meta#105 · Board: roadmap 3 · ADR: System Worker Pool and WASM Plug-in Surface
Let system-service logic be authored as playbooks on the system worker pool, with the option to compile that logic to a hot-reloadable compiled module managed as a replaceable plug-in library — the ADR's Phase 4 (WASM compilation), designed but not built. Its original home, #46, closed once the system pool shipped (Phases 1-2 live), so Phase 4 tracks here.
The shape (from the ADR — implement, don't re-litigate):
-
wasmtimehost inside the existing worker binary (no new binary), a dispatcher mode for WASM-flagged playbooks. - Compile server-side at catalog-register; store module + digest in the catalog.
-
Hot-reload via catalog version bump — workers cache by
(path, version, digest), invalidate + reload on next claim, no restart. -
Capability-based imports via
wasmtime'sLinker(the wider system-pool capability set). - The catalog is the managed, replaceable plug-in library.
- Interpreted execution stays the default + fallback; WASM is opt-in for plug-ins whose hot loop earns it. Per the ADR's batch-amortisation argument, projector / publisher / materialiser run fine interpreted today.
The ADR fixes where/when compilation happens but not the lowering model — how a playbook becomes a module:
- (A) Transpile playbook → WASM (automated; large — a lowering pass).
- (B) Hand-written Rust plug-ins → wasm32 against a plug-in ABI; the playbook is the catalog manifest (more tractable).
- (C) Hybrid — transpile common cases, hand-written escape hatch.
This choice sets the size of every round.
-
wasmtimehost skeleton in the worker: load/invoke/drop a trivial.wasm; capabilityLinkerwith one host fn. - Catalog-version-keyed module cache + hot-reload.
- Server-side compile-at-register + module/digest storage.
- The lowering pass (per the decision) for a first real plug-in.
- Port
system/materialiser(± projector/publisher) to the compiled path; measure vs interpreted.
| Date | What | Pointer |
|---|---|---|
| 2026-06-16 |
Round 03 — materialiser capability ring + catalog loading. HostCapabilities (noetl.event_publish/result_put/object_put) registered on the Linker, reading key+payload from guest linear memory, dispatched to an injected impl (host does the real write → boundary holds); deny-by-default NullCapabilities; invoke_bytes_with capability injection; PluginSource/ensure_loaded catalog-keyed load (fetch-on-miss, cache-on-hit). 14 plugin tests. Server-side half (HTTP catalog source + compile-at-register) deferred to Round 4. |
PR worker#93 |
| 2026-06-16 |
Round 02 — Arrow byte data-plane ABI. invoke_bytes: alloc-export + linear-memory hand-off so Arrow IPC/Feather buffers cross the boundary with no JSON serialization; a real Arrow IPC buffer round-trips byte-identical. Design recorded: compile target wasm32-wasip1/p2 but capabilities are NoETL host functions (not raw WASI fs/net); Arrow Flight for cross-network; OCI + runwasi distribution. 10 plugin tests. |
PR worker#93 · ADR docs#181 |
| 2026-06-16 |
Round 01 — wasmtime host skeleton. WasmPluginHost: engine + capability Linker, module cache keyed by PluginKey{path,version,digest}, run invoke, hot-reload via evict_other_versions, capability ring by construction, REFERENCE_PLUGIN_WAT. Off-by-default wasm-plugin feature; 6 tests; not yet wired. Lowering = hybrid (confirmed). worker v5.23.0. |
worker#92 · PR worker#93 |
| 2026-06-16 | Umbrella opened — Phase 4 of the system-pool ADR re-homed here after #46 closed; #104 blueprint reshaped to route services to the plug-in ring | #105 · ADR Phase 4 |
-
Decide the lowering model— hybrid (C) chosen: reference plug-in first, then a playbook→WASM lowering pass. -
Round 1: the— done (worker#93).wasmtimehost skeleton -
Round 2: Arrow byte data-plane ABI— done (worker#93). -
Round 3: capability ring + catalog-keyed loading— done (worker#93). Worker host contract fixed; capability ring +ensure_loadedin place. - Round 4 (server-repo): the live
PluginSource— server catalog plug-in endpoint (fetch module by path/version/digest) — + server-side compile-at-register (store compiled module + digest). Open anoetl/serversub-issue. - Round 5: the hybrid lowering pass for a first real plug-in; port
system/materialiserto the compiled path (its capability impl wrapsControlPlaneClient+ object store); measure vs interpreted.
- Umbrella: Event WAL Storage (#104) — the materialiser is a plug-in-ring system playbook; this umbrella is its compiled-hot-path capability.
- #46 (closed) — System Pool Design; this is its unbuilt Phase 4.
- Home — overview
- Repo Map
- Releases
- Sessions Log
- Secrets Wallet (#61) — SECURITY (design)
- Rust Server Port (#49) — PRIMARY
- Decoupled Context + Event Chain (#115) — RFC (design), reframes #101
- Orchestrator Scaling (#101) — reframed by #115; consume side = #115 Phase 1
- Event WAL + Derivable Storage (#104) — Round 01 (locator) PR open
- WASM Plug-in Compilation (#105) — system-pool plug-in hot-reload (ADR Phase 4)
- System Pool Design (#46) — PRIMARY
- Regression Baseline Migration (#98) — e2e
- Subscription / Listener Tool (#90) — RFC
- Container Tool Callback (#43)
- Rust Worker Parity Gaps (#47 · #48)
- Event Envelope Reconciliation (#51 in TaskList)
- Cursor Loop Mode (#100) — server v3.8.0 + tools v3.10.1, 2026-06-15
- Transfer Tool Credentials (#99) — tools v3.10.0 + worker v5.22.0, 2026-06-14
- Explicit Input Binding (#77) — v3.0.0 shipped 2026-06-09
- Rust Worker Migration (#30)
- Python Services → Rust (#45)
- Issue Tracking
- Wiki Convention
- Handoffs
- Deployment Validation
- Execution Model
- Data Access Boundary
- Observability
- noetl/noetl wiki — app + DSL
- noetl/server wiki — Rust control plane
- noetl/worker wiki — Rust pull worker
- noetl/tools wiki — tool registry crate
- noetl/cli wiki — CLI + local mode
- noetl/gateway wiki — gatekeeper
- noetl/ops wiki — Helm + manifests
- noetl/travel wiki — domain SPA reference
- Docs site — engineer-facing architecture