Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: gate-3 fixes after the security merge
garrytan3670b248e8a9
diff --git a/docs/architecture/canonical-writers.tsv b/docs/architecture/canonical-writers.tsvindex a0974ae5c9..7e908ffadc 100644--- a/docs/architecture/canonical-writers.tsv+++ b/docs/architecture/canonical-writers.tsv@@ -175,7 +175,7 @@ src/core/mentions/pass.ts 7 coordinator Derived page_aliases rows (origin declarsrc/core/page-state/rename-alias.ts 8 engine_guard Rename aliases (slug_aliases) and moveSlugBindings (facts entity/fence slugs, page_aliases, withdrawal subjects) run inside the updateSlug transaction; the canonical table SQL trigger requires coordinator capability, so legacy calls fail before publication.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 1 coordinator Unmanaged brains keep the engine bulk purge; a managed brain purges each expired tombstone through submitPageMutation delete_page purge bound to its revision.+src/core/persistence/purge-deleted.ts 2 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.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/cycle/synthesize-concepts.ts 2 coordinator A managed brain publishes concepts through publishMaintenancePage after maintenancePreflight; the unmanaged importFromContent path refuses on managed brains.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).diff --git a/src/core/persistence/unbound-source.ts b/src/core/persistence/unbound-source.tsindex e76e75d1d5..cbbe7ff7f4 100644--- a/src/core/persistence/unbound-source.ts+++ b/src/core/persistence/unbound-source.ts@@ -45,7 +45,7 @@ export function unboundSourceError(sourceId: string, path: string | null, scope:// #6122: on a brain whose managed persistence is not activated, a claim alone fences classic sync of the source,// so the working path is the file plus classic sync; claiming is named with that consequence.const edit = `edit the page's file in the checkout${path ? ` (${path})` : ''} and run gbrain sync --source ${sourceId}, which imports it`;- const trap = `To have gbrain own the checkout instead (a brain-wide change: ask the user first), ${bind}, then activate managed persistence (preview first: gbrain sources writer activate --confirm-quiesced --dry-run --json). `+ const trap = `For a gbrain-owned checkout instead (a brain-wide change: ask the user first), ${bind}, then activate managed persistence (preview first: gbrain sources writer activate --confirm-quiesced --dry-run --json). `+ `Managed persistence is not activated on this brain, so a claim without activation blocks classic sync of ${sourceId} until it is activated or the claim is released with gbrain sources writer deactivate.`;const suggestion = classic ? scope === 'database_only_eligible'? `Source '${sourceId}' has a checkout path but no canonical owner. Choose one: ${edit}; or allow database-only writes to unbound sources `diff --git a/test/agent-contract-a0.test.ts b/test/agent-contract-a0.test.tsindex 1b4f212dc3..ba6293baa6 100644--- a/test/agent-contract-a0.test.ts+++ b/test/agent-contract-a0.test.ts@@ -30,11 +30,13 @@ describe('A0 interfaces', () => {test('isCallable: verbs surface admits only verbs; http drops localOnly', () => {const recall = operations.find(o => o.name === 'recall')!;- const local = operations.find(o => o.localOnly)!;+ const local = operations.find(o => o.localOnly && !o.cliOnly)!;const base = { scopes: ['read', 'write'], publishGates: {} };expect(isCallable(recall, { ...base, transport: 'stdio', surface: 'verbs' })).toBe(true);expect(isCallable(local, { ...base, transport: 'http', surface: 'full' })).toBe(false);expect(isCallable(local, { ...base, transport: 'stdio', surface: 'full' })).toBe(local.publishGateKey === undefined);+ const cliOnly = operations.find(o => o.cliOnly)!;+ expect(isCallable(cliOnly, { ...base, transport: 'stdio', surface: 'full' })).toBe(false);});test('readiness entry points have their frozen shapes', () => {