symfonic.capabilities.memory.erase_admission¶
erase_admission ¶
Explicit erase admissions for raw PostgreSQL v1 memory mutations (CORE-199 P3-4).
Every admin forget's memory erase, memory-only or joint, advances a
forward-only generation row in the memory database itself, in the
transaction that deletes the content (postgres_memory_generation). A
joint forget's transcript erase also advances one in the log's database
(postgres_conversation_generation). Every raw graph-only PostgreSQL v1
write, flush and discard then reads, under the tenant mutation
lock the memory erase also takes, the memory generations covering its own
scope on its own connection -- the durable proof, independent of process and
pool object -- and the conversation generations on memory's own pool and on
every log pool memory_capabilities composed with that pool in this
process. The mutation must account for each covering row with an
:class:Admission:
- An admission is a value -- the generations its holder observed before it
read -- and is presented for one call through :func:
admitted. It is never inherited from a run's ambient context, so a task that strips its context loses nothing it could present, and a task that keeps an admission keeps an old one, which refuses. - A mutation without an admission accounts for nothing: it may not write into a scope any completed admin forget covers.
- A pool
memory_capabilitiescomposed a fenced turn over requires one (:func:require_admission): every mutation through it must present a memory fence on that pool, or run inside a kernel run that captured one. Code that strips its context, or a caller holding the composition's store outside any run, refuses rather than writing what a turn read anywhere -- a sibling, a parent, or the erased scope itself (CORE-199 review F1).
Admissions are minted only by a turn's capture before it reads
(turn_generation); nothing public mints one. The admin service's own
writes present the running turn's admission, and a caller with none --
outside any run, or in a run that captured nothing -- refuses: a contextless
caller never observes a fresh one (CORE-199 review F2, owner decision).
Nothing is admitted by absence.
Admission ¶
The fences a mutation presents; immutable and not constructible by callers.
Source code in src/symfonic/capabilities/memory/erase_admission.py
AdmittedMemory ¶
A store's mutations, each presenting one fixed admission.
Source code in src/symfonic/capabilities/memory/erase_admission.py
Fence
dataclass
¶
Fence(pool: Any, path: str, token: tuple[tuple[str, int], ...], tolerant: bool, memory: bool = False)
The generations covering path on one authority, when observed.
memory fences hold memory_erase_generations rows, read on the
memory database; the others hold a conversation generation table's.
admitted ¶
Present admission to the mutations made inside this call.
Source code in src/symfonic/capabilities/memory/erase_admission.py
authorities ¶
bind_log ¶
Make log_pool an authority for every mutation through pool.
Source code in src/symfonic/capabilities/memory/erase_admission.py
carries ¶
Some fence in fences is a memory capture on pool itself.
memory_pool ¶
The PostgreSQL pool a store's mutation fence locks on, or None.
Source code in src/symfonic/capabilities/memory/erase_admission.py
observe_all
async
¶
Memory's own generations first, then each conversation authority's.
strict (a turn) refuses where the memory generation table is absent.
Source code in src/symfonic/capabilities/memory/erase_admission.py
require_admission ¶
Refuse every later mutation through pool that carries no admission.
Only ever adds a refusal, for the life of the pool object.
require_mutation
async
¶
Called by the PostgreSQL mutation fence after its tenant lock.
Re-proves every presented and ambient fence exactly, accounts for every
generation covering path on every authority, and refuses a fenced
pool's mutation that carries no fence on it -- after the memory read, so
a tampered table still answers as unguarded. path is None only for
mutations that name no native v1 scope.
Source code in src/symfonic/capabilities/memory/erase_admission.py
resolved_lineage ¶
The running kernel run's lineage; refuses one that cannot be proved.
A run naming an ancestor that ended and was released may descend from a capture a forget has since covered: every fenced read and write refuses.