Garry's Opinionated OpenClaw/Hermes Agent Brain
Content-quality quarantine (key files cluster)
What a page the content-quality gate hid as junk may do and what readers and
writers are told (#1699, #6259). The markers themselves are in
src/core/quarantine.ts (files and sync); the operator
surface is src/commands/quarantine.ts (commands).
Trust boundary. stripGateOwnedMarkers (src/core/import-screen.ts,
called once by importFromContent) removes GATE_OWNED_FRONTMATTER_KEYS
(quarantine, content_flag, embed_skip, atoms_scan_hash,
quarantine_override) from every write unless an owner-tier path passes
preserveGateMarkers: true: importFromFile, managed sync
(persistence/sync-prepare.ts) and file import (import-prepare.ts), reindex,
file repair, reconcile, the cycle derivers and their managed_maintenance_page
intents (persistence/page-prepare.ts), quarantine clear/scan, and the
owner-internal put_page kind managed_quarantine_clear
(persistence/page-mutations.ts OWNER_FILE_INTENTS). Local put_page,
connectors and ingest lanes are not owner-tier. opts.remote keeps only its
fence-merge and hidden-row meaning. Test: test/gate-marker-strip.test.ts.
Derived data. isFactsBackstopEligible returns quarantined; the
canonical projection and the unmanaged fence reconcilers (cycle/extract-facts.ts,
cycle/extract-takes.ts) project no facts or takes for a quarantined page and
leave rows projected before it as they are. Tests: test/facts-eligibility.test.ts,
test/quarantine-fence-projection.test.ts.
What callers see. A put_page the gate quarantined reports
quarantined: { reason, detail } (quarantineOutcome, set in
persistence/page-prepare.ts) and one page_quarantined safety notice
(pageQuarantinedNotice, emitted by emitFenceNotice in page-mutations.ts;
put_pages marks each page and emits one notice in page-batch.ts). get_page
(ops/pages.ts) carries quarantined and the notice, and so does fetch
(metadata.quarantined, both through readQuarantined); an untrusted reader
gets no body (fetch: empty text) unless it holds admin and passes
include_quarantined: true.
Test: test/quarantine-read-write-surface.test.ts.
src/core/quarantine-override.ts— #6259 (fix wave 12): thequarantine_overridefrontmatter keygbrain quarantine clear --forcerecords:{ binding, cleared_at }, wherebindingis a sha256 over the classifier's inputs (title, type, body) as the gate canonicalizes them (quarantineOverrideFor).assessImportSanity(import-screen.ts) wraps its verdict inwithQuarantineOverride, which removes the junk-pattern, literal and markup-flag outcomes while the binding is current (size outcomes stay).importFromContentcallsstripGateOwnedMarkers(import-screen.ts,GATE_OWNED_FRONTMATTER_KEYS): every writer losesquarantine,content_flag,embed_skip,atoms_scan_hashandquarantine_overrideunless an owner-tier path passespreserveGateMarkers: true(importFromFile, managed sync and file import, reindex, file repair, reconcile, the cycle derivers and theirmanaged_maintenance_pageintents,quarantine clear/scanand the owner-internalmanaged_quarantine_clearput_page kind); local put_page, connectors and ingest lanes do not. A preserving path keeps its own override only while current, and a current override drops classifier markers the content still carries. Fix wave 13: a preserving call that carries awriteGate(unmanaged sync/import viaownerSourceGateInput, managed sync and file import viaownerGateInput) keeps the override only when the gate's tier is owner-tier (OWNER_TIER_FLOOR); managed file repair passes thewriteGatea sync of the same file passes, with the file's path assource_uriso a path-scoped owner allow rule holds (#9511), and reconcile passes the source's owner tier asoverrideTierfor the same rule; an unreadable tier fails closed. Paths that pass neither (the cycle derivers,quarantine clear) are unchanged. Tests:test/quarantine-override-tier.test.ts,test/quarantine-override-repair-reconcile.test.ts.opts.remotekeeps only its fence-merge/hidden-row meaning. Tests:test/gate-marker-strip.test.ts. For a stripped write the classifier would hide or markup-flag,carryStoredQuarantineOverridereads the stored override and keeps it when it still binds (so a remote tag edit does not re-hide the page); a clean remote write reads nothing extra (#6007 statement budget). Company-brain inspection refuses files carrying it (hidden_input). Doctor's quarantine row namesclear <slug> --forceandcontent_sanity.disabled_patterns.src/core/ops/get-page-projection.ts—projectGetPageshapes the get_page response from the reader-visible body (#2225content, content_only round-trip fields,timeline_entries,file_held, andchars: the characters of compiled_truth, timeline andcontentit returns). #6259:quarantinedViewdecides whether a quarantined page's body is withheld (body_omittedfor an untrusted reader withoutadmin+include_quarantined); a withheld body empties compiled_truth and timeline and dropscontent.historyQuarantinegives get_versions and known_as_of reads the same view per stored version (quarantined now or in that version), so a remote reader gets no body for it; the notice is emitted once per read.