fix(ralph-loop): commit iteration only after verification continuation dispatches
Split the verification-failure restart into clearVerificationState (clears\nthe verification flags so we cleanly transition back to the main loop)\nfollowed by injectContinuationPrompt, with incrementIteration only on\nsuccessful injection. On rejection: clear the loop state and emit a loud\nwarning toast. Mirrors the dispatch-before-commit contract enforced for\nthe idle and session.error paths.
This commit is contained in:
@@ -82,6 +82,9 @@ async function detectOracleVerificationFromParentSession(
|
||||
|
||||
type LoopStateController = {
|
||||
restartAfterFailedVerification: (sessionID: string, messageCountAtStart?: number) => RalphLoopState | null
|
||||
clearVerificationState: (sessionID: string, messageCountAtStart?: number) => RalphLoopState | null
|
||||
incrementIteration: () => RalphLoopState | null
|
||||
clear: () => boolean
|
||||
setVerificationSessionID: (sessionID: string, verificationSessionID: string) => RalphLoopState | null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user