fix(tests): resolve CI test isolation failures in OAuth refresh and ralph-loop

- provider.test.ts: reset discovery cache before/after refresh tests to prevent
  cross-test contamination via module-level discoveryCache singleton
- completion-promise-session-negative.test.ts: update negative test case to use
  non-oracle agent (hephaestus) since oracle tool_result VERIFIED detection was
  intentionally added in 56f2a9df
This commit is contained in:
YeonGyu-Kim
2026-04-06 17:48:38 +09:00
parent 61083d499d
commit 0c1202e480
2 changed files with 8 additions and 5 deletions
@@ -51,14 +51,14 @@ describe("detectCompletionInSessionMessages negative cases", () => {
})
describe("#given promise appears outside assistant text parts", () => {
test("#when VERIFIED appears only in tool_result part #then should NOT detect completion", async () => {
// #given
test("#when VERIFIED appears only in non-oracle tool_result part #then should NOT detect completion", async () => {
// #given -- oracle tool_result VERIFIED is detectable (56f2a9df); non-oracle is not
const messages = [
{
info: { role: "assistant" },
parts: [
{ type: "tool_result", text: 'Task completed.\n\nAgent: oracle\n\n<promise>VERIFIED</promise>' },
{ type: "text", text: "Oracle verified the task." },
{ type: "tool_result", text: 'Task completed.\n\nAgent: hephaestus\n\n<promise>VERIFIED</promise>' },
{ type: "text", text: "Hephaestus completed the task." },
],
},
]