Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix: pre-landing review fixes (the release preview names the entity page the fact is written to)
garrytan4b8830a1eb9c
diff --git a/src/core/trust/owner-actions.ts b/src/core/trust/owner-actions.tsindex 59e033bf7b..5c7453a41b 100644--- a/src/core/trust/owner-actions.ts+++ b/src/core/trust/owner-actions.ts@@ -326,11 +326,12 @@ async function previewHold(engine: BrainEngine, id: number, action: 'release' |const hold = await holdStore.get(engine, id);if (!hold) throw notFound(label, 'held write');const text = hold.payload.fact ?? hold.payload.claim ?? '';+ const entity = hold.kind === 'fact' && typeof hold.payload.entity_slug === 'string' && hold.payload.entity_slug ? ` for ${hold.source_id}/${hold.payload.entity_slug}` : '';return { action, ref: label, token: label, command: trustCommand(action, label), raises: action === 'release',binding: holdBinding(hold), tier: hold.tier,...(action === 'release' ? { target_tier: 'user_confirmed' as TrustTier } : {}),summary: action === 'release'- ? `Release held ${hold.kind} ${label} ("${snippet(text)}", ${hold.reason_families.join(', ') || 'detector error'}) into memory as "confirmed by you"`+ ? `Release held ${hold.kind} ${label} ("${snippet(text)}", ${hold.reason_families.join(', ') || 'detector error'})${entity} into memory as "confirmed by you"`: `Drop held ${hold.kind} ${label} ("${snippet(text)}"); it stays out of memory` };}diff --git a/test/trust-release-fence.test.ts b/test/trust-release-fence.test.tsindex 4ed7b8f164..1340d88ab4 100644--- a/test/trust-release-fence.test.ts+++ b/test/trust-release-fence.test.ts@@ -357,6 +357,12 @@ for (const backend of testBackends()) {expect(receipt).toMatchObject({ state: 'conflict', error_code: 'page_identity_changed' });}, { setup, databaseUrl }), 180_000);+ test('the release preview names the page whose facts the release writes', () => managedBrain(async ({ engine, ctx }) => {+ await seedPage(engine, ctx);+ const ref = await holdRemember(engine, ctx);+ expect((await previewOwnerAction(engine, { action: 'release', ref })).summary).toContain(`default/${slug}`);+ }, { setup, databaseUrl }), 180_000);+test('an append release keeps the held payload: kind, world visibility and valid_until reach the fence row and the facts row', () => managedBrain(async ({ engine, ctx, root }) => {await seedPage(engine, ctx);const ref = await holdRemember(engine, ctx);