Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
# Canonical writer census for issue #5105. Counts include lexical references in comments.
# path write-reference ceiling enforcement boundary review rationale
src/core/generations/fence-evidence.ts 1 projection #8819: moveKeptRows renumbers kept database-only fact rows whose row number an incoming fence row claims, only inside the fence projection's publication transaction (canonical-projections.ts) or the extract_facts reconcile's page write; it changes row_num only, never claim text or lifecycle.
src/core/persistence/activation.ts 0 coordinator Trusted private administration requires explicit quiescence and durable refusal records before enabling managed canonical writer enforcement.
src/core/persistence/canonical-projections.ts 10 coordinator Facts, takes, timeline, chunks and aliases install within the guarded canonical publication transaction before its receipt commits; a take whose claim changed in place loses its stored resolution there, and a fence row without resolution cells keeps it.
src/core/persistence/derived-retirement-hold.ts 2 contract retireDerivedPages versions, soft-deletes and stamps retired_by/retired_at on derived pages (unmanaged extract_atoms retirement) inside maintenanceTransaction behind the canonical table trigger; it never revives or rewrites content, and the purge hold it defines only keeps rows longer.
src/core/generations/adapters/page.ts 1 contract GBRA-161: importPageItem writes a derived page item through importFromContent inside the generation activation's maintenanceTransaction (publish.ts), behind the canonical table trigger; managed brains keep the coordinator path.
src/core/generations/adapters/atoms.ts 1 contract GBRA-161: the unmanaged atom completion flip (source_hash) runs in the generation activation's maintenanceTransaction after every atom and provenance edge was written and before the items are rechecked live; managed brains keep the coordinator path.
src/core/generations/adapters/chronicle-events.ts 4 contract GBRA-161 PR 3: the Life Chronicle event adapter writes event pages and their depth timeline projection rows, and removes a retired event's projection row, only inside publishGeneration's maintenanceTransaction or the coordinated managed_generation_activate/_restore request, under the depth and event page keys; managed event pages keep the managed_maintenance_chronicle_event request.
src/core/generations/adapters/single-page.ts 2 contract GBRA-161 PR 5: the single-item page adapter writes the dream summary, think synthesis or drift report page (its live prior copied to page_versions first) and its tags only inside publishGeneration's maintenanceTransaction under the page key, bound to the expected revision the writer read before composing; managed brains keep their managed_maintenance page request.
src/core/generations/managed-retire.ts 1 coordinator GBRA-161 PR 4: a managed synthesis generation retires each matched earlier output through one managed_generation_retire request, whose preparer runs the versioned page delete and stamps retired_by/retired_at inside the coordinated write, refusing unless the item is pending on the live generation its activation made
src/core/generations/adapters/fact-rows.ts 1 contract GBRA-161 PR 2: restoreFactRow puts a recorded fact before-state back (lifecycle, consolidation marks, fence row number) only inside a generation restore maintenanceTransaction, matched on id, claim and visibility; managed brains refuse generation restores.
src/core/generations/adapters/extracted-facts.ts 2 contract GBRA-161 PR 2: the extracted-facts adapter inserts a page's new extracted rows and expires the ones a whole-body result dropped, only inside publishGeneration's maintenanceTransaction under the page key; the ownership rule detaches non-user facts before anything is written.
src/core/persistence/links-maintenance.ts 1 coordinator Managed extract --stale and post-sync extraction add only the coordinator's unrecorded canonical timeline tuples inside a revision-bound withCoordinatedWrite transaction that also replaces the page's derived links and stamps its watermark.
src/core/extract-takes-from-pages.ts 0 coordinator Managed bootstrap submits one revision-checked put_page per source page so its complete takes fence and projected rows commit together; unmanaged writes retain the md-first helper.
src/core/persistence/origin-guard.ts 2 engine_guard #6948 bindOrigin records a page origin (and drops an origin_twin marker) only after assertOriginUnclaimed holds the origin advisory lock inside the caller's engine.transaction(); callers are the guarded publication applies and repairs.
src/core/persistence/takes-prepare.ts 4 coordinator Semantic takes apply only through the journal publication callback after current revision, holder and authority validation. takes_remove deletes the removed row inside the same coordinated apply (#5167).
src/commands/extract-timeline-db.ts 2 coordinator `gbrain extract timeline --source db` (#5904): on a managed brain the timeline retraction and insert run only inside the managed_maintenance_timeline_extract publication (prepareTimelineExtract; owner-checked by maintenancePreflight, page key locked, revision-bound); only an unmanaged brain retracts and batch-inserts directly, where no canonical writer enforcement applies.
src/commands/extract-conversation-facts.ts 4 coordinator On a managed brain each page's fact rows and outcome row are frozen into one database-only managed_maintenance_conversation_facts request (facts/conversation-publication.ts) after a maintenance preflight before provider work; the coordinator's preparer revalidates page identity, revision and parser-input snapshot under the page key. Unmanaged calls keep their direct engine writes behind the SQL guard (writeDerivedFacts refuses on a managed brain).
src/core/facts/conversation-publication.ts 10 coordinator The managed conversation-facts preparer, only for a complete replacement (#7013; otherwise it keeps the prior facts and replaces only the outcome row), clears the page's extractor rows (deleting them, but expiring rows an open loop or another fact's superseded_by references and keeping rows a label repair retired) and inserts each member page's frozen entry inside the coordinator publication of its admitted managed_maintenance_conversation_facts batch request, after rechecking authority, page identity, revision and version token under each page key (a moved page is skipped and reported, never failing the batch; a page whose rows fail validation gets a blocked not-extractable outcome row); a lost insert rolls the publication back. The unmanaged extractor runs the same publication in its maintenance transaction. The clear also expires rows the free conversation relink linked, after deleting the previous clear's expired relinked copies, so the replacement inherits their entity (#6764, conversation-relink-carry.ts). PR 4 (Wave B incremental derivation, transcripts): the segmented incremental run (conversation-incremental.ts) publishes through writeDerivedFacts' maintenance transaction only (it refuses on a managed brain; the managed preparer never passes segments), and in that transaction re-anchors a moved window's facts to its new key (UPDATE facts SET source_window, ids unchanged, after clearing what the destination key held) and stamps each freshly inserted row's window (UPDATE facts SET source_window by id, in 1000-row batches). GBRA-574 B2: in the same clear, the page's rows already kept expired give up their slot (UPDATE facts SET dimension/value/value_hash/dim_status NULL), so the replacement batch can hold the same slot key.
src/core/facts/conversation-relink.ts 1 coordinator `gbrain facts relink --conversation` (#6764) sets entity_slug and the relink note on a conversation page's unlinked derived rows still exactly as planned (same claim, unlinked, active, target page live) under the page key: one database-only managed_maintenance_conversation_relink request per page on a managed brain (the preparer authorizes the anchor and the page), one writeDerivedFacts maintenance transaction per page on an unmanaged brain.
src/commands/extract.ts 7 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication. On a managed brain extract --stale inserts only the canonical timeline tuples inside withCoordinatedWrite for that page, after the revision-bound derived-link replacement locked and verified the page revision in the same transaction.
src/commands/frontmatter.ts 0 filesystem_guard Batch frontmatter repair preflights every target before the first backup/write.
src/commands/import.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/commands/jobs.ts 0 coordinator The purge job (registered here, body in src/core/minions/handlers/purge.ts) runs purgeDeletedPagesCoordinated; remaining canonical writes live in delegated coordinated modules.
src/commands/migrate-engine.ts 12 early_refusal Managed mode refuses this legacy entry point before its canonical filesystem/provider effects. #6286: the legacy copier also writes each copied page's frontmatter aliases (setPageAliases) on the unmanaged target.
src/commands/migrations/v0_32_2.ts 2 coordinator On a managed brain each entity page publishes its rendered facts fence through a managed_maintenance_adopt_fact_fence request that adopts the legacy rows in place inside the coordinated publication, database-only pages included; unmanaged brains keep the file-first backfill, which the trigger refuses on managed brains.
src/commands/pages.ts 2 engine_guard Both engine references are dry-run previews (the --dry-run listing and the D6 consent count before a hard purge, #6114); the purge runs purgeDeletedPagesCoordinated, which is coordinated on managed brains.
src/commands/reconcile-links.ts 2 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/commands/reindex-aliases.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/persistence/twin-merge.ts 10 coordinator The #6948 twin merge (links in every role, link transitions, timeline, raw data, files, user tags, aliases and facts move onto the canonical page; the twin is marked origin_twin and soft-deleted) runs only inside the managed_maintenance_resolve_origin_twin preparer's coordinated transaction on managed brains, or one maintenanceTransaction on unmanaged brains, after the group verdict is rechecked under both page locks; it writes no file, so there is no filesystem ordering to keep.
src/core/repair/origin-twins.ts 1 coordinator gbrain repair origin-twins and the post-sync heal resolve each verified twin as a receipted managed_maintenance_resolve_origin_twin request (submitDatabaseMaintenanceIntent, owner host only) on managed brains and in one maintenanceTransaction on unmanaged brains; the verdict is recomputed inside the write and any drift holds the file instead of merging.
src/core/repair/unwithdrawn-facts.ts 1 coordinator `gbrain repair unwithdrawn-facts` (#8819) puts the ledger before-state back on preview-approved facts a fact_fence generation retired though no fence held them. On a managed brain the UPDATE runs only inside the managed_maintenance_restore_unwithdrawn_facts publication; an unmanaged or repo-less brain classifies every candidate excluded (unmanaged_reconcile), so a set previewed while it was managed is reclassified in one maintenanceTransaction under the page lock after the revision recheck and restores nothing.
src/core/repair/private-labels.ts 1 coordinator `gbrain repair private-labels` (GST-2059) removes or re-adds only the previewed privacy keys on preview-approved pages. On a managed brain each page goes through publishMaintenancePage (maintenancePreflight owner check, revision-bound, keep_trust; the Git door on a repo source); an unmanaged or repo-less brain re-imports it in one maintenanceTransaction under the page lock after the revision recheck, except a page whose file sits in an unmanaged source's checkout, which is held (file_backed) and never written.
src/core/repair/open-facts.ts 2 coordinator `gbrain repair open-facts` (#8194) sets preview-approved private facts to world (and --undo back to private) in place, keeping id and tier; each UPDATE rechecks the fact under its row lock after the holding, provenance and entity pages are locked FOR SHARE. On a managed brain database-only rows change only inside the managed_maintenance_open_fact_visibility publication (submitDatabaseMaintenanceIntent, maintenancePreflight owner check) and fence rows only inside the keep_trust maintenance page publication naming open_facts, which rolls back unless every named row moved. On an unmanaged or repo-less brain the database-only UPDATE runs in one maintenanceTransaction, and the fence-row UPDATE runs inside the label write's maintenanceTransaction (importAtRevision) after the page import and before writePageThrough writes a checkout file, so a row the recheck keeps private (revision_conflict) or a failed file write rolls the page, the file write and the rows back together.
src/core/repair/label-write.ts 1 coordinator The label-only page write of `gbrain repair visibility` and `gbrain repair private-labels` (GST-2468). On a managed brain it publishes through publishMaintenancePage (maintenancePreflight owner check, revision-bound, keep_trust, label_edit), or through publishMaintenancePages with a maintenance batch for repair visibility --readers (GST-2476; visibility.ts applyBatch admits a window of pages together), so the Git effect commits a window's ready files together. Only an unmanaged or repo-less brain calls importFromContent (importAtRevision), in one maintenanceTransaction under the page lock after the revision recheck and under withTrustKeep; for a page whose file sits in an unmanaged checkout (writeLabelFile) the file must still hold the page (ownerRepairFile), and writePageThrough writes the spliced bytes back with their preimage checked inside that transaction, so a refused or failed file write rolls the import back.
src/core/search-vector-backfill.ts 2 projection backfillPageVectors (reindex-search-vector, the fts_cjk_boundary migration) rewrites only pages.search_vector, through the seal's pageSearchVectorSql over the sanitized timeline and guarded by the knowledge revision it read (its read is an UPDATE-to-self of id); canonical fields are untouched and the managed writer guard passes search_vector-only updates.
src/commands/sources-set-path.ts 1 coordinator Managed rebind uses native exclusion, exact manifest verification and a retained source-incarnation receipt; unmanaged pointer repair remains explicit.
src/commands/sources.ts 10 coordinator Managed add/archive/restore/remove/purge/reclone route through source lifecycle; remaining legacy canonical SQL stays fenced.
src/commands/sync/deletes.ts 1 coordinator Managed Markdown sync routes to immutable page requests and an exhausted-cursor checkpoint; unsupported Git pull, code/image and connector paths refuse early. (Refactor wave 1: moved from src/commands/sync.ts.)
src/commands/sync/preflight.ts 1 coordinator Managed Markdown sync routes to immutable page requests and an exhausted-cursor checkpoint; unsupported Git pull, code/image and connector paths refuse early. (Refactor wave 1: moved from src/commands/sync.ts.)
src/commands/sync/rename-collision.ts 3 coordinator The legacy rename onto an occupied slug (#5431) runs the slug update, the tombstone re-key and the source_path repair in one maintenanceTransaction; a unique violation is classified and any other error fails the file; managed sources route renames through the sync request preparer.
src/commands/sync/renames.ts 2 coordinator Managed Markdown sync routes to immutable page requests and an exhausted-cursor checkpoint; unsupported Git pull, code/image and connector paths refuse early. (Refactor wave 1: moved from src/commands/sync.ts.)
src/commands/sync/holds.ts 2 coordinator Legacy sync only: a full walk moves the page of a held rename destination that now screens clean (updateSlug plus source_path, same id) before importing it; managed brains route sync to immutable page requests and never reach it.
src/commands/sync/plain-directory.ts 1 coordinator #7973: a plain-directory source (no Git checkout at or above it) imports through runImport, which routes managed pages through the coordinator; the one direct write stamps last_sync_at on its own sources row inside withCoordinatedWrite with maintenance attribution.
src/core/agent-install/setup.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/atomic-write.ts 0 filesystem_guard Atomic page replacement checks the managed root before temporary bytes are written.
src/core/backfill-effective-date.ts 1 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/background-work.ts 1 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/backup/quarantine.ts 3 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/bootstrap/verify.ts 2 coordinator Probe writes use put_page; a managed brain purges probes through delete_page purge and deletes probe facts inside withCoordinatedWrite, while the unmanaged cleanup keeps the engine primitives behind the canonical table trigger.
src/core/brain-repo-durability.ts 0 filesystem_guard Hardening checks the root; generated push/rebase helpers honor shared refusal markers.
src/core/brain-writer.ts 0 filesystem_guard Frontmatter repair checks the managed root before backup or file replacement.
src/core/calibration/undo-wave.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/chronicle/publish.ts 3 coordinator A managed brain publishes each new or changed event page (with its depth timeline row) through the managed_maintenance_chronicle_event request, re-validating the judged depth page inside the publication; a managed_maintenance_chronicle_retire request an earlier release journaled still stamps and drops its projection row there. Unmanaged writes and every retirement moved to generations/adapters/chronicle-events.ts (GBRA-161 PR 3).
src/core/company-brain/admission.ts 1 coordinator Managed registration delegates to source lifecycle; the unmanaged insert runs under native topology locks and a principal/source-locked transaction that validates the approved plan, binds the schema and records the ingestion receipt atomically.
src/core/company-brain/demo.ts 2 isolated_eval Fictional source registration uses a new PGLiteEngine connected with an empty config, so writes remain in an isolated in-memory database that is disconnected after the demo; the configured brain is never opened. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/core/company-brain/profile.ts 2 engine_guard Company-profile legacy deletes use withCompanyBrainSource to lock and validate source incarnation, path, receipt and policy; calls without that context retain engine guards, and managed sync routes to the coordinator before this legacy path. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/core/company-brain/runtime.ts 1 projection Only source policy metadata advances under the company-source lock and brain/source row locks; the same transaction validates immutable approval and creates a receipt with source-incarnation and managed owner/topology fences, without source-file writes.
src/core/cycle/drift.ts 1 coordinator A managed brain preflights maintenance authority before judge spend and publishes the report through publishMaintenancePage; the unmanaged putPage stays behind the canonical table trigger.
src/core/cycle/extract-atoms.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/cycle/derived-write-through.ts 1 engine_guard #8073: when a derived batch commit is refused, the rollback clears only the source_path its own write bound (compare-and-set on that path, live rows only) so the next backfill rewrites the file; write-through runs only on unmanaged brains, and the canonical table trigger refuses the SQL on a managed brain.
src/core/cycle/extract-facts.ts 7 coordinator Managed and unmanaged reconciliation key rows by fence row number, update matched rows in place, expire and detach removed rows instead of deleting them, and expire fence-owned rows of soft-deleted pages; on a managed brain each changed page publishes a managed_maintenance_fence_facts request and each soft-deleted page a managed_maintenance_deleted_page_facts_expire request, whose preparers replan or recheck the deletion under the page key inside the coordinator publication.
src/core/cycle/extract-takes.ts 4 coordinator On a managed brain the DB-source walk publishes each fenced page that needs a change as a managed_maintenance_takes_reextract request whose preparer re-reads the page under its key and writes the canonical projection's superseded_by while leaving resolution columns untouched; the file walk and unmanaged brains keep direct SQL, which the trigger refuses on managed brains. Stale-row pruning deletes only takes whose rows left a cleanly parsed fence on a live page in the same source.
src/core/cycle/grade-takes.ts 1 coordinator A managed brain applies auto-resolutions through the coordinated takes_resolve page mutation; the unmanaged resolveTake stays behind the canonical table trigger.
src/core/cycle/patterns.ts 2 coordinator Managed local patterns use admitted page operations and validate canonical outputs; the legacy reverse-file path runs only unmanaged. Quote grounding writes verified pattern pages back through publishMaintenancePage (revision-checked) on a managed brain; the unmanaged importFromContent write-back stays behind the canonical table trigger. #6302: on that unmanaged path only, the timeline row of a quarantined appended entry is deleted in the same transaction as the import (an import does not reconcile timeline rows; a managed publish projects them from the Markdown).
src/core/cycle/pattern-claim-sources.ts 1 coordinator The pre-run claim-source de-duplication (#6236) rewrites only pattern-page frontmatter: on a managed brain through publishMaintenancePage with the snapshot's expected revision (database row and worktree file in one coordinated publication; a pending or contended publish is held and the phase submits no child), and on an unmanaged brain through importFromContent, which the canonical table trigger refuses on a managed brain.
src/core/cycle/phantom-redirect.ts 3 coordinator Managed brains route the redirect to phantom-redirect-managed.ts (canonical merge and phantom delete as coordinated maintenance requests whose publication moves the rows); the legacy file-first path runs only unmanaged and its canonical SQL stays trigger-guarded.
src/core/cycle/phases/consolidate.ts 5 coordinator Managed local consolidation publishes a take, semantic contributing facts and file in one guarded receipt transaction; legacy writes remain SQL-guarded.
src/core/cycle/dream-provenance.ts 1 engine_guard The unmanaged dream-provenance stamp (synthesize and patterns) updates pages frontmatter directly; managed brains stamp through stampMaintenancePage or the synthesis postprocess maintenance write instead, and the canonical table trigger refuses this path there.
src/core/cycle/synthesize.ts 2 coordinator Managed summaries and provenance use prepared journal publication; legacy direct rows and reverse-file writes run only unmanaged.
src/core/cycle.ts 2 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/destructive-guard.ts 3 coordinator Managed source archive, restore and expiry purge use native exclusion and guarded topology transitions; remaining canonical maintenance keeps its engine guard.
src/core/embedding-dim-check.ts 1 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/embedding-invalidation.ts 2 projection Derived vector invalidation; signature restamping requires matching chunk context and a current text projection. Canonical fields remain guarded by SQL triggers.
src/core/embedding-restamp.ts 1 projection The embed phase's free signature restamp (W3 #7836) sets only pages.embedding_signature, per page under lockPageKeys, and its UPDATE re-checks the revision, the old signature, the projection seal and every chunk's current vector; canonical fields remain guarded by SQL triggers.
src/core/embedding-migration.ts 1 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/engine-constants.ts 1 contract Engine contract or explanatory SQL references; execution is in guarded engine implementations.
src/core/engine-sql/bootstrap.ts 1 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/engine-sql/chunks.ts 4 projection Derived indexing: setPageEmbeddingSignature stamps pages.embedding_signature, and a complete chunk replacement (upsertChunks sealChunkerVersion, #5984) stamps pages.chunker_version in the caller's transaction; chunk rows are derived index state and canonical fields remain guarded by SQL triggers. deleteChunks and an empty upsertChunks replacement clear pages.text_projection_revision, the derived seal certifying the deleted chunks, in the same statement as the chunk delete (#8502).
src/core/engine-sql/facts.ts 11 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/engine-sql/page-body.ts 2 engine_guard Wave B segmented storage: createSegmentedPageShell inserts the page row and flipBodyGeneration moves its body identity (body_generation, size and lead columns); both run in the caller's publication transaction, and the pages SQL trigger requires coordinator capability on managed brains (body_generation is guarded content).
src/core/engine-sql/pages.ts 18 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication. #5761: markPagesAttendanceBlocked writes only derived attendance-marker columns. The additional UPDATE pages in updatePageContextualRetrievalState changes only contextual projection state and clears active vectors in the same statement, under the caller's page lock; canonical body fields remain guarded. #6454: stripStaleFrontmatterKeys removes only the four parser-reserved keys from pages.frontmatter (keys no canonical file can carry, so the file is unchanged) inside the repair sweep's coordinated write; it touches no body, title, type or tag column.
src/core/engine-sql/salience.ts 1 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/engine-sql/sources.ts 1 projection Source settings (the sources.config merge in updateSourceConfig); canonical fields remain guarded by SQL triggers.
src/core/engine-sql/takes.ts 6 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/engine-sql/timeline.ts 3 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/engine.ts 2 contract Engine contract or explanatory SQL references; execution is in guarded engine implementations.
src/core/enrichment-service.ts 4 coordinator #6262: on a managed brain extract_entities submits the stub as a create-only put_page and lowers its tier, submits the timeline row as an add_timeline_entry page mutation (G5: the bullet reaches the page's markdown before the row) and lowers an unknown-tier row; the backlink is the edge that publication derives from the bullet's markdown link, with no direct link write; no direct-write fallback. Unmanaged brains keep the direct importFromContent and maintenance-transaction writes.
src/core/extract/receipt-writer.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/extract-timeline-from-meetings.ts 2 coordinator #6273: on a managed brain each entity page's meeting rows publish as one database-only managed_maintenance_meeting_timeline request, re-gated at the meetings' stored tier inside the coordinated apply; the unmanaged batch insert runs in maintenanceTransaction, which the guard refuses on a managed brain.
src/core/facts/backstop.ts 3 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/facts/fence-fact-append.ts 1 coordinator prepareFenceFactAppend (G4) inserts one facts row only inside apply(tx), the coordinator's publication transaction, after the file holding its fence row was published and after the page row; index-existing mode first reads the cell back from the published file and refuses fence_row_changed, so no facts row exists ahead of its fence row.
src/core/facts/fence-write.ts 2 coordinator Managed brains publish fence rows through the managed_facts_entity intent before any file or row write; unmanaged writes keep the source filesystem ownership check before editing canonical fact fences.
src/core/facts/gone-page-facts.ts 4 engine_guard A retention purge expires the purged pages' facts (filed on the page, extracted from it and filed on none, or about it and held by no page row) inside the transaction that deletes the page rows; both unmanaged purges run in maintenanceTransaction (purge-deleted.ts), and on a managed brain the canonical table SQL trigger refuses the write outside the coordinator. Database only: the page file is already gone, and rows are expired, never deleted. GBRA-574 B2: a conversation fact's slot row (dimension set, row_num set) filed on the purged page is expired in the same transaction and gives up its slot.
src/core/facts/forget.ts 4 filesystem_guard Managed callers journal withdrawal; legacy filesystem helper and the supersession-only expiry require coordinated write.
src/core/facts/ontology-rekey.ts 3 engine_guard B-10 (#6948 sweep): dropRekeyDuplicates deletes the ontology observations a re-key would duplicate on idx_facts_ontology_stint_dedup and repoints supersession links at the survivor, inside its caller's transaction immediately before the caller's UPDATE (the rename's maintenanceTransaction, the relink_facts publication, the phantom redirect's fact move, repair facts-rehome's move). The canonical table SQL trigger requires coordinator capability, so a legacy call fails before publication. GBRA-574 B2: a conversation fact among the losers keeps its row and gives up its slot (UPDATE facts SET dimension/value/value_hash/dim_status NULL) in the same transaction, and always loses to an ontology observation.
src/core/facts/proposal-supersede.ts 4 filesystem_guard System One S9 accept/undo (local CLI only): unmanaged brains update the two facts rows and strike or restore the fence row in one transaction under the source filesystem lock and page lock, publishing the file last; managed brains run the same change as the coordinator mutation decide_proposal.
src/core/facts/relink-publish.ts 2 coordinator #5836 facts relink (local CLI only, managed or not): the coordinator mutation relink_facts re-locks each pinned unlinked fact, moves linked rows onto their entity fence positions (and retires exact duplicates expired and detached) ahead of the page's canonical projection in the same publication and records the attempt and conflict-sweep handoff in that transaction.
src/core/persistence/loop-fact-retirement.ts 1 coordinator #5869 loops_close fact retirement (managed or not, local or write-bound remote): the coordinator mutation (operation loops_close, intent retire_loop_fact) expires the commitment fact and strikes its fence row through the entity page publication in one transaction, only when the fact is in the loop's source and no other open loop references it.
src/core/facts/withdrawal-schema.ts 1 schema Migration v174 DDL/backfill expires fact rows that match a folded withdrawal fingerprint; schema installation runs under coordinated activation, which quiesces canonical writers.
src/core/facts/insert-guard-schema.ts 1 engine_guard The facts_guard_inserted statement trigger (migration v264) stamps a withdrawn claim expired by an UPDATE that runs inside the inserting statement and transaction, only on rows that statement inserted, after taking the source FOR SHARE lock a withdrawal holds FOR UPDATE; the rows already passed managed_writer_guard as that INSERT, so a legacy insert on a managed brain fails before the stamp runs. Database only: it writes no file, and the struck fence row in Markdown stays the inserting publisher's (withdrawn claims are dropped or struck before the file write, as with the per-row trigger it replaces).
src/core/facts/withdrawal.ts 2 coordinator Publication is transaction-scoped under admitted authority, source/page guards and revision checks.
src/core/facts/write-single.ts 2 coordinator Managed brains publish the single fact through the managed_facts_entity intent before the legacy supersession or DB-only insert; those legacy writes run only unmanaged and stay trigger-guarded.
src/core/git-remote.ts 0 filesystem_guard Clone, pull and rebase entry points check the durable root refusal registry.
src/core/github-source.ts 4 coordinator Managed connector imports, deletion and checkpoints use prepared journal publication; unbound API sources explicitly persist in the database and bound sources retain canonical filesystem publication. #6982: with sync.write_through off or a declared storage.db_only slug, an unmanaged item imports into the database only (importFromContent, versioned) and never touches the checkout; otherwise the replaceable-file guard and the pre-rename byte check bind the file replacement.
src/core/google/google-source.ts 3 coordinator Managed connector imports, deletion and checkpoints use prepared journal publication; legacy materialization is confined to unmanaged sources.
src/core/google/sweep-shared.ts 2 coordinator Peeled from google-source.ts (wave 14 PR4, P4.3): the per-path delete used by the contact and calendar sweeps routes a managed source through the managed journal's delete and confines the legacy deletePages call to unmanaged sources. #6982: with sync.write_through off or a declared storage.db_only slug, importRendered imports into the database only (importFromContent, versioned) and never touches the checkout; otherwise the replaceable-file guard and the pre-rename byte check bind the file replacement.
src/core/google/loops-extract.ts 1 coordinator Managed loop extraction checks the managed fact authority and owner before model calls and publishes its commitment fact through writeSingleFact's coordinator path; the provenance-tagged loop edge is not a guarded canonical table.
src/core/import-file.ts 19 coordinator Prepared import applies under journal publication and revision CAS; direct managed imports refuse early, legacy source-path repair follows revision validation inside a savepoint, and a moved file's page is renamed only on the direct (unmanaged) path. Frontmatter tag reconciliation deletes only import-owned tag rows inside the same guarded import transaction. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/core/page-body/streamed-import.ts 3 coordinator Wave B streamed import of a file over the single-string ceiling: refuses on managed brains before any write (assertUnmanagedCanonicalWriter), then versions, reconciles import-owned tags and adds code-reference links inside one maintenanceTransaction under the import base check, as importFromContent does on an unmanaged brain.
src/core/last-retrieved.ts 1 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/minions/handlers/ingest-capture.ts 3 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/core/onboard/checks.ts 2 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/ops/extraction.ts 2 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/ops/links.ts 3 coordinator Unmanaged add_link/remove_link keep the engine calls; unmanaged add_link with valid_from/valid_until adds the edge and its dated manual transitions in one maintenanceTransaction (temporal typed edges). A managed brain submits an add_link/remove_link page mutation on the from page (persistence/manual-links.ts): the row lives in the page's links fence and the edge is projected from it inside the publication.
src/core/ops/pages.ts 0 coordinator Page mutations delegate to persistence modules; purge_deleted_pages runs purgeDeletedPagesCoordinated.
src/core/output/writer.ts 6 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/page-state/materialize.ts 1 coordinator Publication is transaction-scoped under admitted authority, source/page guards and revision checks.
src/core/page-state/projection-schema.ts 2 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers. #9192: the activation also assigns a first knowledge_revision to pages written before v150 (no content column changes).
src/core/page-state/projections.ts 2 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/page-state/versions.ts 2 projection GBRA-217: stamps only pages.version_history_gap_at (history metadata outside the canonical trigger's guarded fields) in the caller's versioning transaction, when an import reports a multi-commit gap or a prune drops snapshots; no canonical field or body is written.
src/core/page-state/image-seal.ts 1 projection The explicit image seal (#6803) sets only text_projection_revision on an importer-attested image page, under its page guard with a revision compare-and-set; no canonical field or body is written.
src/core/page-state/text-seal.ts 1 projection The page text seal moved out of projections.ts (which lost one reference): it sets only text_projection_revision and search_vector on the page at the revision it read, with a knowledge_revision compare-and-set, after the sanitized chunks are installed; no canonical field or body is written.
src/core/page-state/schema.ts 3 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers. The pages DO block constrains an empty pages table only; populated tables are finalized by revision-backfill-schema.ts.
src/core/page-state/revision-backfill-schema.ts 2 schema Migration-pass backfill of pages.knowledge_revision for rows written before the column (#5216): only NULL revisions are assigned, in committed id batches; canonical content is never written, and the revision trigger treats a NULL old revision without reading bodies.
src/core/page-state/tags.ts 5 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication. The frontmatter-claim and explicit-add inserts are two branches of one guarded statement. #5984: addPageTags is the same two-branch statement for many tags of a page the import wrote in its guarded transaction.
src/core/persistence/memory-mutations.ts 0 coordinator Submits remember and forget as admitted requests; the coordinator publishes them (memory-prepare.ts, forget-prepare.ts) under admitted authority, source/page guards and revision checks.
src/core/persistence/forget-prepare.ts 1 coordinator forget/forget_fact preparer (GBRA-190 G4): every page file carrying the claim is struck and published in one coordinated publication (one recovery record, one Git commit) before its transaction writes the ledger row, the expiries and the forget reason on the fact row.
src/core/persistence/memory-prepare.ts 2 coordinator Publication is transaction-scoped under admitted authority, source/page guards and revision checks.
src/core/persistence/page-prepare.ts 13 coordinator Publication, including versioned tombstone restoration, is transaction-scoped under admitted authority, source/page guards and revision checks; the sixth SQL site reconciles trusted first-write provenance with prepared canonical frontmatter and the seventh records canonical source_path in that same guarded transaction. Identical canonical no-ops do not heal physical metadata. The added local-CLI purge deletePage call runs in the prepared publication callback after recorded-artifact removal, under the same source/page identity, revision and durable authority guards as receipt completion; permanent journal IDs and outcomes survive the hard delete. The ninth site pins an inferred slug_root_mode on sources in the same publication transaction as the first bound origin. Its importFromContent calls carry prepare and run inside the coordinator publication. The segmented tag flip (prepareSegmentedTagMutation: createVersion, removeTag/addTag and the content_hash update) runs in the prepared publication callback under the same admitted authority, source/page guards and revision check as the inline tag write.
src/core/persistence/segmented-apply.ts 2 coordinator Wave B segmented apply inside the page write's publication transaction: sealSegmentedPage stamps only projection state (text_projection_revision, chunker_version, search_vector); demoteSegmentedPage turns a segmented row inline with an empty body that the same transaction's inline write fills, under the request's revision and page guards.
src/core/persistence/semantic-pages.ts 1 coordinator Publication is transaction-scoped under admitted authority, source/page guards and revision checks.
src/core/pglite-engine.ts 32 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication. GBRA-574 B2: mergeOntologyFact clears the slot of a conversation fact holding the exact stint key it is about to insert, in the same engine-guarded write.
src/core/pglite-schema.ts 1 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/postgres-engine.ts 31 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/schema-pack/mutate.ts 0 filesystem_guard The shared manifest write primitive checks its root before atomic replacement.
src/core/schema-pack/page-to-alias.ts 2 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/schema-pack/page-to-link.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/schema-pack/retype.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; on a managed brain unify-types refuses apply up front with writer_coordinator_required before its lock or any retype, and the dry run says apply is unsupported there.
src/core/schema-pack/sync.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/search/safe-chunks.ts 1 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/source-config-sql.ts 1 projection Derived indexing, retrieval telemetry, or source settings; canonical fields remain guarded by SQL triggers.
src/core/sources-ops.ts 9 coordinator Managed source constructors, removal and reclone delegate to guarded lifecycle transactions and reserved directory recovery; legacy paths remain preactivation only. The imessage branch of insertApiSource registers its database-only source row only on an unmanaged brain; addSource hands a managed brain to addManagedSource first.
src/core/sweep.ts 2 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/sync-anchor.ts 5 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/takes-write.ts 8 filesystem_guard Managed operation routes through journal; legacy atomic file helper checks the root.
src/core/think/index.ts 1 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/timeline-dedup-repair.ts 3 engine_guard Canonical table SQL trigger requires coordinator capability; legacy calls fail before canonical DB publication.
src/core/timeline-write-through.ts 2 filesystem_guard Managed semantic operation journals page changes; legacy atomic writes check root.
src/core/transcripts/archive.ts 2 engine_guard GST-2768: on writer-claimed brains the archive submits day parts and stale-part deletions as put_page/delete_page write requests through the coordinator (submitTranscriptPart, deleteStaleTranscriptPart). The direct importFromContent and deletePages calls run only in repo-less database mode and refuse on managed brains before any write (assertUnmanagedCanonicalWriter / canonical table trigger).
src/core/transcripts/ingest.ts 2 engine_guard On writer-claimed brains the CLI ingest submits rendered parts as put_page write requests (submitPageMutation with its trusted-local context). The remaining direct importFromContent (unmanaged brains) and stale-part deletePage calls refuse on managed brains before any write (assertUnmanagedCanonicalWriter / canonical table trigger).
src/core/url-source-origin.ts 1 projection Source settings (the sources.config merge in recordSourceOrigin, for the trusted local sources record-origin command, under a FOR UPDATE row lock in one transaction, inside the reclone's topology locks on a managed brain); canonical fields remain guarded by SQL triggers.
src/core/workspace-push.ts 0 filesystem_guard The resolved git root is checked before staging, committing or pulling.
src/core/write-through.ts 1 filesystem_guard Source filesystem lock and canonical page SQL guards reject legacy publication.
src/eval/brainbench/seed.ts 3 isolated_eval Explicit isolated evaluation database only; never opened against the active managed brain. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/eval/chronicle/harness.ts 2 isolated_eval Explicit isolated evaluation database only; never opened against the active managed brain.
src/eval/longmemeval/extract.ts 1 isolated_eval Explicit isolated evaluation database only; never opened against the active managed brain.
src/commands/reinit-pglite.ts 0 filesystem_guard Managed datastore registry refuses destructive reinit even offline; unmanaged rename requires the stable native lock.
src/core/persistence/maintenance.ts 0 filesystem_guard Legacy managed writers refuse before effects; unmanaged datastore backup retains native exclusion through rename.
src/commands/files.ts 0 filesystem_guard Attachment copying, redirection, restore and cleanup refuse paths in managed canonical trees before file effects.
src/commands/schema.ts 0 filesystem_guard Schema manifest scaffolding and forks check managed roots before creating files; separate config settings are control data.
src/core/ingestion/sources/inbox-folder.ts 0 filesystem_guard Inbox archive moves refuse managed canonical input paths before emitting the event or moving source bytes.
src/core/persistence/links-preparation.ts 2 coordinator Automatic graph projections publish inside canonical page transactions; delayed reconciliation locks all affected page keys and compares the originating revision.
src/core/persistence/sync-prepare.ts 11 coordinator Managed imports and deletes validate the recorded raw file hash plus enumerated page identity/revision; a managed rename moves the page with updateSlug and re-infers an implicit type inside the same journal publication after the renamed page's identity and revision are rechecked; the source-exclusive final checkpoint requires every selected receipt to be committed. Its importFromContent calls carry prepare and run inside the coordinator publication. The checkpoint also stamps sources.chunker_version after a full walk (#5566), inside the same source-exclusive publication; the column is outside managed_writer_guard's protected checkpoint tuple. #6536: when it records a page's origin it clears that page's database_only_reason='unbound_source' marker in the same publication. #6712 PR 4b: applyPassCheckpoint stamps sources.last_commit/last_sync_at (and chunker_version on a settled full pass) inside the coordinated checkpoint publication, compare-and-set on the pinned commit, source id and incarnation.
src/core/persistence/sync-image.ts 2 coordinator The managed sync image branch prepares through importImageFile with prepare and applies inside the coordinator publication after the sync-wide and import validations rerun; a Git rename versions and soft-deletes the old slug's page in that same transaction, and source_path is stamped there too.
src/core/persistence/sync-run.ts 1 coordinator The managed up-to-date heartbeat stamps only sources.last_sync_at inside withCoordinatedWrite, scoped to the checked source id and incarnation; no checkpoint, commit or content-freshness column changes.
src/core/persistence/sync-pass-run.ts 2 coordinator #6712 PR 4b: the pass's up-to-date and no-checkpoint stamps write only sources.last_sync_at inside withCoordinatedWrite, after assertActive and assertDrainLease, scoped to the source id and incarnation; no checkpoint, commit or content-freshness column changes.
src/commands/enrich.ts 0 coordinator A managed brain preflights maintenance authority before any model spend and publishes each enriched page through publishMaintenancePage; unmanaged enrichment writes through the put_page operation.
src/core/persistence/source-lifecycle.ts 8 coordinator Native affected roots precede topology, source, principal and receipt guards; every shared-root generation and old queued intent changes together. A remove or purge first deletes the source's pages in bounded batches under the same native locks, each batch behind the final transaction's preconditions (#7702/#8905).
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 6 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); a held move that removes struck held rows from their holding page clears those rows' row numbers inside apply(tx), the same publication transaction that publishes the page without them, after the file was published, so no database row changes ahead of Git (GST-2492)
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.
src/core/shared-skills/knowledge-guard.ts 0 coordinator Page publication rejects registered skill namespaces and manifest paths using source incarnations, canonical roots and stored physical aliases; the coordinator rechecks before bytes and inside publication guards.
src/core/skillpack/writer-guard.ts 0 filesystem_guard Legacy skill writers reuse durable managed-root and symlink-aware refusal; multiply linked sinks fail closed against out-of-root inode aliases, with put_skill and host-authorized adoption remedies.
src/core/skillopt/orchestrator.ts 0 early_refusal Legacy managed optimizer runs refuse before evaluation or history; explicit shared runs stage privately and publish accepted bodies only through the original caller and put_skill CAS.
src/core/skillopt/apply-edits.ts 0 filesystem_guard Optimizer atomic replacement guards both target and temporary paths before opening bytes, then rechecks the final rename.
src/core/skillopt/version-store.ts 0 filesystem_guard Accepted candidates preflight canonical, history, version and best paths before partial history; proposals and pending recovery retain guarded sinks.
src/core/skillopt/batch.ts 0 early_refusal Fleet optimization refreshes durable managed-root refusal before staging copies or evaluating any model; final destinations remain guarded.
src/core/skillopt/bootstrap-benchmark.ts 0 early_refusal Benchmark generation checks its output before provider calls and delegates final replacement to the guarded optimizer atomic writer.
src/core/skillopt/checkpoint.ts 0 filesystem_guard Checkpoint creation and garbage collection guard their destinations before mkdir or unlink; atomic replacement is independently guarded.
src/core/skillopt/rejected-buffer.ts 0 filesystem_guard Rejected-edit persistence refuses managed destinations before directory creation and uses the guarded atomic replacement sink.
src/core/skillopt/held-out.ts 0 filesystem_guard Best-effort rollout capture refuses managed output paths before appending; refusal never changes canonical skill files.
src/core/skillpack/copy.ts 0 filesystem_guard Scaffold and copy callers preflight every destination before the first copy and recheck each sink, preserving all-or-nothing managed refusal.
src/core/skillpack/init-scaffold.ts 0 filesystem_guard Pack and brain-pack scaffolds share a full-plan managed-root preflight before creating files; dry-run remains read-only.
src/core/skillpack/installer.ts 0 filesystem_guard Install overwrite, managed resolver updates and uninstall refuse managed roots before lockfiles or partial skill writes, with final sink checks.
src/core/skillpack/reference.ts 0 filesystem_guard Reference clean-hunk application preflights every destination before partial changes and checks each final text sink.
src/core/skillpack/doctor.ts 0 filesystem_guard Doctor auto-fixes preflight their complete write plan before creating any remediation files and recheck final destinations.
src/core/skillpack/harvest.ts 0 filesystem_guard Harvest refuses managed output roots before copies, with guarded rollback deletions and bundle-manifest updates.
src/core/skillpack/migrate-fence.ts 0 filesystem_guard Resolver migration refuses managed workspaces before any skill copies or fence rewrite; copy and rewrite sinks remain guarded.
src/core/skillpack/scrub-legacy.ts 0 filesystem_guard Legacy resolver scrubbing checks the actual destination before rewriting instructions.
src/core/skillpack/endorse.ts 0 filesystem_guard Endorsement output and temporary paths are guarded before replacement or downstream Git effects.
src/core/skillpack/state.ts 0 filesystem_guard Explicit state-path overrides cannot redirect installer receipts or temporary writes into canonical skill files.
src/core/skillpack/bridge-state.ts 0 filesystem_guard Bridge state-path overrides guard target and temporary files before writes while preserving existing atomic failure wrapping.
src/core/skillpack/nag-state.ts 0 filesystem_guard Nag receipt path overrides and temporary files cannot overwrite a managed canonical skillpack.
src/core/skillpack/registry-client.ts 0 filesystem_guard Registry cache overrides guard target and temporary files before cached payload replacement.
src/core/skillpack/remote-source.ts 0 filesystem_guard Remote source caches refuse managed staging and final destinations before clone or extraction and recheck final rename.
src/core/skillpack/tarball.ts 0 filesystem_guard Tarball pack output and extraction destinations refuse managed roots before subprocess or file effects and recheck final sinks.
src/core/skillpack/pack-publish.ts 0 filesystem_guard Pack export checks the output directory before mkdir; the tarball sink independently guards final bytes.
src/core/skillpack/audit.ts 0 filesystem_guard Audit-directory overrides and append targets refuse managed canonical paths; logging stays best-effort without bypassing refusal.
src/core/skillify/generator.ts 0 filesystem_guard Skillify scaffolding preflights the full file and resolver plan before partial outputs, with final managed-root and inode-alias sink checks.
src/core/dry-fix.ts 0 filesystem_guard Doctor and check-resolvable repair preflight every manifest skill before applying changes; both replacement and insertion sinks recheck canonical refusal.
src/core/skillpack/harness-bridge.ts 0 filesystem_guard Harness install, reference rewrite and ledger-owned removal preflight all destinations before effects; rewrite and deletion sinks recheck canonical refusal.
src/core/shared-skills/source-opt-out.ts 2 projection Trusted local CLI only (refuses remote !== false): toggles the sources.config.shared_skills setting key on a non-archived source; a settings field, not page content, and canonical columns stay guarded by SQL triggers.
src/core/shared-skills/setup.ts 1 engine_guard Trusted preactivation empty-source root binding uses an incarnation and null-path CAS; managed topology SQL remains guarded and skill bytes publish only through owner claim and bundle adoption.
src/core/shared-skills/optimizer.ts 0 coordinator Shared optimization preserves the exact approved closure and original grants in private staging; only accepted body changes reach put_skill with the original revision and stable request UUID.
src/core/persistence/import-prepare.ts 2 coordinator The prepared local import updates source_path only inside canonical publication; owner, input and target hashes, source confinement and knowledge-versus-skill boundary revalidate before apply. Its importFromContent calls carry prepare and run inside the coordinator publication.
src/core/mentions/pass.ts 7 coordinator Derived page_aliases rows (origin declared/subject) are replaced per page; on a managed brain the mention pass runs each alias batch inside withCoordinatedWrite for its source after re-reading page revisions, import writes them inside the caller's coordinated import transaction, and reindex --aliases holds the coordinated write itself. Frontmatter alias rows are never touched; unmanaged brains keep the SQL guard.
src/core/page-state/rename-alias.ts 13 engine_guard Rename aliases (slug_aliases), moveSlugBindings (facts entity/fence slugs, page_aliases, withdrawal subjects) and movePageIdReferences (#5431: versions, timeline, links deduplicated on the links key) run inside the rename's maintenanceTransaction; the canonical table SQL trigger requires coordinator capability, so legacy calls fail before publication. #6865: recordSlugLineAlias writes the removed slug: line's alias inside the content-repair publication transaction (coordinated managed file repair).
src/core/timeline-extract.ts 1 engine_guard Retracting removed markdown timeline rows is canonical table SQL; the trigger requires coordinator capability, so legacy calls fail before canonical DB publication.
src/core/persistence/connector-google-receipts.ts 1 coordinator Account and message-owned Gmail receipt metadata changes only under canonical source/page locks, identity/revision and file guards; guarded projection installation preserves withdrawal overlays without replaying bodies or extracting facts.
src/core/persistence/purge-deleted.ts 3 coordinator Unmanaged brains keep the engine bulk purge; a managed brain purges each expired tombstone through submitPageMutation delete_page purge bound to its revision. The second engine reference is the dry-run count for the D6 consent request (#6114), read-only. W1 (BELIEF_LEDGER.md 6.5): the third reference is the unmanaged per-tombstone expiry for sources the belief ledger records; it deletes one expired tombstone under its page key inside a belief batch (page.expired), the same retention rule as the bulk purge.
src/core/persistence/unbound-source.ts 1 coordinator Stamps the durable unbound_source classification on a page inside the coordinator publication transaction that published it; the column is not a canonical content column.
src/core/persistence/detached-pages.ts 1 coordinator #6609 restore --detach: clears source_path and stamps database_only_reason='detached' on the restored page only from classifyUnboundPage inside the restore_page coordinator publication transaction; neither is a canonical content column.
src/core/cycle/synthesize-concepts.ts 0 coordinator GBRA-60 G6: its concept writes moved to concept-writes.ts.
src/core/cycle/concept-writes.ts 2 coordinator GBRA-60 G6 (moved from synthesize-concepts.ts): a managed brain publishes concepts through publishMaintenancePages after maintenancePreflight; the unmanaged importFromContent path refuses on managed brains and, for a canonical: git source, refuses with strict_requires_managed before writing.
src/core/cycle/concept-publication.ts 1 coordinator GBRA-161 PR 5 (C-4): replaceConceptProvenanceLinks retires the concept-provenance edges of atoms that left a republished concept's group and banks the new edges in one transaction, coordinated (withCoordinatedWrite) on a managed brain, and only while the concept is still at the revision its publication produced.
src/core/cycle/synthesize-verify.ts 2 early_refusal Legacy direct content import. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/core/persistence/reconcile-prepare.ts 3 coordinator Coordinated preparation module. Its importFromContent calls carry prepare and run inside the coordinator publication. The reconcile publication callback records the slug-derived source_path of a database-only page (the #5254 unbound collision) inside the admitted put_page transaction, after the pinned preimages and backup verify; it touches only the reconciled page and only while its source_path is still NULL. When the reconciled page gains a canonical origin, the same callback clears its #5254 unbound_source classification.
src/commands/brainstorm.ts 1 early_refusal Legacy direct content import. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/commands/eval-longmemeval.ts 1 early_refusal Legacy direct content import. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/commands/quarantine.ts 2 early_refusal Legacy direct content import. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/commands/reindex.ts 1 early_refusal Legacy direct content import. Direct importFromContent calls without prepare refuse on managed brains before any write (assertUnmanagedCanonicalWriter).
src/eval/brainbench/metrics/write-back.ts 1 isolated_eval Explicit isolated evaluation database only; never opened against the active managed brain.
src/eval/longmemeval/diagnostics.ts 1 isolated_eval Explicit isolated evaluation database only; never opened against the active managed brain.
src/core/persistence/effects.ts 1 coordinator The embedding effect clears only the page embedding signature, inside its claimed, source-guarded installation transaction, when #4616 refused a chunk, so embed --stale finds the page; no canonical content column changes.
src/core/schema-migrations/v002-slugify-existing-pages.ts 2 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v009-timeline-dedup-index.ts 1 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v020-sources-table-additive.ts 1 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v028-cathedral-ii-chunk-fts-backfill.ts 1 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v034-destructive-guard-columns.ts 2 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v043-takes-resolved-quality-and-drift-decisions.ts 2 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v048-takes-weight-round-to-grid.ts 1 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v123-configurable-fts-language.ts 1 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v142-takes-embedding-dimension-matches-config.ts 1 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v144-open-loops.ts 1 schema Schema installation and forward-reference DDL; coordinated activation quiesces canonical writers.
src/core/schema-migrations/v189-pages-credential-projection-pending.ts 1 schema Projection-only: unseals live pages whose canonical body holds a private-key marker and queues their keyless rebuild; canonical page columns are unchanged.
src/core/schema-migrations/v191-alias-source-cascade.ts 2 schema Orphan alias GC before the alias→sources FK (#5094); grants exactly the orphan rows' sources through gbrain.write_sources for its transaction.
src/core/schema-migrations/v224-page-retrievals.ts 1 schema Creates page_retrievals and copies pages.last_retrieved_at (retrieval telemetry, a projection column) into it; canonical page columns are unchanged.
src/core/persistence/connector-path.ts 1 coordinator Connector path clear locks the source row, refuses filesystem sources with an absolute path and bound sources (a relative path on any source clears), and runs as a coordinated write on managed brains.
src/core/source-delete.ts 1 engine_guard Unmanaged source delete with its incarnation binding; managed brains route removal through source lifecycle first and the writer guard refuses a direct delete.
src/core/repair/extractor-facts.ts 1 coordinator `gbrain repair extractor-facts` (#5731) clears expired_at on preview-approved conversation-extractor facts and gives each a fresh row number. On a managed brain the UPDATE runs only inside the managed_maintenance_restore_extractor_facts publication (withCoordinatedWrite, page key locked, each fact reclassified first); an unmanaged brain runs the same function in one transaction under the page lock.
src/core/repair/captured-facts.ts 1 coordinator `gbrain repair captured-facts` expires preview-approved capture-lane facts that have no fence row. On a managed brain the UPDATE runs only inside the managed_maintenance_expire_captured_facts publication (owner-checked by maintenancePreflight, page key locked); an unmanaged brain runs it in one transaction. Fenced rows are never updated here: they are struck in the page and expired by the canonical projection of a revision-bound put_page.
src/core/repair/agent-session-facts.ts 2 coordinator gbrain repair agent-session-facts (#8064) re-attributes preview-approved database-only capture facts to the agent (attributed_to other plus a speaker note) and retires fact/self takes whose every contributing fact is then non-user. On a managed brain both UPDATEs run only inside the managed_maintenance_agent_session_facts publication (owner-checked by maintenancePreflight, page key locked); an unmanaged brain runs them in one maintenanceTransaction. The UPDATEs recheck attribution, activity and fence position under the row lock. Fenced facts and takes are never updated here: they are rewritten in the page through a revision-bound put_page and the canonical projection rewrites the rows in place.
src/core/repair/redacted-facts.ts 1 coordinator `gbrain repair redacted-facts` (#7125) rewrites the text of preview-approved database-only and conversation-extractor facts to the words a source page proves. On a managed brain the UPDATE runs only inside the managed_maintenance_restore_redacted_facts publication (owner-checked by maintenancePreflight, page key locked); an unmanaged brain runs it in one maintenanceTransaction. The UPDATE compares text, visibility, entity and holding page under the row lock. Fenced rows are never updated here: their claim is rewritten in the page through a revision-bound put_page and the canonical projection replaces the row.
src/core/repair/secret-spans.ts 2 coordinator `gbrain repair secret-spans` (GST-327) replaces only the credential spans the secret scanner finds in the preview-approved pages' stored copies with <REDACTED:rule> markers, one page per transaction under the page key after a digest recheck: inside withCoordinatedWrite with maintenance attribution on a managed brain, withWriteAttribution on an unmanaged one. Database only: the file side of a redaction goes through Git, history is kept, and a sync hold stays.
src/core/repair/ontology-facts.ts 1 coordinator `gbrain repair ontology-facts` (#6264) gives preview-approved ontology observations their own provenance back, clears their fence row number and expiry. On a managed brain the UPDATE runs only inside coordinatedDatabaseWrite (the ontology_propose path: write authority checked, source incarnation revalidated, entity and page keys locked); an unmanaged brain runs it in one maintenance transaction. It writes database-only ontology rows and never a page or file.
src/core/repair/facts-rehome.ts 1 coordinator `gbrain repair facts-rehome` (B-7, #6925) moves preview-approved database-only facts off a page-less entity_slug onto the page the strict resolver reaches. On a managed brain the UPDATE runs only inside coordinatedDatabaseWrite (the relink_facts operation: write authority checked, source incarnation revalidated, both slugs locked); an unmanaged brain runs one maintenance transaction per slug. It rechecks the slug, target and fact ids against the preview and never writes a page or file.
src/core/repair/consolidate-ties.ts 1 coordinator `gbrain repair consolidate-ties` (#6023) sets preview-approved typed facts that consolidation closed at their own effective instant back to open validity. On a managed brain the UPDATE runs only inside coordinatedDatabaseWrite (the relink_facts operation: write authority checked, source incarnation revalidated, the entity key locked); an unmanaged brain runs one maintenance transaction per fact. It rechecks the fact, take and instant against the preview and never writes a page or file.
src/core/repair/duplicate-facts.ts 2 coordinator `gbrain repair duplicate-facts` (#7043) supersedes preview-approved copies of one active fact (expired_at and superseded_by pointing at the kept row: the copy that is a row of its page's facts fence, else the oldest). On a managed brain each UPDATE runs only inside coordinatedDatabaseWrite (the relink_facts operation: write authority checked, source incarnation revalidated, the entity keys locked); an unmanaged brain runs one maintenanceTransaction per group. A fenced copy is first struck in its page through a revision-bound put_page (submitPageMutation), and its superseded_by link is written after that page write. It rechecks every row against the preview and never deletes a row.
src/core/repair/fact-claim-dates.ts 1 coordinator `gbrain repair fact-claim-dates` (#7247) moves preview-approved facts' valid_from to the date their claim states. Fence rows change only in the page through revision-bound put_page (the coordinator re-projects the facts row from the canonical text); the one direct UPDATE sets valid_from of database-only facts in one maintenanceTransaction on an unmanaged brain, rechecking each row's previewed valid_from, and is never reached on a managed brain.
src/core/repair/conversation-labels.ts 4 coordinator `gbrain repair conversation-labels` expires preview-approved label-misattributed conversation facts, expires the page completion marker and writes the not-extractable outcome, under the page key: one database-only managed_maintenance_conversation_label_retire request per batch of up to 25 pages on a managed brain (the preparer reclassifies each page under its lock), one maintenanceTransaction per batch on an unmanaged brain.
src/core/repair/purged-page-facts.ts 1 coordinator `gbrain repair purged-page-facts` expires preview-approved facts that purges before the #8859 fix left active (page-extraction rows filed on no page whose page is gone), under the gone pages' keys: one database-only managed_maintenance_expire_purged_page_facts request per batch of up to 200 facts on a managed brain (the preparer reclassifies each fact under the keys), one maintenanceTransaction per batch on an unmanaged brain. Rows are expired, never deleted.
src/core/persistence/atom-maintenance.ts 1 coordinator A managed atom retirement stamps retired_by/retired_at on the tombstone inside the coordinator publication of its managed_atom_delete request, after the page deletion path removed the canonical file, so the database row and file change commit or roll back together.
src/core/repair/stale-atoms.ts 2 coordinator gbrain repair stale-atoms retires an atom on a managed brain through a managed_maintenance_retire_stale_atoms coordinated request (the marker stamp runs in its publication); only an unmanaged brain soft-deletes and stamps in a direct page-locked transaction, where no canonical writer enforcement applies.
src/core/repair/file-drift.ts 1 coordinator `gbrain repair file-drift --provenance never_committed --prefer database` (GBRA-133) keeps a held live page whose file no commit ever held as a database-only page: the UPDATE clearing source_path and source_uri runs only inside the managed_maintenance_file_drift_detach publication (submitDatabaseMaintenanceIntent, owner host only), whose preparer re-checks the page id, revision, recorded path and git provenance and re-locks the live page; it clears the resolved hold in the same transaction and writes no file. An unmanaged brain refuses with owner_unavailable.
src/core/repair/atoms-restore.ts 2 coordinator gbrain repair atoms-restore (#7013) restores a preview-approved atom an empty re-extraction retired: on a managed brain only through a managed_maintenance_restore_reextract_atom request (deleted_page admission, revision-bound, the restore rule rechecked under the atom and origin locks, then a revert_version to the pre-stamp version); only an unmanaged brain archives, restores and unstamps the atom in one page-locked maintenanceTransaction, where no canonical writer enforcement applies.
src/core/repair/ghost-pages.ts 1 coordinator `gbrain repair ghost-pages` (#6696 B5) retires a preview-approved ghost page (its canonical file is gone): on a managed brain only through a managed_maintenance_retire_ghost_page request whose preparer reruns the classifier under the approved owner and prepares a delete_page with allowMissingFile that refuses unless the file target is the approved path with no bytes (a restored file refuses at preparation or at filesystem publication); only an unmanaged brain versions and soft-deletes directly, inside maintenanceTransaction under the page lock after the revision, page id and file-absence recheck.
src/core/repair/legacy-twins.ts 9 coordinator `gbrain repair legacy-twins` (#6885) merges a preview-approved legacy twin pair onto its legacy page: on a managed brain only through a managed_maintenance_merge_legacy_twin request on the twin, holding the legacy page's key, whose preparer re-checks both pages (ids, slugs, revisions, recorded path, same content, the file agreeing with the twin) under the approved owner and again under the publication locks, and publishes no file; only an unmanaged brain records the origin, moves the twin's references, versions and soft-deletes the twin directly, inside maintenanceTransaction under both page locks after the same recheck.
src/core/repair/aliases.ts 2 coordinator `gbrain repair aliases` (#6619) deletes preview-approved page_aliases / slug_aliases rows whose target page no longer exists (soft-deleted targets are never touched), under the page key: inside withCoordinatedWrite with maintenance attribution on a managed brain, one transaction on an unmanaged brain.
src/core/repair/rename-identity.ts 5 early_refusal `gbrain repair rename-identity` (#6729) carries a previewed old page's identity onto its new slug only on an unmanaged brain: the plan and the apply refuse `managed_remedy_unavailable` on a managed brain before any canonical write. The unmanaged carry runs in one maintenanceTransaction under both page locks after the plan-hash, open-record and fence-row recheck: it merges matching fence rows onto the old rows (never valid_until), retires the provisional page under its purged slug, moves the old page to the new slug (updateSlug) and imports the new file it read from the checkout; it writes no file, so there is no filesystem ordering to keep.
src/core/repair/frontmatter.ts 2 coordinator `gbrain repair frontmatter --apply` (#5988) publishes a managed source's repaired file only through submitManagedFileRepair (the managed_file_repair request, preview-hash bound). On an unmanaged (legacy) source it writes the previewed bytes after a backup, moves a renamed page with updateSlug and its source_path in one maintenanceTransaction, then imports the file through importFromFile; no canonical writer enforcement applies there.
src/commands/sources-mirror.ts 1 engine_guard `gbrain sources mirror-readonly|mirror-writable` (#5409) updates only sources.config.mirror_read_only, exactly as `sources federate` updates sources.config.federated; the sources managed_writer_guard trigger governs the row and no page, fact or file is written.
src/core/sync-upstream.ts 1 engine_guard `recordUpstreamObservation` (#5255/#5176) updates only sources.upstream_checked_at, upstream_commit and upstream_behind, observations of the checkout's Git upstream outside managed_writer_guard's protected topology and checkpoint tuples; no page, fact or file is written, and a failure never fails the sync.
src/core/persistence/mirror-read-only.ts 1 coordinator classifyMirrorPage stamps pages.database_only_reason=mirror_read_only only inside the coordinator publication transaction of a page write that published no file into a read-only mirror source (#5409), as classifyUnboundPage does for unbound sources.
src/core/persistence/worktree-refresh.ts 1 coordinator `gbrain sources refresh` (F0) is the one sanctioned managed Git writer: it fast-forwards the checkout only under the worktree native lock after admission refused and claims stopped every checkout write (`fenced`), then updates only sources.upstream_checked_at/upstream_commit/upstream_behind in the merged bookkeeping transaction; pages and the checkpoint advance through the ordinary managed --no-pull sync. #7686: with sources.refresh_publish_diverged on (standing consent, default off) it first runs the keep-checkout publish (a bounded child gbrain git commit-push --push-only --keep-checkout, never on the owner's event loop), which pushes HEAD merged with the upstream in memory and never moves the checkout or the database.
src/core/facts/unfenced-facts.ts 3 coordinator The extract_facts cycle phase and the v0.32.2 migration fence row_num-NULL facts onto their entity pages. On a managed brain the fence publishes through a coordinated maintenance request; an unmanaged brain writes the page file under the source filesystem and page locks, then mirrors the body and stamps row numbers in one maintenanceTransaction.
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 4 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. The plan-wide chunk delete clears the same pages' text_projection_revision seal in that statement, so an unrewritten page it emptied stays healable (#8502).
src/core/persistence/page-purge.ts 4 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. #6619: in the same callback it deletes the purged page's page_aliases and the slug_aliases redirects that resolve to it.
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.
src/commands/sources-trust.ts 1 engine_guard gbrain sources set-trust rewrites only the source's config jsonb (its default trust tier for future writes); the managed writer guard exempts sources rows whose id, incarnation, local_path, archived and checkpoint columns are unchanged, and no knowledge row changes.
src/core/trust/claim.ts 2 engine_guard gbrain trust claim-sources records the claim and its lift receipt in the source's config jsonb only (like sources set-trust); the managed writer guard exempts sources rows whose identity columns are unchanged. The tier lift itself runs through trust/backfill.ts inside withCoordinatedWrite on a managed brain.
src/core/persistence/derived-facts.ts 1 coordinator insertGatedFacts inserts only gate-allowed conversation fact rows; writeDerivedFacts refuses on a managed brain (writer_coordinator_required) and otherwise runs it inside the attributed maintenance transaction with taint edges.
src/core/trust/fence-guard.ts 2 coordinator guardFenceRows detaches and renumbers fence rows more trusted than the writer inside the canonical fence re-projection of the page publication (canonical-projections.ts), in the same journal transaction as the receipt.
src/core/trust/held-removals.ts 3 coordinator The owner accept of a held take or timeline removal deletes or re-projects that one row as the page now says, inside withCoordinatedWrite under the page key on a managed brain (withWriteAttribution otherwise), in the transaction that decides the proposal; a refused takes_remove instead reruns as an owner takes_remove through the takes request preparer.
src/core/trust/owner-actions.ts 1 coordinator The owner release of a held fact inserts it database-only at user_confirmed under the promotion capability, in the owner action transaction that decides the hold: withWriteAttribution on an unmanaged brain, and withCoordinatedWrite on a managed brain only for the facts-lane fallback (a hold with no entity slug, or whose page is missing). Every other managed fact release publishes through the trust_release door (trust/release-publish.ts: the fence row in the file first, then the row).
src/core/trust/page-handlers.ts 1 coordinator Owner page confirm/revert: a managed brain admits a journaled owner page mutation (submitOwnerPage); the unmanaged path runs importFromContent inside one attributed transaction that re-checks the previewed revision.
src/core/trust/supersede-handlers.ts 4 filesystem_guard Trust-guard supersession accept/undo raise or restore only trust_tier on the proposal's facts/takes row through the S9 decide_proposals checked accept/undo path (proposal-supersede.ts): source filesystem and page locks unmanaged, the decide_proposal coordinator mutation managed. GST-2897 B: the owner's accept of a held share sets only the held fact's visibility to the world its fence cell already asks for (or a pageless row), under withCoordinatedWrite on a managed brain; it never changes a claim, a file or a lifecycle.
src/core/trust/timeline-projection.ts 2 engine_guard gbrain extract's timeline projection inserts gate-allowed rows stamped with the page tier inside an attributed maintenanceTransaction; on a managed brain the canonical table trigger refuses it outside the coordinator.
src/eval/brainbench/trust-scenario.ts 2 isolated_eval BrainBench trust suites register their fixture sources in the scenario's own isolated benchmark brain (persistence disabled for the registration, re-enabled after); never opened against the active managed brain.
src/core/oversized-backfill.ts 1 coordinator The oversized-page backfill (gbrain reindex --oversized, the post-upgrade pass) rewrites a size-skipped page without its gate markers through importFromContent on unmanaged brains (assertUnmanagedCanonicalWriter applies) and through submitPageMutation put_page (managed_quarantine_clear, expected_revision) on managed brains; its only direct write is the page_embedding_budget hold row, which is derived spend state, not canonical content.
src/core/persistence/sync-streamed.ts 3 coordinator Wave B managed sync of a Markdown file over the single-string ceiling: the rename (updateSlug), the source_path stamp and the unbound_source clear run only in the request's apply inside the coordinated publication transaction, after the revision and identity checks in validate, as sync-prepare.ts does for string-sized files.
src/core/page-body/segment-rewrite.ts 1 coordinator Wave B fence rewrites of a segmented body (forget strikes, fact purge): the only pages write restores a soft-deleted page's deleted_at after the generation flip, in the caller's transaction (the forget/purge maintenanceTransaction or coordinated publication) under its page guards; the flip itself is applySegmentedBody's.
src/core/page-body/rechunk.ts 2 coordinator Wave B gbrain reindex --segmented --apply: each batch flip restores the page's exact updated_at after applySegmentedBody (a re-chunk is not an edit) and the final transaction stamps chunker_version, both under the page key lock with the body generation rechecked (a moved page stops the run); segmentWriteScope wraps every transaction in withCoordinatedWrite under maintenance attribution on a managed brain, so neither write runs outside the coordinator there. Neither touches content columns; the knowledge revision and seal are kept.
src/core/belief/ledger.ts 0 contract The belief ledger finalization contract writes no canonical table: withBeliefBatch reads the held page keys before and after the caller's projections and appends belief_events in the same transaction (publications, coordinated database writes, and the unmanaged projection points in belief/projection-point.ts).
src/core/belief/purge.ts 1 engine_guard bumpPurgeEpoch updates only sources.purge_epoch, a counter the managed writer guard lets through because the identity and checkpoint columns stay unchanged; it runs inside the purge transaction that already holds the purge's admission and page keys.
src/core/belief/purge-mirror.ts 4 engine_guard W1 restore replay (BELIEF_LEDGER.md 8) of purges newer than the archive: runs only inside the backup restore's single transaction before the restored root is published, granting gbrain.write_sources for that one source in that transaction; its fact, take and page deletes repeat what purge_fact and purgePageInTransaction removed.
src/core/persistence/links-extraction-holds.ts 2 engine_guard GBRA-130 A-1: records and clears only the derived pages.links_extract_failure column (a stale-extraction failure record outside the managed writer guard tracked set, like the attendance marker); it touches no canonical body, title, type, tag or frontmatter column.
src/core/repair/url-clone-fences.ts 3 engine_guard GBRA-130 C-2: unmanaged brains only (refused on managed). Keeps the fence rows the database already holds database-only in a maintenance transaction, then imports the clone file's HEAD bytes through importFromContent before restoring the file (a HEAD the private hold refuses is restored without importing, #7897); preview-bound (--expect) with destructive consent and a file backup.
src/core/repair/visibility.ts 2 coordinator `gbrain repair visibility --apply` (GBRA-159) only tightens database-only active facts from world to private when their source page is private. On a managed brain the UPDATE runs only inside the managed_maintenance_tighten_fact_visibility publication (owner-checked by maintenancePreflight, page key locked); an unmanaged brain runs it in one maintenanceTransaction. The UPDATE rechecks visibility='world', row_num IS NULL and expired_at IS NULL under the row lock. Fenced rows change in the page through the revision-bound label-only write (repair/label-write.ts); only on an unmanaged brain, when that write kept a more trusted world row beside the new private one, a second UPDATE in one maintenanceTransaction makes that row private, rechecking id, row_num, visibility='world' and expired_at IS NULL (GST-2487).
src/core/repair/access.ts 1 projection `gbrain repair access` (GBRA-218) sets only pages.page_readers, the derived readers column the v282 trigger keeps equal to gbrain_access_readers(frontmatter) on every later write, for rows whose stored value differs. It writes no canonical field, revision, content hash, generation or embedding state; gbrain_require_managed_writer passes the update because no canonical page column (identity, bodies, frontmatter, deleted_at, revision, trust tier, body generation) changes. The derived value only restores reads to listed members: a readable_by page with no derived value reads as nobody remotely.
src/core/access/policy.ts 3 projection GBRA-218 A2 folder rules: restampSource sets only pages.folder_rule_ids (in id-ordered windows, then once more under the source lock), the derived column the v283 stamping trigger keeps equal to gbrain_access_folder_rules(source_id, slug) on every page write, and writeAccessStore sets only sources.config.access_store. Neither writes a canonical page column, revision, content hash, generation, source checkpoint or topology column, so gbrain_require_managed_writer passes both on a managed brain. A narrowing keeps its prefix's pending coverage row until the restamp finishes, which reads every page under it as nobody, so a stale stamp only hides.
src/core/facts/file-body-guard.ts 1 engine_guard #6982 replaceStoredBody mirrors a checkout file body over the page row only inside its caller's maintenanceTransaction, after re-reading the row under a row lock and confirming it still equals the body the caller compared, and saves a page_versions row first; on a managed brain the canonical table trigger refuses the write outside the coordinator.
src/core/persistence/git-declared.ts 4 coordinator GBRA-95 G7a declareStrictPublication stamps or clears pages.database_only_reason (and drops source_path/source_uri for a page turning private, keeping the path in withheld_source_path, which the publication that writes the file again clears) inside the guarded publication transaction of publishMutation and publishGroup, after the door commit removed the file; it writes no content.
src/core/persistence/git-conversion.ts 4 contract G8a sources canonical (trusted local CLI, managed brains, preview-bound apply): stamps database_only_reason=git_ignored on pages whose parked Git effect targets an ignored path, in one transaction that declares the persistence protocol and locks the effect row; #7618: stamps a withheld private page's class and moves source_path to withheld_source_path in its own transaction before the door commit that removes its file (G7a's private transition, under the protocol declaration; stamped first, so no sync reads the removal as a deletion); and sets or clears sources.config.canonical last in the transaction that records the conversion; it writes no page content, and adoption files are committed through commitThroughDoor before any database change.
src/core/connectors/api-source.ts 2 coordinator Shared Fireflies/Slack publish step (GBRA-220): a managed source imports and deletes only through ManagedConnectorSync (prepared journal publication); the importFromContent and deletePages calls run for unmanaged sources, and in git mode only after the file was committed through commitPathsLocked (git first, writer lock). Private pages are held with holdNoncanonicalPrivate.
src/core/meetings/meetings-source.ts 1 coordinator Meetings connector (GBRA-220): the one sources.last_sync_at/newest_content_at stamp (never page content) runs only for unmanaged sources; managed runs stamp through the connector checkpoint save in connector-sync.ts.
src/core/slack/slack-source.ts 1 coordinator Slack channel connector (GBRA-220): the one sources.last_sync_at/newest_content_at stamp (never page content) runs only for unmanaged sources; managed runs stamp through the connector checkpoint save in connector-sync.ts.
src/core/imessage/imessage-source.ts 1 coordinator iMessage connector: the one sources.last_sync_at/newest_content_at stamp (never page content) runs only for unmanaged sources; managed runs stamp through the connector checkpoint save in connector-sync.ts, and pages write through the connector's api-source import.
src/core/access/attest-sources.ts 1 projection GST-1113: applyAttestSources sets only sources.config.qm_scope (and federated false) on a source a credential first lists in attest_sources, under the sources row lock in the binding transaction. It writes no page column, revision, content hash, generation, checkpoint or topology column, so gbrain_require_managed_writer passes it on a managed brain, as with policy.ts writeAccessStore; the mark only hides.
src/core/storage-manifest/source.ts 1 contract markRole sets role and federated in the config of the storage source that addSource or hostRepo created in the same storage init or first repo-less register; it writes source configuration only, never page content.
src/core/guests/sources.ts 1 projection GBRA-504 guest source setup (initGuestSource, the trusted local gbrain guests init): merges the guest, federated and trust_ceiling keys into sources.config in the transaction that writes the guest_sources row; a settings field, not page content, and canonical columns stay guarded by SQL triggers.