Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test(doctor): type-correct casts in the status-set and remote-parity tests
garrytan8e9fa2dde149
diff --git a/test/doctor-remote-parity.test.ts b/test/doctor-remote-parity.test.tsindex 282372ae4d..e0b4d0f210 100644--- a/test/doctor-remote-parity.test.ts+++ b/test/doctor-remote-parity.test.ts@@ -53,7 +53,7 @@ describe('run_doctor and CLI doctor agree', () => {const report = computeDoctorReport([{ name: 'embeddings', status: 'warn', message: 'x',fix: { argv: ['gbrain', 'init', '--force', '--path', `${home}/.gbrain/brain.pglite`], consent: [], actor: 'agent', why: `brain at ${home}/.gbrain`, requires_exclusive: true } }],{ render: { transport: 'http', isCallable: () => false, preapproved: () => false } });- const fix = report.checks[0].fix as Record<string, unknown>;+ const fix = report.checks[0].fix as unknown as Record<string, unknown>;expect(fix).toMatchObject({ actor: 'host_admin', next: 'tell_user_to_run' });expect(JSON.stringify(fix)).not.toContain(home);});diff --git a/test/doctor-status-set.test.ts b/test/doctor-status-set.test.tsindex eaf72a1ae6..739114f0ac 100644--- a/test/doctor-status-set.test.ts+++ b/test/doctor-status-set.test.ts@@ -48,7 +48,7 @@ describe('doctor report status set (E2)', () => {test('fixes render for the transport: next, shell-quoted command, absolute docs; top_issues gain action', () => {const report = computeDoctorReport([{ name: 'sync_failures', status: 'warn', message: 'x', fix }]);- const rendered = report.checks[0].fix as Record<string, unknown>;+ const rendered = report.checks[0].fix as unknown as Record<string, unknown>;expect(rendered).toMatchObject({ next: 'run', command: 'gbrain doctor --json', actor: 'agent' });expect(String(rendered.docs)).toMatch(/^https:\/\//);expect(report.top_issues?.[0]).toMatchObject({ name: 'sync_failures', fix: 'x', action: { next: 'run', command: 'gbrain doctor --json' } });@@ -62,7 +62,7 @@ describe('doctor report status set (E2)', () => {});test('every non-ok check ends with a fix or a fix_unavailable_reason', () => {- const out = finalizeCheckFixes([+ const out = finalizeCheckFixes<Check>([{ name: 'a', status: 'warn', message: 'legacy prose' },{ name: 'b', status: 'fail', message: 'x', fix_unavailable_reason: 'operator_judgement' },{ name: 'c', status: 'ok', message: 'fine' },