test(call-omo-agent): add sync-executor test coverage

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-27 21:15:41 +09:00
parent bda7fdbbda
commit e1b2fa9a14
@@ -395,6 +395,26 @@ describe("executeSync", () => {
expect(spawnReservation.commit).toHaveBeenCalledTimes(1)
expect(spawnReservation.rollback).toHaveBeenCalledTimes(0)
})
test("strips legacy ZWSP-prefixed agent names from persisted sync prompt body (GH-3259)", async () => {
//#given - persisted sync invocation from v3.14.0-v3.16.0 with ZWSP prefix on subagent_type
const executeSync = await importExecuteSync()
const deps = createDependencies()
const toolContext = createToolContext()
const recorder = createPromptAsyncRecorder()
const args = {
subagent_type: "\u200B\u200BHephaestus - Deep Agent",
description: "legacy zwsp",
prompt: "find something",
run_in_background: false,
}
//#when
await executeSync(args, toolContext, createContext(recorder.promptAsync) as never, deps)
//#then
expect(recorder.getCapturedInput()?.body.agent).toBe("Hephaestus - Deep Agent")
})
})
export {}