Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: connection-audit pins the audit dir to the current GBRAIN_HOME; tools-json golden after the master merge
garrytan0584b8017991
diff --git a/test/audit/connection-audit.test.ts b/test/audit/connection-audit.test.tsindex 4a77c48e9d..da1ef079be 100644--- a/test/audit/connection-audit.test.ts+++ b/test/audit/connection-audit.test.ts@@ -246,6 +246,21 @@ describe('connection-audit — setAuditEnabled', () => {});});+describe('connection-audit — audit dir follows GBRAIN_HOME', () => {+ test('a write after one under another home lands in the current home', async () => {+ const other = mkdtempSync(join(tmpdir(), 'gbrain-connaudit-other-'));+ await withEnv({ GBRAIN_HOME: other }, async () => {+ logConnectionEvent({ pool: 'ddl', op: 'acquire', caller: 'home.other' });+ });+ const now = new Date();+ await withEnv(env, async () => {+ logConnectionEvent({ pool: 'ddl', op: 'acquire', caller: 'home.current' });+ });+ expect(readLines(fileFor(now)).some(e => e.caller === 'home.current')).toBe(true);+ expect(readLines(join(other, '.gbrain', 'audit', computeIsoWeekFilename('connection-events', now))).map(e => e.caller)).toEqual(['home.other']);+ });+});+describe('connection-audit — tailRecentErrors', () => {test('[] when this week has no file (dir exists by now)', async () => {await withEnv(env, () => {diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.jsonindex e60ce55bb7..6927516587 100644--- a/test/fixtures/goldens/cli/tools-json.json+++ b/test/fixtures/goldens/cli/tools-json.json@@ -2,8 +2,8 @@"golden": {"exitCode": 0,"stderr": "",- "stdoutBytes": 199133,- "stdoutSha256": "b42f35c3d886837625a537154830f9938b921618548b83498e4d8df0285c868c",+ "stdoutBytes": 198603,+ "stdoutSha256": "7b5e35aa62ab4e12fbfa100da46f8e032101875370cb5a59a2348649c234689f","toolNames": ["remember","entity",@@ -4265,7 +4265,7 @@"scope": "read"},{- "description": "More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} persists a wider surface for your OAuth client.",+ "description": "More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} widens it (per OAuth client; stdio: this session).","idempotent": false,"local_only": false,"mutating": true,@@ -4278,7 +4278,7 @@"schema": {"properties": {"surface": {- "description": "Surface to persist for your client.",+ "description": "Surface to widen to (stdio: this session only).","enum": ["verbs","starter",@@ -6321,7 +6321,7 @@"scope": "write"},{- "description": "Stop a coaching or info notice from appearing for this client (or unmute it with muted: false). Safety, degraded and ask notices cannot be muted.",+ "description": "Stop a coaching or info notice (or first_run_decisions) from appearing for this client; muted: false unmutes.","idempotent": true,"local_only": false,"mutating": true,@@ -6335,22 +6335,6 @@"properties": {"code": {"description": "Notice code, the word after `[gbrain notice` in the block.",- "enum": [- "backup_coverage",- "degraded_dedup",- "empty_retrieval",- "facts_drain_first_run",- "features_auto_fix",- "former_relationships_hidden",- "listing_truncated",- "local_transcripts",- "onboard_opportunities",- "recovered_frontmatter",- "source_binding_narrowed",- "synthesis_keyless",- "think_not_saved",- "unknown_param"- ],"type": "string"},"muted": {