Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: sync json failure fixtures use a missing source now that managed sync implies --no-pull; tag the serve wiring source read
garrytan61884c91b166
diff --git a/test/cli-contract.test.ts b/test/cli-contract.test.tsindex a451cc9ad7..7501e05fca 100644--- a/test/cli-contract.test.ts+++ b/test/cli-contract.test.ts@@ -105,7 +105,7 @@ const JSON_ROWS: Record<string, JsonRow> = {errors: { ok: ['errors', 'unknown_flag', '--json'], fail: ['errors', 'definitely_not_a_code', '--json'], okOnEmpty: true },init: { ok: ['init', '--pglite', '--no-embedding', '--json'], fail: ['init', '--mcp-only', '--json', '--mcp-url', 'http://127.0.0.1:1/mcp'], okOnEmpty: true },doctor: { ok: ['doctor', '--json', '--fast'], fail: ['doctor', '--json'] },- sync: { ok: ['sync', '--source', 'notes', '--no-pull', '--json'], fail: ['sync', '--source', 'notes', '--json'], failOnBrain: true },+ sync: { ok: ['sync', '--source', 'notes', '--no-pull', '--json'], fail: ['sync', '--source', 'no-such-source', '--no-pull', '--json'], failOnBrain: true },embed: { ok: ['embed', '--stale', '--json'], fail: ['embed', '--all', '--json'], failOnBrain: true },'db-repair': { ok: ['db-repair', '--json'], fail: ['db-repair', '--json'], failOnBrain: true, okE2E: 'test/e2e/cli-json-commands-postgres.test.ts' },dream: { ok: ['dream', '--json', '--phase', 'lint'], fail: ['dream', '--json', '--phase', 'garbage'] },diff --git a/test/cli-json-guard.test.ts b/test/cli-json-guard.test.tsindex 4864e0f7c6..0cfcd1f481 100644--- a/test/cli-json-guard.test.ts+++ b/test/cli-json-guard.test.ts@@ -185,7 +185,7 @@ describe('D2 command migrations: doctor, sync, embed on a keyless brain', () =>const ok = await cli(['sync', '--source', 'notes', '--no-pull', '--json']);expect(ok.exitCode).toBe(0);expect(onlyDocument(ok.stdout)).toMatchObject({ schema_version: 1, source_id: 'notes', added: 1 });- const bad = await cli(['sync', '--source', 'notes', '--json']);+ const bad = await cli(['sync', '--source', 'no-such-source', '--no-pull', '--json']);expect(bad.exitCode).toBe(1);const doc = onlyDocument(bad.stdout);expect(typeof doc.code).toBe('string');diff --git a/test/serve-behavior-notice-6543.test.ts b/test/serve-behavior-notice-6543.test.tsindex 11d9a71322..aa5542f353 100644--- a/test/serve-behavior-notice-6543.test.ts+++ b/test/serve-behavior-notice-6543.test.ts@@ -65,6 +65,7 @@ test('serve logging leaves the CLI notice, the stdio marker and the baseline unt}), 30_000);test('runServe logs the notice at startup', () => {+ // test-reads-source-ok[structural]: runServe needs a live engine, transports and signal handlers; this pins only that startup calls the notice logger tested aboveconst source = readFileSync(join(import.meta.dir, '../src/commands/serve.ts'), 'utf8');expect(source).toMatch(/logServeBehaviorNotice\(engine, /);});