fix(ralph-loop): continue ultrawork until oracle verifies
Keep /ulw-loop iterating after the main session emits DONE so completion still depends on an actual Oracle VERIFIED result. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -8,8 +8,8 @@ import {
|
||||
detectCompletionInTranscript,
|
||||
} from "./completion-promise-detector"
|
||||
import { continueIteration } from "./iteration-continuation"
|
||||
import { handlePendingVerification } from "./pending-verification-handler"
|
||||
import { handleDeletedLoopSession, handleErroredLoopSession } from "./session-event-handler"
|
||||
import { handleFailedVerification } from "./verification-failure-handler"
|
||||
|
||||
type SessionRecovery = {
|
||||
isRecovering: (sessionID: string) => boolean
|
||||
@@ -136,22 +136,15 @@ export function createRalphLoopEventHandler(
|
||||
}
|
||||
|
||||
if (state.verification_pending) {
|
||||
if (verificationSessionID && matchesVerificationSession) {
|
||||
const restarted = await handleFailedVerification(ctx, {
|
||||
state,
|
||||
loopState: options.loopState,
|
||||
directory: options.directory,
|
||||
apiTimeoutMs: options.apiTimeoutMs,
|
||||
})
|
||||
if (restarted) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
log(`[${HOOK_NAME}] Waiting for oracle verification`, {
|
||||
await handlePendingVerification(ctx, {
|
||||
sessionID,
|
||||
state,
|
||||
verificationSessionID,
|
||||
iteration: state.iteration,
|
||||
matchesParentSession,
|
||||
matchesVerificationSession,
|
||||
loopState: options.loopState,
|
||||
directory: options.directory,
|
||||
apiTimeoutMs: options.apiTimeoutMs,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user