Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: an older CLI's retired wire field notice reaches it as the first managed job line (#6712 PR 2, L3)

garrytan8d853d98f986
diff --git a/test/serve-sync-handoff.serial.test.ts b/test/serve-sync-handoff.serial.test.ts
index c0ed9e7e69..4261310dcc 100644
--- a/test/serve-sync-handoff.serial.test.ts
+++ b/test/serve-sync-handoff.serial.test.ts
@@ -227,6 +227,19 @@ describe('sync_start authorization hand-off (serve half)', () => {
'SELECT principal_id, count(*)::int AS n FROM persistence_requests WHERE source_id=$1 GROUP BY principal_id', [f.id]);
expect(rows.map(r => r.principal_id)).toEqual([local.id]);
}), 180_000);
+
+ test('#6712: an older CLI\'s retired field is dropped and its notice reaches that CLI as the first job line', async () => withEnv({ GBRAIN_HOME: home }, async () => {
+ const f = await fixture(1);
+ const local = await registerLocalWriter(engine, 'cli');
+ const start = await startDelegatedSync(engine, { sourceId: f.id, noPull: true, noEmbed: true, explicitProcessing: ['noEmbed'], timeoutSeconds: 120 }, randomUUID(),
+ { registration: { id: local.id, credential: local.credential, lane: 'cli' } });
+ expect(start.ok).toBe(true);
+ const done = await waitTerminal(start.jobId!);
+ expect(done.state).toBe('done');
+ const first = done.lines?.[0]?.text ?? '';
+ expect(first).toStartWith('[gbrain notice]');
+ expect(first).toContain('`explicitProcessing`');
+ }), 180_000);
});
describe('maybeDelegateManagedSyncToServe (the Postgres ladder, client half)', () => {