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:
@@ -25,7 +25,7 @@ function collectAssistantText(message: OpenCodeSessionMessage): string {
|
||||
|
||||
let text = ""
|
||||
for (const part of message.parts) {
|
||||
if (part.type !== "text") {
|
||||
if (part.type !== "text" && part.type !== "tool_result") {
|
||||
continue
|
||||
}
|
||||
text += `${text ? "\n" : ""}${part.text ?? ""}`
|
||||
|
||||
Reference in New Issue
Block a user