Repository navigation
Description
Context
Epic #273 gap (2): "store is local flat files, not a private verisimdb via snif (snif boundary is pure aspiration; freestanding-wasm cannot reach verisimdb -- architectural gap)".
Audit produced a decision-ready memo, committed in-tree as docs/architecture/boundary-design-options.adoc (see open PR -- linked at bottom).
The hard finding (decision driver)
The naive target chain VCL → SNIF → verisimdb cannot be built as stated:
- SNIFs are
wasm32-freestandingwith zero imports -- no filesystem, no network, no clock. WASI is listed as unspecified future work insnifs/docs/whitepapers/academic/snif.tex(~639-644). verisimdbhas no octad/VCL-native embeddable surface a freestanding guest could use;verisim-nifis currently a placeholder (returns{"status":"nif_placeholder"}).- The conformant VCL parser is ReScript + Idris2 (
vcl-ut); there is no conformant Elixir or Zig parser anywhere in the estate.
Any viable architecture must either (a) keep the DB hop host-side, (b) upgrade the SNIF to WASI, or (c) drop the SNIF from the data path.
Decision request
Rule on one boundary question:
Does the VCL parse+typecheck stage run inside the SNIF sandbox (A), inside the SNIF with WASI I/O so it can also reach the DB (B), or in-process in Elixir with no SNIF on the data path (C)?
| A -- Split (RECOMMENDED) | B -- WASI SNIF | C -- No SNIF on data path | |
|---|---|---|---|
| SNIF used for VCL safety | Yes (pure check) | Yes (+ I/O) | No |
| Impossible wasm→db hop avoided | Yes (host-side DB) | N/A (WASI grants I/O) | Yes (no SNIF) |
verisim-nif prerequisite |
Required (M) | HTTP/gRPC real instead (≥M) | Required (M) |
| Parser work | Idris2-spec → Zig SNIF (M-L) | A's parser + guest DB client (L) | Idris2-spec → Elixir (M-L), non-conformant |
| Safe-boundary property kept | Yes | Weakened (guest gets I/O) | Lost for VCL |
| Effort tier | L | L+ | M |
| Time-to-first-store | Medium | Slowest | Fastest |
Secondary ruling (only if A or B): confirm parser strategy -- port the Idris2 core to a wasm32-freestanding Zig SNIF, differential-tested against the ReScript reference. (Recommended.)
What ruling unlocks
- A: verisimdb-side
verisim-nifreal implementation + private-instance lifecycle, then hypatia-side Idris2→Zig SNIF parser port + boundary module +verisim_connector.exre-target. - B: all of A's hypatia-side work plus WASI binding spike in
wasmexplus in-guest verisimdb client. - C: verisimdb-side
verisim-nifreal implementation, then Elixir VCL parser/checker port from the Idris2 spec; no SNIF on the data path.
Out of scope
- The
verisim-nifreal implementation is verisimdb-side work and should be tracked there once a ruling lands. - This issue only asks for a ruling, not for an immediate build. Build issues spin off afterwards.
Companion PR
docs(arch): add boundary-design-options.adoc (#273 gap 2, decision-ready) -- adds the full memo to docs/architecture/. (PR link will be posted in this issue once opened.)
Parent: #273.
Activity
docs(arch): add boundary-design-options.adoc (#273 gap 2, decision-re…
chore(arch): session record (#273 four-gap landing) + README boundary…
chore(arch): session record (#273 four-gap landing) + README boundary…
docs: reflect M9 / M10 / M13 / M14 / M15 / M16 + Issue #141 done
docs: M17 + M18 done, M19-M21 added, gap entries closed
Post-#313: M17 + M18 + M9 longitudinal + container hardening + 5 desi…
hyperpolymath commentedon May 25, 2026
Status — 2026-05-25
Decision memo extending
docs/architecture/boundary-design-options.adocis now committed at:docs/operations/issue-294-boundary-recommendation.adoc(via PR #314, moved intodocs/operations/by PR #315).Recommendation: Option A — Split (SNIF for VCL parse+typecheck only; host-side NIF for the DB hop).
Three reasons summarised:
wasm32-freestandingwith zero imports is the security property; Option B trades it away for I/O capability we already have host-side.verisim-nifreal implementation is unavoidable in all three options — Option A/B/C all need it, so the cost is equivalent.If ruling lands as A, two follow-up milestones get opened:
verisim-nifreal implementation (verisimdb-side work).If B or C, the memo's "If you pick B/C" sections describe the alternate work plan.
Still open — awaiting ruling. Reply on this issue with
Decision: A,Decision: B, orDecision: Cto commit.Generated by Claude Code
docs: tidy root + adopt rsr-template-repo doc taxonomy (#315)
docs: comprehensive session summary + STATE bump (97 → 98)
hyperpolymath commentedon May 27, 2026
Decision: A — split. M19 + M20 to be opened.
Per the recommendation memo at
docs/operations/issue-294-boundary-recommendation.adoc(committed 2026-05-24) and the design memo atdocs/architecture/boundary-design-options.adoc. Owner ruling 2026-05-27.The SNIF performs VCL parse + typecheck only (pure computation, zero imports kept). The VCL → DB hop runs host-side via
verisim-nif. Idris2 reference invcl-utstays canonical; the Zig SNIF port differential-tests against it.Unlocked work:
verisim-nifreal implementation (verisimdb repo): M19: verisim-nif real implementation (host-side, replaces nif_placeholder) [hypatia#294 unlock] verisimdb#61verify/differential-test rig: M20: Idris2 → Zig SNIF parser port + verify/ differential-test rig [hypatia#294 unlock] #367Closing this issue as ruled. M19 + M20 are the execution trackers.
hyperpolymath commentedon May 27, 2026
Ruled A (split). Tracking unlocked work at hypatia#367 + verisimdb#61. Closing.