Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs(inventory): prepared-maintenance gains the fenced consolidation close (G4)

garrytanadc880eaaea9
diff --git a/docs/architecture/canonical-writers.tsv b/docs/architecture/canonical-writers.tsv
index fc1189c34a..46ac07850b 100644
--- a/docs/architecture/canonical-writers.tsv
+++ b/docs/architecture/canonical-writers.tsv
@@ -156,7 +156,7 @@ src/commands/enrich.ts 0 coordinator A managed brain preflights maintenance auth
src/core/persistence/source-lifecycle.ts 7 coordinator Native affected roots precede topology, source, principal and receipt guards; every shared-root generation and old queued intent changes together.
src/core/persistence/topology-recovery.ts 2 coordinator Verified directory-swap recovery checks source incarnation, current logical manifest and physical identity before topology commitment; permanent receipt IDs survive deletion.
src/core/persistence/connector-sync.ts 4 coordinator Connector freshness and source-scoped deletion commit through original/current authority, source and revision guards, canonical publication and checkpoint CAS. A skipped unchanged checkpoint save stamps sources.last_sync_at/newest_content_at (never page content) inside withCoordinatedWrite, in a transaction that first asserts the connector sync lease, scoped to the source incarnation (#5686/#5470). Its importFromContent calls carry prepare and run inside the coordinator publication.
-src/core/persistence/prepared-maintenance.ts 4 coordinator Named local maintenance uses native owner publication; contributing semantic facts and take lifecycle are revalidated and committed together with canonical files and receipts; a chronicle event page and its depth timeline projection commit in one publication; v0.32.2 fact adoption re-locks the pinned legacy facts and their fence positions and sets their row positions ahead of the canonical projection in the same publication.
+src/core/persistence/prepared-maintenance.ts 5 coordinator Named local maintenance uses native owner publication; contributing semantic facts and take lifecycle are revalidated and committed together with canonical files and receipts; a chronicle event page and its depth timeline projection commit in one publication; v0.32.2 fact adoption re-locks the pinned legacy facts and their fence positions and sets their row positions ahead of the canonical projection in the same publication.; consolidation closes a fenced fact from the fence cell it publishes with the take, an unfenced one in the database (G4)
src/core/persistence/facts-prepare.ts 3 coordinator Multi-entity fact publication rechecks original/current source authority, origin and target revisions, withdrawals and deduplication under coordinated page locks; a direct single-fact write (supersede intent) strikes the superseded fence row and expires and links the old fact in the same publication transaction.
src/core/persistence/file-repair.ts 5 coordinator The managed_file_repair preparer (#5988) re-screens and re-prepares the repaired file exactly as a managed sync import (importFromContent with prepare, no write) and refuses any result that differs from the previewed digest; its apply runs inside the coordinated publication with the page key locked: updateSlug and the implicit type for a rename, the prepared import, source_path, projections, the hold clear and the import provenance commit with the file write.
src/core/embed-facts.ts 1 projection Explicit bounded repair updates only fact embedding projections with selected-brain off-switch, invocation budget, source incarnation and fact-row version checks before atomic installation.
diff --git a/docs/architecture/system-of-record.md b/docs/architecture/system-of-record.md
index fe2ef661a8..214e41dca2 100644
--- a/docs/architecture/system-of-record.md
+++ b/docs/architecture/system-of-record.md
@@ -286,7 +286,7 @@ or a physical projection that leaves attribution untouched):
- `src/core/persistence/memory-prepare.ts` (3): `remember` request preparer.
- `src/core/persistence/page-append.ts` (1): segmented `append_page` / `edit_page` request preparer; the splice versions the page inside its request's publication.
- `src/core/persistence/page-prepare.ts` (12): page request preparer (including the restore of a segmented page over 24 MiB, which flips `deleted_at` without re-serializing, and the tag flip of a segmented page, which versions it and changes its tag rows and `content_hash` without re-serializing).
-- `src/core/persistence/prepared-maintenance.ts` (3): managed maintenance request preparer.
+- `src/core/persistence/prepared-maintenance.ts` (4): managed maintenance request preparer (consolidation closes an unfenced fact in the database and a fenced one from its published fence cell).
- `src/core/persistence/semantic-pages.ts` (1): `add_timeline_entry` request preparer.
- `src/core/persistence/sync-image.ts` (2): managed sync image request preparer; a Git rename retires the old page inside the same publication.
- `src/core/persistence/sync-prepare.ts` (4): managed sync request preparer.