ralph-loop: detect oracle VERIFIED tool results

This commit is contained in:
YeonGyu-Kim
2026-04-04 19:03:57 +09:00
parent f7d2ff75a7
commit 39f6ab2b44
3 changed files with 67 additions and 1 deletions
@@ -78,5 +78,22 @@ describe("detectCompletionInTranscript", () => {
// #then
expect(detected).toBe(false)
})
test("#when oracle tool output contains VERIFIED promise #then should detect verification completion", () => {
// #given
const transcriptPath = createTranscriptFile([
JSON.stringify({
type: "tool_result",
timestamp: "2026-03-28T10:01:00.000Z",
tool_output: "Task completed.\n\nAgent: oracle\n\n<promise>VERIFIED</promise>\n\n<task_metadata>\nsession_id: ses_oracle_123\n</task_metadata>",
}),
])
// #when
const detected = detectCompletionInTranscript(transcriptPath, "VERIFIED")
// #then
expect(detected).toBe(true)
})
})
})