Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

chore(trust): classify purge, derivation-hide and fence-append tier restore in the canonical writer census

garrytan67a8e4030a8e
diff --git a/docs/architecture/canonical-writers.tsv b/docs/architecture/canonical-writers.tsv
index 480a3014ce..e118cc7ae3 100644
--- a/docs/architecture/canonical-writers.tsv
+++ b/docs/architecture/canonical-writers.tsv
@@ -218,3 +218,7 @@ src/core/facts/unfenced-facts.ts 3 coordinator The extract_facts cycle phase and
src/core/repair/take-supersession.ts 1 coordinator gbrain repair take-supersession reprojects superseded_by for a page whose fence is already right: inside withCoordinatedWrite under the page key on a managed brain (revision-checked), maintenanceTransaction on an unmanaged one. Fence edits go through a revision-bound put_page request.
src/core/repair/timeline-comments.ts 2 coordinator `gbrain repair timeline-comments` (#6184) deletes or rewrites timeline rows carrying HTML comment markup under the page lock: `withCoordinatedWrite` with maintenance attribution on managed brains, `maintenanceTransaction` otherwise; the page body changes go through a revision-bound put_page first.
src/core/repair/take-supersession.ts 1 coordinator gbrain repair take-supersession reprojects superseded_by for a page whose fence is already right: a managed_maintenance_take_reproject request replanned under the page key on a managed brain, maintenanceTransaction (revision-checked) on an unmanaged one. Fence edits go through a revision-bound put_page request.
+src/core/facts/derivation-inputs.ts 3 coordinator hideDerivedRows expires derived facts, deactivates derived takes and soft-deletes derived pages only inside the purge_fact transaction, after write admission and under withCoordinatedWrite on the purge source with the affected page keys locked.
+src/core/facts/purge.ts 3 coordinator purge_fact deletes the purged fact and take rows and rewrites affected page bodies inside one admitted write transaction under withCoordinatedWrite, after the pending-publication check and page-key locks; the request journal records the terminal receipt.
+src/core/persistence/page-purge.ts 2 coordinator purgePageInTransaction deletes the page's filed facts and hard-deletes the page only from the prepared delete_page purge publication callback in page-prepare.ts, under the same source/page identity, revision and durable authority guards as receipt completion.
+src/core/trust/fence-append.ts 1 coordinator withPageTierKept restores the page's prior trust_tier and write_origin in the same coordinated fence-append transaction that wrote the page (fence-write, facts-prepare and memory-prepare callers); it changes no content column.
diff --git a/docs/architecture/managed-mutating-writers.tsv b/docs/architecture/managed-mutating-writers.tsv
index 9ee19c7a29..49097e9d20 100644
--- a/docs/architecture/managed-mutating-writers.tsv
+++ b/docs/architecture/managed-mutating-writers.tsv
@@ -69,6 +69,8 @@ op loops_mute no_canonical_write Loop suppression rows.
op mute_notice no_canonical_write Notice mute list in <GBRAIN_HOME>/notices/muted.json; no brain table or canonical file.
op loops_unmute no_canonical_write Loop suppression rows.
op rate_answer no_canonical_write Writes only retrieval_* feedback tables (answer ratings and learned weights), never a guarded canonical table or file.
+op purge_fact coordinator submitPurgeFactMutation admits a journaled write and deletes the purged rows under withCoordinatedWrite (trusted local CLI only).
+op unpurge_page no_canonical_write Deletes only purge tombstone rows (page_purges, fact_purges, take_purges); restores no canonical row (trusted local CLI only).
cli src/commands/enrich.ts coordinator gbrain enrich preflights maintenance authority, then publishMaintenancePage per page.
cli src/commands/extract-conversation-facts.ts coordinator Bulk conversation facts publish in batches of pages as receipted managed_maintenance_conversation_facts requests after a maintenance preflight.
cli src/commands/pages.ts coordinator gbrain pages purge-deleted runs purgeDeletedPagesCoordinated.