Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: A1's access repair kind in the remediation registry check; the dispatch-throw probe follows dispatchResolvedCall
garrytan71034ffeacec
diff --git a/test/fix-wave-3-integration.test.ts b/test/fix-wave-3-integration.test.tsindex c2a9b8b4e0..42a0639f43 100644--- a/test/fix-wave-3-integration.test.ts+++ b/test/fix-wave-3-integration.test.ts@@ -432,7 +432,7 @@ test('check 9: every registered repair kind reaches the remediation plan with itawait engine.executeRaw("UPDATE pages SET contextual_retrieval_mode=NULL,chunker_version=1,text_projection_revision=gen_random_uuid() WHERE source_id=$1 AND slug='people/second-example'", [f.id]);await engine.executeRaw("INSERT INTO op_checkpoints(op,fingerprint,completed_keys,updated_at) VALUES('managed-connector',$1,'[]'::jsonb,now()-interval '9 days')", [`orphan-${randomUUID()}`]);const kinds = AUTO_REPAIR_REGISTRY.map(spec => spec.kind);- expect(kinds).toEqual(['timeline', 'visibility', 'safe-chunks', 'contextual-mode', 'connector-checkpoints', 'request-indexes', 'connector-fences', 'take-supersession', 'orphan-bindings', 'embedding-effects', 'attribution-backfill', 'planner-stats', 'fences', 'slug-conflicts']);+ expect(kinds).toEqual(['timeline', 'visibility', 'safe-chunks', 'contextual-mode', 'connector-checkpoints', 'request-indexes', 'connector-fences', 'take-supersession', 'orphan-bindings', 'embedding-effects', 'attribution-backfill', 'planner-stats', 'fences', 'slug-conflicts', 'access']);const planned = Object.fromEntries((await planRepairSteps(engine, { noEmbed: true })).map(step => [step.kind, step]));expect(planned['contextual-mode']).toMatchObject({ paid: false, embeds: 'inline', command: 'gbrain repair contextual-mode --no-embed --apply' });expect(planned['connector-checkpoints']).toMatchObject({ paid: false, embeds: 'none' });diff --git a/test/mcp-error-single-block.test.ts b/test/mcp-error-single-block.test.tsindex c196d5392a..269743faf3 100644--- a/test/mcp-error-single-block.test.ts+++ b/test/mcp-error-single-block.test.ts@@ -192,12 +192,12 @@ describe('gbrain serve --http (serve-http-mcp)', () => {}));test('dispatch itself throwing lands in the serve-http catch as one internal_error block', inHome(async () => {- // dispatchToolCall reads op.cliOnly before its own try; a fault there is the only way into serve-http's catch.+ // dispatch reads op.cliOnly before its own try (in dispatchResolvedCall, after the caller-access await); a fault there is the only way into serve-http's catch.const op = opNamed('get_brain_identity');const own = Object.getOwnPropertyDescriptor(op, 'cliOnly');Object.defineProperty(op, 'cliOnly', {configurable: true,- get() { if (new Error().stack?.includes('dispatchToolCall')) throw new Error('op definition unreadable'); return own?.value; },+ get() { const stack = new Error().stack ?? ''; if (stack.includes('dispatchToolCall') || stack.includes('dispatchResolvedCall')) throw new Error('op definition unreadable'); return own?.value; },});let r: ToolResultWire;try {