fix(ulw-loop): add fallback for Oracle verification session tracking
The verification_session_id was never reliably set because the prompt-based attempt_id matching in tool-execute-after depends on metadata.prompt surviving the delegate-task execution chain. When this fails silently, the loop never detects Oracle's VERIFIED emission. Add a fallback: when exact attempt_id matching fails but oracle agent + verification_pending state match, still set the session ID. Add diagnostic logging to trace verification flow failures. Add integration test covering the full verification chain.
This commit is contained in:
@@ -79,6 +79,12 @@ export function createToolExecuteBeforeHandler(args: {
|
||||
|
||||
if (shouldInjectOracleVerification) {
|
||||
const verificationAttemptId = randomUUID()
|
||||
log("[tool-execute-before] Injecting ULW oracle verification attempt", {
|
||||
sessionID: input.sessionID,
|
||||
callID: input.callID,
|
||||
verificationAttemptId,
|
||||
loopSessionID: loopState.session_id,
|
||||
})
|
||||
writeState(ctx.directory, {
|
||||
...loopState,
|
||||
verification_attempt_id: verificationAttemptId,
|
||||
|
||||
Reference in New Issue
Block a user