SessionVerifier Architecture

Execution success is not semantic task completion. SessionVerifier evaluates final RGB, task, environment, and history evidence in the Agent control plane.

中文

1 · Evidence Production

Target final observation → SessionRunner.last_status → ResultWriter → episode.json + verification_bundle.json + rgb/final_*.png → awaiting_verification

Track B records facts. It does not make the semantic verdict.

2 · Entry Paths

Automatic apply

The background worker claims the first awaiting Session and applies a verdict.

verify_session tool

The Agent applies a waiting Session or reviews a terminal Session while retained evidence is available.

3 · State Machine

pending → claimed → running → finalizing → awaiting_verification → verifying → succeeded | failed | replanned

A replan keeps the original terminal Session and appends a new pending child. A review never changes terminal state or creates a child.

4 · RGB Retention

all

Keep RGB for every valid verdict.

failed (default)

Delete successful RGB; retain failure and replan evidence.

none

Delete RGB after every valid verdict.

Verification errors retain evidence. Retention errors do not reverse a committed Session verdict.

5 · Audit Record

result.metadata.verification.attempts records attempt ID, timestamp, source, apply/review mode, verdict, evidence, lesson, details, and error. Retention metadata records policy, status, deleted paths, and errors.

6 · Configuration

agents.verification.enabled · model · maxReplans · rgbRetention

The service and tool are registered only when both Runtime and verification are enabled.