feat(memory): Step 4 unified memory contract, Oxigraph client, and Boundary 1 state envelope #136
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/step-4-memory-subsystem-scaffold"
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?
Summary
Step 4 of the Go migration: the unified
internal/memorysubsystem — thelogical memory contract, a standardized provenance envelope, the
state.oxigraphclient, and the Boundary 1 state envelope builder that groundsJev System-1 preflight in deterministic capacity evidence.
Touched:
internal/memory/{contract,provenance,envelope,oxigraph,store_memory}.go(+ tests),
docs/wiki/go-migration.md,docs/wiki/jev-transport.md.Verification (local, on
5cab8d2)go vet ./internal/memory/...— cleango test ./internal/memory/...— okgo test -race ./internal/memory/...— ok (10 tests, 20 incl. subtests)How it maps to the architecture direction
shared-memory-architecture.md: "remember, recall, forget, improve"Storeinterface (Remember/Recall/Forget/Improve/Get)source_ref+derived_at+derivation_methodProvenanceEnvelope(+ SHA-256content_hash)state.oxigraph= provenance-bearing projectionOxigraphClient(read-only) +MockOxigraphClientHARD_EXHAUSTIONBuildBoundary1Envelope— the doc's own 6 GB-vs-4 GB + Ollama prototype, materializedThis is a faithful encoding of the memory contract, and the first real code
for the split-brain direction.
Review: the anti-split-brain guardrails are not yet enforced
The decision's spine is "separate roles and planes, but one canonical record;
projections never become truth." This PR builds the separation and leaves
"one canonical record" as an in-memory mock — while making clobbering and
authority-downgrade the default:
MemoryStoreis volatile ("unit tests, localvolatile caching, memory projection mocks").
Rememberblind-overwrites — no conflict record (contraLAYERED-MEMORY-AUTHORITY-LIFECYCLE.md's Conflict class and the"no auto-promotion" invariant).
Improvesilently setsDerivationMethod = DerivationAgentSummaryona content change.
OperatorApprovalis defined but never required.ObservedAt = time.Now()instead of the graph'sobservation time.
FormatSPARQLTurtledrops provenance.MemoryKindis a third taxonomy, unmapped to planes.Verdict
Right shape around an unfilled center: it implements the contract half of
the decision and none of its guardrails. Mergeable as a scaffold if we are
explicit that the anti-split-brain guarantees are pending — otherwise it lets
two writers clobber each other and lets an agent edit silently downgrade
operator-asserted authority.
Follow-up
Tracked in #137: conflict records, the promotion/authority gate, and real
freshness.