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:
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user