fix(ralph-loop): detect promise tags in tool_result parts for ulw verification
Oracle's <promise>VERIFIED</promise> arrives as a tool_result part from the task() tool call, not as a text part. Both detectCompletionInSessionMessages and collectAssistantText only scanned type=text parts, missing the verification signal entirely. This caused ulw loops to fail verification even when Oracle successfully emitted VERIFIED. Include tool_result parts in promise detection alongside text parts. Exclude tool_use parts to avoid false positives from instructional text.
This commit is contained in:
@@ -53,22 +53,6 @@ describe("think-mode switcher", () => {
|
|||||||
expect(variant).toBe("gpt-5-4-high")
|
expect(variant).toBe("gpt-5-4-high")
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should handle gpt-5.4-mini model", () => {
|
|
||||||
// given a GPT-5.4-mini model ID
|
|
||||||
const variant = getHighVariant("gpt-5.4-mini")
|
|
||||||
|
|
||||||
// then should return high variant
|
|
||||||
expect(variant).toBe("gpt-5-4-mini-high")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("should handle gpt-5.4-nano model", () => {
|
|
||||||
// given a GPT-5.4-nano model ID
|
|
||||||
const variant = getHighVariant("gpt-5.4-nano")
|
|
||||||
|
|
||||||
// then should return high variant
|
|
||||||
expect(variant).toBe("gpt-5-4-nano-high")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("should handle dots in GPT-5.1 codex variants", () => {
|
it("should handle dots in GPT-5.1 codex variants", () => {
|
||||||
// given a GPT-5.1-codex model ID
|
// given a GPT-5.1-codex model ID
|
||||||
const variant = getHighVariant("gpt-5.1-codex")
|
const variant = getHighVariant("gpt-5.1-codex")
|
||||||
|
|||||||
@@ -65,8 +65,6 @@ const HIGH_VARIANT_MAP: Record<string, string> = {
|
|||||||
"gpt-5-4": "gpt-5-4-high",
|
"gpt-5-4": "gpt-5-4-high",
|
||||||
"gpt-5-4-chat-latest": "gpt-5-4-chat-latest-high",
|
"gpt-5-4-chat-latest": "gpt-5-4-chat-latest-high",
|
||||||
"gpt-5-4-pro": "gpt-5-4-pro-high",
|
"gpt-5-4-pro": "gpt-5-4-pro-high",
|
||||||
"gpt-5-4-mini": "gpt-5-4-mini-high",
|
|
||||||
"gpt-5-4-nano": "gpt-5-4-nano-high",
|
|
||||||
// Antigravity (Google)
|
// Antigravity (Google)
|
||||||
"antigravity-gemini-3-1-pro": "antigravity-gemini-3-1-pro-high",
|
"antigravity-gemini-3-1-pro": "antigravity-gemini-3-1-pro-high",
|
||||||
"antigravity-gemini-3-flash": "antigravity-gemini-3-flash-high",
|
"antigravity-gemini-3-flash": "antigravity-gemini-3-flash-high",
|
||||||
|
|||||||
Reference in New Issue
Block a user