architecture: select the canonical memory system of record (proposal: SQLite) #139
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
PR #136's verdict was "right shape around an unfilled center".
store_memory.gohad to fall back to naive map writes (
records[key] = rec) because thecanonical system of record is unselected across the architecture docs
(
docs/wiki/shared-memory-architecture.md: "the canonical memory store has notbeen chosen").
Without a storage backing, an in-memory map cannot provide:
So any patch to issue #137's three priorities without selecting the store is
a temporary mock.
Proposal: SQLite (
memory.db)memory.db) (recommended)store-schema.mdfor the coordination / task board. WAL mode, foreign keys, triggers.system_brain)system_skillsand reviewed docs, not high-frequency episodic recall.How SQLite closes issue #137
canonical_recordskeyed(tenant_boundary, record_id); on key collision with a differingcontent_hash, anON CONFLICTtransaction inserts intoconflict_records(conflict_id, existing_record_id, incoming_payload, detected_at, status='open')instead of mutating the existing row.hierarchy
operator_authored > system_derived > agent_observed; rejectdown-tier replacement unless an explicit
operator_approvaltoken issupplied.
observed_at+ fail-closed staleness. Projectobserved_at; preflight discards records beyond the policy TTL(
WHERE observed_at >= datetime('now','-30 seconds')) and moves the envelopeto
STALE_TELEMETRY.Decision needed
Operator sign-off on SQLite as the canonical store, and confirmation of the
two-projection boundary (OpenViking + Oxigraph remain derived, rebuildable).
Acceptance
shared-memory-architecture.md("What is and is not decided").
canonical_records+conflict_recordswith authorityconstraints.
Go code.
Companion: #138 (retire the term).
Docs update for this decision opened as PR #140: #140
Status update (08.oct.2026) — recording/consistency work has landed; the decision itself is still open.
shared-memory-architecture.md("What is and is not decided")store-schema.mdline fixed in #141 (merged)canonical_records+conflict_recordswith authority constraintsinternal/memory/store_memory.gois still an in-memory mapSupporting evidence for SQLite (now in-repo, not aspirational):
go.modalready requiresmodernc.org/sqlite v1.36.3, andinternal/ledger/ledger.godocuments it aspure-Go SQLite: no CGO, so FreeBSD links statically; the coordination store already runs WAL + foreign keys. Embedded / zero-daemon / pure-Go / native to Debian and FreeBSD is therefore already proven by the task-board store.Remaining to close: operator sign-off on SQLite (item 1), then the schema draft that closes items 2 & 3 and unblocks #137 (the enforcement tracker).
Naming context, not a deliverable here: #142 rebases "split-brain" on the current decisions; it does not affect the store selection.
reference to PR #143 (signed off SQLite memory.db
canonical store + airgap mode with full Jev probe evidence)