Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge remote-tracking branch 'origin/capy/memory-trust' into capy/memory-trust-writes

garrytane5fdf619bede
diff --cc src/core/persistence/page-prepare.ts
index c39ea97197,0ed53b9e01..abc7d535f6
--- a/src/core/persistence/page-prepare.ts
+++ b/src/core/persistence/page-prepare.ts
@@@ -371,9 -367,10 +371,11 @@@ export async function preparePageMutati
}
let prepared: PreparedContentImport | undefined;
let provenance: CanonicalProvenance | undefined;
+ let trust: WriteTrust | undefined;
const result = await importFromContent(engine, row.slug, content, {
...source, noEmbed: true, remote: row.authority.remote, activePack, fences: projected ? 'coordinated' : 'lenient',
+ // #6259: only owner-tier intents keep gate-owned markers; an ordinary put_page, local or remote, has them stripped.
+ preserveGateMarkers: !row.authority.remote && (p.kind === 'managed_maintenance_page' || p.kind === 'managed_quarantine_clear'),
forceRechunk: row.operation === 'restore_page' || row.operation === 'revert_version',
allowEmptyOverwrite: p.allow_empty === true || row.operation === 'restore_page' || row.operation === 'revert_version',
source_kind: typeof p.source_kind === 'string' ? p.source_kind : null,
@@@ -491,9 -480,10 +493,11 @@@
slug: row.slug, source_id: row.source_id, chunks: ready.result.chunks, noop,
...(ready.result.chunks === 0 ? {chunk_skip_reason: noop ? 'write_skipped'
: isEmbedSkipped(ready.parsedPage.frontmatter) || isQuarantined(ready.parsedPage.frontmatter) ? 'embed_skip' : 'empty_body'} : {}),
+ // #6259: say the gate hid the page, not only why it has no chunks.
+ ...(!noop && quarantineOutcome(ready.parsedPage.frontmatter) ? { quarantined: quarantineOutcome(ready.parsedPage.frontmatter) } : {}),
...(row.operation === 'capture' ? { channel: 'capture', content_hash: p.capture_hash } : {}),
- ...(edited ? editDiff(row.slug, edited.before, edited.after) : {}), ...fencesNormalized, ...fenceRepairOutcome };
+ ...(edited ? editDiff(row.slug, edited.before, edited.after) : {}), ...fencesNormalized, ...fenceRepairOutcome,
+ ...(lowered ? { trust_lowered: lowered } : {}) };
} };
}