Repository navigation
Deleting a decision retires its record - #164
Merged
Merged
Conversation
zlareb1
force-pushed
the
fix/delete-decision-retires-record
branch
3 times, most recently
from
November 1, 2026 18:15
9fa894b to
e21679a
Compare
memory.delete and memory.delete_version of a memory_type='decision' row now write a tombstoned version of the key's active decision record, so decision.chain, decision.precedents and decision.outcome stop serving a deleted decision. The record has no identity, so it stays active while another identity still holds a live decision row under the key. memory.record.history keeps tombstoned versions and every record row carries its status. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The tombstone and the supersede share one store statement in server/memory/store/records.py; the tombstone's reads are sequential and its version is above the active one. decision.record writes the memory row before the record, so a concurrent delete of another identity's row sees it. A failed tombstone is noted as a degradation. Tests cover memory.delete_version, a second identity, decision.outcome and a failing tombstone over one shared clickhouse-local client. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The tombstone check no longer leaves out the deleting identity: its own tombstone is committed and read with sequential consistency, so a same-identity write that landed above it keeps the record. A failed tombstone is logged only. The close statement is plain concatenation. Tests cover a write above the tombstone, a refused memory row leaving no record, and a supersede drawn below the active version. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
decision.outcome wrote under the active record's writer, which may be the identity that just deleted its row, so the outcome brought that row back. It now writes under a live decision row's identity (the record's writer when its row is live, else the newest), read in the store, and answers not-found when no live row holds the key. The tombstone takes the schema name from its caller; the supersede takes the client as a keyword like the rest of the store. KeptCH lets execute raise and shares one view() helper with test_delete_version_sql.py. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The tombstone and supersede copies take greatest(updated_at, now), so a slow clock cannot order the tombstone below the active version. History reads status = 'tombstoned' OR tombstoned_at IS NULL, so a row erasure marks is never served. The decision schema name moves to the domain layer and the store binds it itself. Tests cover the copied columns, a slow clock, an outcome with no live row and the record writer's row taking the outcome while it is live. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The live-row checks spell memory_type = 'decision' as the other memory plane sites do, and the domain constant names the record schema only. The architecture page says a delete that stands on a decision row also tombstones its record. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
live_decision_identity orders live decision rows by membership in the active record's identity, reads with sequential consistency, and falls back to the newest live row when no record is active. The docs say whose row decision.outcome revises. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The test covers the helper's ordering alone; decision.outcome answers not-found before reading it with no active record. The test stub matches the helper's own statement, and __all__ lists the helper in order. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
A same-identity delete can tombstone a decision row before its record lands and find nothing to retire; _write_decision now ends with the tombstone check, so the record is tombstoned when no live row holds the key. The record and live-row predicates are shared fragments, both statements read with the SETTINGS suffix, and the decisions page names the paths that leave the record active. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
A failure of the check at the end of a decision write is logged and the write still succeeds. The decisions page says memory.move without a redirect retires the record through memory.delete, and names the redirect and a retype as leaving it active. Tests cover the failing check, history hiding erased mirror rows, and the writer's exact identity ranking first. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
live_decision_identity returns an (agent, user_id, session_id) tuple, the closing record check takes the module's client, and the decisions page lists what retires the record, what leaves it active and whose row decision.outcome writes under. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The record write's fold read uses the store's ACTIVE_RECORD fragment. The decision schema's fields move beside its name in the domain layer, and record.query rows are tested to carry their status. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
decision.outcome reads the key's live rows across users, which is safe because the transport gate refuses every decision.* op to a token bounded below the namespace; a test pins that, and another pins the record status values to the table's enum. The tombstone statement is one module-level f-string. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The decisions page and the tombstone docstring say history may list the tombstone twice while FINAL reads the record tombstoned, and a test pins a second closing write. The shared fragments are named for the FROM clause they hold. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The record holds its last writer's text, so a delete now retires it unless that writer (agent, user and session) still has a live decision row under the key; another identity's row, already superseded in the record plane, no longer keeps it. decision.outcome writes only under the writer's live row and answers not-found otherwise, so it cannot copy a deleted decision into another identity's row. The closing check in a decision write uses the same rule. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
decision.outcome builds its revision from the same sequential read that names the writer, so a lagging replica cannot pair one record's text with another's writer. The record write's fold reads through a store function, and the active-record fragment stays private to the store. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The expiry sweep tombstones an expired writer row without retiring its record, so the decisions page lists it and qualifies when an expired row still counts. The outcome takes the record's created_at as is, and a second closing write is pinned to write nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The record fold keeps every field an incoming record leaves empty, so a re-recorded decision kept the earlier writer's outcome, success, alternatives, confidence and run_id in the new writer's record, out of reach of that writer's delete. decision.record now writes its record without carrying the prior one's fields; decision.outcome, the same writer revising, keeps the fold. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
decision.outcome builds its revision from the record its writer read, so folding it onto the record write's second, non-sequential read could only add another writer's fields. Every decision write now passes carry_prior=False, and the fold no longer mutates its result. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…every decision write Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The record write's fold reads the active record's fields by name. The docstring says which disagreements a whole-record write still records, and tests pin the conflict row a re-recorded decision leaves and the empty fold report of a whole-record write. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
A whole-record write replaces the fold result before reporting it, so record_json, the kept fields and the report come from it either way. active_record reads one row. The clickhouse-local client no longer reads a missing table as empty; each test creates the tables it reads. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
ActiveRecord carries record_id and memory_id, both record reads pass their parameters the same way, and the clickhouse-local client drops an insert only when its own table is missing. The re-recorded decision test also checks the new record's field rows read absent. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… does them Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… order test setup after imports Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…states success; pad the writing table Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…are the search stub; rewrap the docs bullet Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
DecisionOutcomeOutput gains next, filled with the same merge hint as decision.record; the outcome's merge test runs once. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
decision.outcome no longer tells its caller to use the merged key, which would write the outcome onto another decision. The outcome's merge test covers a readable and an unreadable peer through the handler, replacing the test of the private hint helper. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
_merged_hint takes only the key and the op; decision.record adds 'Use that key.' itself. record_input moves to tests/unit/decision_inputs.py, which both decision test files import. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
decision.record already answers the merged key as memory_key, so its hint needs no suffix of its own. The merge tests compare next exactly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The outcome passes the row's pin to memory.set, whose pin guard otherwise refuses a changed value that does not pin, so a pinned decision takes an outcome again. The decisions page names blacklist.sweep, and the closing check uses the store's default client. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
decision.record rewrites memory.set's PINNED_CONFLICT for the writer's own pinned row: memory.update and memory.pin would change the row and not the record. Tests pin the refusal and that another identity's decision still supersedes a pinned one; the page says so. The fold module names restate. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
A pin that lands between decision.outcome's read and its write answers the same 409 as a changed row. The pinned-peer refusal is pinned to pass through decision.record unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
tombstone_decision_records retires many keys at once, each by its own writer, so a by-id cascade over many decision rows runs one statement per namespace. A contract test pins that memory.set's pinned-peer refusal does not name memory_key. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…keys Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
fix/delete-decision-retires-record
branch
from
November 1, 2026 19:12
cdfefed to
0431d6a
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
added a commit
that referenced
this pull request
Nov 1, 2026
tombstone_cascade_by_ids takes the namespace in this PR; the tests #164 added call it with one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
added a commit
that referenced
this pull request
Nov 1, 2026
tombstone_cascade_by_ids takes the namespace in this PR; the tests #164 added call it with one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
8 of 9 tasks
zlareb1
added a commit
that referenced
this pull request
Nov 2, 2026
tombstone_cascade_by_ids takes the namespace in this PR; the tests #164 added call it with one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
added a commit
that referenced
this pull request
Nov 2, 2026
tombstone_cascade_by_ids takes the namespace in this PR; the tests #164 added call it with one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
added a commit
that referenced
this pull request
Nov 2, 2026
tombstone_cascade_by_ids takes the namespace in this PR; the tests #164 added call it with one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
added a commit
that referenced
this pull request
Nov 2, 2026
tombstone_cascade_by_ids takes the namespace in this PR; the tests #164 added call it with one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
A decision whose writer's row is deleted, or tombstoned by
conflicts.resolve,memory.dedup_resolveor a blacklist sweep, is no longer served bydecision.chain,decision.precedentsordecision.outcome, andmemory.record.historyshows ittombstoned(record rows now carrystatus). A re-recorded decision keeps nothing of the earlier record'srealized_outcome,success,alternatives,confidenceorrun_id.Why
A decision is a record in
loom.memory_recordsplus amemory_type='decision'row inloom.memoryunder the same key. A delete tombstoned the row and everything derived from it (_retire_derived) but left the recordactive, sodecision.chainkept returning the deleted decision asseed_decision,decision.precedentskept serving it, anddecision.outcomekept revising it, writing the deleted row back.The fix is a write-side tombstone of the record. A read-time filter ("serve a record only while a live decision row holds its key") would have to be added to every record-plane reader (
memory.record.query,memory.record.history, the records search leg, erasure,decision.outcome), would add aloom.memorylookup to each read instead of one to each delete, and would still leave the recordactivein history.Scope and risk
This is one concern, a decision its writer deleted stops being served, and each part below is needed for it: without the whole-record write a re-record keeps serving the deleted writer's fields; without the row-first order and closing check a delete between the two writes leaves the record live; without the conditional outcome
decision.outcomewrites the deleted row back.What changes
(org, namespace, schema_name, memory_key)and holds its last writer's identity;loom.memorykeys by identity. OneINSERT … SELECT(tombstone_decision_records) copies the active record asstatus='tombstoned'unless that writer still has a livedecisionrow under the key. Another identity's row does not keep it: Loom deletes only what its writer asked to delete, and that row was already superseded in the record plane. It runs from_retire_derived(memory.delete,memory.delete_version, and through themmemory.movewithout a redirect andmemory.applydelete) and fromtombstone_cascade_by_ids(conflicts.resolve,memory.dedup_resolve,blacklist.addwithsweepandblacklist.sweep), in one statement per namespace for all the decision keys it tombstoned (memory_key IN {keys}, each key checked against its own writers), best-effort like the procedure-run cascade.select_sequential_consistency = 1, unconditionally: the retirement is only correct if it sees the delete's own tombstone. The copy's version isgreatest(version + 1, <tombstone version>)and itsupdated_atgreatest(updated_at, now), so a slow clock cannot leave it below the active version.realized_outcome,success,alternatives,confidenceandrun_id, out of reach of that writer's delete or erasure. For thedecisionschema, bydecision.recordormemory.record.write, the record write now usesrecord_fold.restate: the incoming fields are the record, and a changed value is still recorded inloom.memory_record_conflicts.decision.recordanddecision.outcomewrite the memory row before the record and end with the same tombstone statement, so a delete between the two writes leaves the new record retired. APINNED_CONFLICTfrom the row no longer leaves a record behind. Whenmemory.setmerges the row into another decision key of the same text (no row stored), nothing more is written:decision.recordanswers the keymemory.setreported ("", with its own hint, when that row can no longer be read), withrecord_id=""and no edges, anddecision.outcomeanswersupdated=false, credits no memories and says why in its newnextfield.decision.outcomerevises only under a live writer, conditionally. Record and writer come from one sequential read (live_writer_record), and the op answers not-found when the writer's row is not live. The row write carriesif_match_sha256of the row it read (stored_sha256, the hashmemory.setchecks): if the row is gone it answers not-found, if it changed 409PRECONDITION_FAILED("call decision.outcome again"). A conditional write takes the key's write lease, so a lease busy past its wait answers 409 and an unreachable lease keeper 503. The outcome passes the row's pin tomemory.set, so a pinned decision takes an outcome and stays pinned (with the record written first, main recorded the outcome and then refused the row withPINNED_CONFLICT). Withoutsuccessthe outcome keeps the record's verdict.memory.record.historynow readsstatus = 'tombstoned' OR tombstoned_at IS NULLon the version mirror (only this tombstone writes a mirror row withtombstoned_atset).memory.record.historyandmemory.record.queryrows carrystatus; query still serves only active rows.server/memory/store/records.py, each written whole around three shared fragments (_ACTIVE,_LIVE_WRITERS, and_COPY_ACTIVE_RECORDS, the copy the supersede and the tombstone share). The decision schema's name and fields are inserver/memory/domain/decision_schema.py.(org, namespace). The writer reads span the key's users and sessions; nodecision.*op honours a read scope, so the transport gate refuses a token bounded below the namespace first (pinned intests/unit/test_read_scope_admission.py).Known gaps (the first six are on the decisions page)
memory.clear,namespace.rollbackand the expiry sweep tombstone a writer row without either cascade, so the record stays active;memory.restoreor a rollback past the delete revives the row but not the record.memory.movewithkeep_redirect=trueleaves a livestatus='duplicate'decision row under the old key, and amemory.setthat retypes the writer's key leaves no decision row; both keep the record active.memory.record.writeon thedecisionschema writes a record with no decision row:decision.chainserves it anddecision.outcomeanswers not-found, until a delete or closing check on the key retires it. Refusing the schema on the generic op would be a wire break.main), while the pinned row stays. The writer's own re-decision is refused with 409PINNED_CONFLICT, whose message namesmemory.unpin(memory.set's own advice,memory.updateormemory.pin, would change the row and not the record); a close pinned peer's refusal passes through unchanged. A pin that lands betweendecision.outcome's read and its write answers the same 409 as a changed row ("call decision.outcome again").decision.outcomepasses the pin it read tomemory.set, whose condition is on the value: amemory.unpinthat lands between the outcome's read and its write is undone (named on the decisions page). Refusing it needs a pin conditionmemory.setdoes not have.FINALreads it tombstoned either way).memory.deletetakes no key lock, so a delete inside the outcome'smemory.setcan be written over.verify.residue, and the resumed saga tombstones again; one committing after the census leaves onetombstonedmirror copy that history serves.memory.redactof a decision row leaves its text inrecord_json;made_aton an outcome is the active record'screated_at.Compatibility, rollout and rollback
MemoryRecordRow.statusis new (active | superseded | rejected | tombstoned, defaultactive).decision.outcomecan now answer 409 and 503, not-found for a record whose writer row is gone, andupdated=falsewith anexthint when nothing was written (DecisionOutcomeOutput.nextis new);decision.recordcan answer another decision's key withrecord_id="".memory.record.writeon thedecisionschema no longer fills empty fields from the prior record. No field was removed. The SDK op tables are regenerated.status = 'active'ortombstoned_at IS NULL). During the window an N-1 delete leaves the record active and an N-1decision.outcomewrites without the condition, as today; an N-1decision.recordstill writes the record before the row, so an N delete between them can retire the new record until it is recorded again.Tests
tests/unit/test_decision_retirement.py(new; the clickhouse-local tests moved out oftest_decision_ops.py) runs against the production DDL: the writer's delete and a by-id tombstone retire the record (chainseed_decisionisNone, precedents empty, outcome not-found, history["tombstoned", "active"]); another identity's delete or by-id tombstone, or a non-decision row, leaves it; a failed tombstone leaves the delete standing; the row-first order and closing check (aPINNED_CONFLICTleaves no record; a delete between the writes leaves it tombstoned); the outcome on the writer's exact identity, withmemory.set's real_set_check_if_matchunder every outcome: a delete, a re-record and another outcome between its read and write, a delete the real write fence (lift_above_deletes) catches after the check (not-found), a busy key lease passing through unchanged, one tombstone statement retiring one key and keeping another whose writer is live, an outcome on a pinned row passingmemory.set's real pin guard and keeping the pin, the writer's re-decision refused with a message namingmemory.unpin, a close pinned peer's refusal passed through unchanged (and a contract test that memory.set's peer refusal never namesmemory_key), a pin landing during an outcome answered as a changed row, and another identity's decision superseding a pinned one; a second writer's decision and amemory.record.writeon the schema keep nothing of the prior record; a decisionmemory.setmerged into another key writes no record and no edges, and a merged outcome credits no memories, each with a readable and an unreadable peer and the hint it answers; record-plane versioning, slow clocks, history filters andstatus.tests/analyzer/shapes.txtcarries the changed record statements (pytest tests/analyzerpasses; see below).tests/unit/test_record_fold.py:restatekeeps nothing of the prior and reports agreed, added and changed fields.tests/unit/clickhouse_local.py: the disk-backed clientKeptCH, shared withtest_delete_version_sql.py.make test-unit(tests/unit) at0431d6a0onmainc913d5e6: 24,290 passed, 20 skipped, 1 xfailed; one failure,test_workers_child.py::test_the_child_dies_with_its_parent, a timing test this PR does not touch, passed on three runs alone. The headdd9877e4changes only a docs sentence since then;test_public_copy.py,test_doc_links.pyand the prose checker pass there.tests/analyzerat0431d6a0onmainc913d5e6: 10 passed, 2 skipped (the head adds a docs sentence).dd9877e4against a server from the branch on its own ClickHouse (auth off):test_memory_records_roundtrip.py,test_blacklist.py,test_memory_conflicts.py,test_bulk_conflicts.py, 13 passed. Over HTTP at the same head: a decision recorded byagent-aand pinned withmemory.pintakesdecision.outcome(success=true)(updated: true), stayspinned: trueanddecision.chainservesrealized_outcome;agent-adeciding it again is refused withPINNED_CONFLICTand the record keeps its fields. Two decisions whose scenarios match a pattern:blacklist.addwithsweep: truetombstones both rows (swept: 2) and the one per-namespace statement retires both records:decision.chainreturnsseed_decision: nullfor each andmemory.record.queryreturns no rows.system.query_logon ClickHouse 26.10, of the tombstone statement (one per decision delete or write; the live-row subquery covers the granules the key's skip indexes keep): 3,458 / 1,282 / 1,282 rows read and 19 / 25 / 20 ms at 5,000 / 50,000 / 200,000 memory rows in the namespace (50 agents, a tenth of the rows decisions), 8.4 MiB each.decision.outcome(p99 budget 1,500 ms) adds thelive_writer_recordread, a strongget_by_key, the key lease and this statement; a by-id cascade adds one per namespace it tombstones decisions in.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. The author checks the record-plane keying, the two-identity rule and the history filter change.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass at0431d6a0(the headdd9877e4changes only a docs sentence); the integration suite passes if server behaviour changed (the files above, atdd9877e4).docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code