Purpose. Tailored view onto the substrate-b endgame architecture from
AdaWorldAPI/lance-graph's perspective. The master doc lives inAdaWorldAPI/OGAR/docs/SUBSTRATE-ENDGAME.md(full five-rooms map); this doc highlights the runtime-side slice and cross-references the PRs in this repo that land each room's runtime dependencies.Why a tailored view. The endgame architecture spans four repos (OGAR, lance-graph, ractor_actors, openproject-nexgen-rs) plus the ruff fork producers and the surrealdb fork DDL builders. The master doc in OGAR is comprehensive but spans all of it. This view lets a lance-graph session pick up the runtime-side concerns without reading the full master (which they should still read for context).
Companion:
OGAR/docs/ARCHITECTURAL-DECISIONS-2026-06-04.md(ADR-style backward-looking session capture). ADR-008 (commit_eventsibling) and ADR-009 (temporaltwo-axis engine) are the lance-graph-owned decisions; ADR-018 (Kanban polyglot dispatcher) is the runtime-side architecture this view foregrounds.Status: CARVED v0 (2026-06-05). Mirror of
OGAR/docs/SUBSTRATE- ENDGAME.mdfor runtime-side concerns. Master doc is authoritative; this view stays consistent with it on per-quarter review.
ROOM 1 (TODAY) What lance-graph ships
───────────────────── ─────────────────────────────────────────
substrate primitives ──► lance-graph-contract (canonical types)
lance-graph-ontology (OntologyRegistry,
MappingProposal, SchemaSource, TTL
hydrators incl. wikidata_hhtl)
lance-graph-callcenter (LanceMembrane +
commit_event sibling — PR #467, merged)
lance-graph-planner::temporal (classify +
deinterlace + EpistemicMode + HLC-aware
QueryReference + DependsClosure trait
— PR #468, open)
lance-graph-supervisor (ractor-supervised
callcenter actor tree)
cognitive-shader-driver (CognitiveEventRow,
Markov ±5 trajectory)
ROOM 2 (MIGRATION SCAFFOLD) What lance-graph adds
───────────────────────── ─────────────────────────────────────
Kanban polyglot interface ──► formalize the work-item trait that admits
multiple executable forms (native ractor
handler / BEAM call / interpreter / HTTP
sidecar / CRuby / reflection-dump)
— Kanban primitive in SOA-IMPLEMENTATION §5.2
— new work-item-form-registration trait
§14 oracle harness ──► record-replay protocol for per-actor
graduation verification:
record(migration form) -> tape ->
replay(native candidate) -> verdict
bucket (PASS / DIVERGENT-RECONCILABLE /
DIVERGENT-FAULTY / INDETERMINATE)
HTTP-sidecar bridge ──► Rust HTTP client issuing per-action POSTs
to a Rails Puma sidecar; decoding responses
to Transition<State> + commit row
BEAM bridge (optional) ──► Erlang Port or NIF for HIRO/Bardioc-side
migration; alternative: tiny Elixir AST
interpreter crate
ROOM 3 (OP-AS-OPERATOR-PANE) What lance-graph enables
───────────────────────── ─────────────────────────────────────
OP hosted on substrate ──► callcenter actors per OGAR Class
(WorkPackage, Project, Status, etc.)
Hotwire / version_watcher push stream
for live UI updates
Workflow → live Rubicon ──► RubiconWriter Phase 2 supports dynamic
regeneration when Workflow table rows
change (operator admin UI edits propagate
to in-process Rubicon machines without
restart)
ROOM 4 (VISUALIZATION) What lance-graph emits
───────────────────── ─────────────────────────────────────
OpenTelemetry exposition ──► Lance commits/sec, ractor mailbox depth,
Rubicon transition counters, temporal
classify ratios (CONTEMPORARY /
ANACHRONISTIC / SPOILER), HLC drift,
§14 verdict ratios — standard Prometheus
metric exposition
Substrate event stream ──► version_watcher → WebSocket / SSE for
live operator-UI updates; cognitive-event-
row stream for sexy-tier visualizations
ROOM 5 (SDK ENDGAME) What lance-graph contributes
───────────────────── ─────────────────────────────────────
Stable public API ──► SemVer-pin lance-graph-contract /
lance-graph-ontology / lance-graph-planner /
lance-graph-callcenter (each ratchets to 1.0
on their own timeline)
Runtime documentation ──► getting-started for substrate runtime
consumers (separate from OGAR's
producer-side getting-started)
Reference deployment ──► substrate-b hosting OP in production;
prove the runtime side end-to-end
lance-graph-contract— zero-dep canonical types (Schema,LinkSpec,SemanticType,Marking,PropertySpec,Cardinality,CodecRoute,ExternalMembrane). Implementation crates depend on this; this crate depends on nothing. Status: stable.lance-graph-ontology—OntologyRegistry+MappingProposalSchemaSourcetrait + TTL hydrators (SKOS, PROV-O, schema.org, FIBO, Odoo, ZUGFeRD, SKR03/04,wikidata_hhtl) + 47KB Lance dictionary cache.odoo_blueprintprovides 15-lane typedOdooEntityconsts (OGAR's runtime-IR equivalent for Odoo source). Status: stable;lance-bindSprint-5b is the receiver of OGAR-sideMappingProposalflow.
lance-graph-callcenter—ExternalMembraneimpl;LanceMembrane::commit_event(row: CognitiveEventRow) -> u64sibling shipped in PR #467, merged. Pairs withExternalMembrane::project()(cognitive-cycle path). Action-commit path skipsShaderBus. Per ADR-008.lance-graph-planner::temporal— the deinterlace engine, in PR #468 (open as of 2026-06-04 → may be merged by future sessions). Surface:EpistemicMode {Strict, Aware, Retro}+QueryReference {server_id, ref_version, hlc_tick: Option<u64>, mode, rung}+classify(row_version, knowable_from, v_ref) -> Classification+deinterlace(rows, v_ref, deps)+DependsClosuretrait (TIME-causalhlc_tick+ DATA-causalDependsClosureaxes). Per ADR-009.lance-graph-supervisor— ractor-supervised callcenter actor tree (PR-G2 / TD-RACTOR-SUPERVISOR-5).cognitive-shader-driver— cognitive-cycle row producer (the substrate's other write path; co-located with Lance).
Three pieces lance-graph adds for the Kanban-as-polyglot-dispatcher pattern (per ADR-018):
-
Work-item-form trait — the Kanban dispatcher's interface that admits multiple executable forms (native ractor handler / BEAM call / interpreter / HTTP RPC / CRuby FFI / reflection-dump-only). Probably lives in
lance-graph-callcenternext to the existing actor registration. Architecture pinned in OGAR PR #20 (SUBSTRATE-ENDGAME.md §2); implementation pending. -
HTTP-sidecar bridge — Rust client issuing
POST /api/v3/...to a Rails Puma deployment, decoding JSON responses toTransition<State>+ commit row. Engineering: standard HTTP client + retry/auth/telemetry; new crate or module in callcenter. -
§14 oracle harness — record-replay infrastructure for per-actor graduation verification. Per
SUBSTRATE-ENDGAME.md §2.4: record tape against migration form, replay against native candidate, compare provenance-normalized, emit verdict bucket.
Optional fourth: BEAM bridge (Erlang Port or NIF) for HIRO/Bardioc migration. Alternative: tiny Elixir AST interpreter crate.
When OP graduates onto substrate-b per Room 2:
- Callcenter actors per OGAR Class — OP's WorkPackage, Project, Status, User, Role, Workflow each get a ractor actor in the substrate's supervision tree.
- Hotwire / version_watcher push stream — OP's existing
WebSocket / Hotwire stream wires through to
lance-graph-callcenter::version_watcherso the UI updates from substrate state directly. - RubiconWriter Phase 2 dynamic regeneration — when OP's Workflow table rows change (operator admin UI), the in-process Rubicon machine for the affected class regenerates without restart. Requires Rubicon-from-OGAR codegen to support dynamic emission; runtime session's Phase 2 work.
The substrate is observable by design; runtime exposes the metrics:
- OpenTelemetry / Prometheus exposition from existing
instrumentation crates. Standard
tracing-opentelemetrysetup; emit per-actor and per-class metrics, Lance-dataset stats, deinterlace ratios. - Cognitive-event-row stream for sexy-tier visualizations.
Existing
cognitive-shader-driverrow producer; expose via WebSocket / SSE for the four-frame deinterlace visualizer + the cognitive trajectory animation. - Actor-tree topology API — runtime endpoint exposing the live supervision tree shape for 3D-topology visualizations (CytoscapeJS / three.js).
- Stable public API across lance-graph crates — each crate ratchets to 1.0 on its own timeline; SemVer pinning; deprecation paths documented; cross-crate version compatibility matrix.
- Runtime getting-started doc — for substrate consumers (separate from OGAR's producer-side getting-started). Cover: setting up a Lance dataset, registering classes via SchemaSource, dispatching work-items through callcenter, reading via temporal classify, etc.
- Reference deployment — substrate-b hosting OP in production; the visible run-time validation point.
AdaWorldAPI/OGAR/docs/SUBSTRATE-ENDGAME.md— the comprehensive five-rooms architecture; this view is the runtime slice.AdaWorldAPI/OGAR/docs/ARCHITECTURAL-DECISIONS-2026-06-04.md— ADR-style backward-looking session capture; ADR-008 (commit_event), ADR-009 (temporal two-axis), ADR-018 (Kanban polyglot) are the lance-graph-touching decisions.AdaWorldAPI/OGAR/docs/OGAR-AST-CONTRACT.md— the typed surface callcenter actors lower onto; §3 binding references temporal + CommitHook + commit_event.AdaWorldAPI/OGAR/docs/SURREAL-AST-AS-ADAPTER.md— structural-vs- behavioral decision (ADR-016); §6 covers migration scaffold counterpoint.
AdaWorldAPI/ractor_actors—feat/state-machine-actor @ 38a71a4is the canonicalStateMachinecrate Rubicon-from-OGAR binds onto (per ADR-007).AdaWorldAPI/lance-graph/PR #467—LanceMembrane::commit_eventsibling (merged).AdaWorldAPI/lance-graph/PR #468—temporal::classify+deinterlace+DependsClosure(open as of 2026-06-04).AdaWorldAPI/bardioc/CROSS_SESSION_COORDINATION.md— the authoritative cross-session coord doc (runtime-session-owned).knowable_frommeet-point pin (per ADR-010) mirrors fromOGAR/docs/OPENPROJECT-TRANSCODING.md §10.3.
In addition to the in-flight items listed in OGAR's master doc:
- Cross-server HLC merge policy —
QueryReference.hlc_tick: Option<u64>is HLC-aware in signature; cross-server merge policy is deferred body work. Lands when peer-Raft / cluster bus comes online. temporal::deinterlacepostpone-replay-ordering test at scale — single-actor FIFO is verified; multi-actor concurrent postpone- queue interaction at scale is the harder property.- Work-item-form trait + per-actor registration table — Room 2 primary lance-graph work item.
- §14 oracle harness — record-replay infrastructure. Pairs with the OGAR-side producer; runtime owns the storage + replay layer.
- RubiconWriter Phase 2 (Rubicon's durable home +
KvLanceWriterbackend) — pairs withLanceMembraneWriter; both share the same Lance 7.0.0 commit contract.
- Author: OGAR session 2026-06-04 (placed cross-repo 2026-06-05).
- Status: Mirror view; master in OGAR.
- Update cadence: when the master doc (
OGAR/docs/SUBSTRATE- ENDGAME.md) updates, mirror relevant changes here. When lance-graph-side items graduate (e.g. Room 2 work-item trait lands), add a one-line update to the relevant section. - Authority: master in OGAR. This view is for navigation; decisions cite OGAR docs.
For the runtime session to pick up where this view leaves off, in approximate priority order:
lance-graph PR #468landstemporalon main — unblocks downstream consumers (Rubicon's repointing from local placeholder to the canonicaltemporal::classify).- Rubicon's durable home + Phase 2 —
RubiconWritertwo backends (LanceMembraneWriter+KvLanceWriter). - Work-item-form trait in callcenter — enables Room 2.
- HTTP-sidecar bridge — first migration scaffold variant.
- §14 oracle harness — verifies graduation.
- First OP per-actor graduation end-to-end —
WorkPackage#savevia HTTP sidecar → native ractor handler. - OpenTelemetry exposition + Grafana panels — Boring tier visualization.
- Stable public API + SemVer pinning — Room 5 prep.
Each unlocks the next; total timeline per master doc §6.7 is 12-24 months from Room 1 to demonstrable Room 5.