feat(verifier): expose the step a snapshot was observed at

It lags the runner's current step whenever a transitional tree caused an
observation to be skipped, which is exactly when the model is shown an older
screen than the step it is choosing for.

Claude-Session: https://claude.ai/code/session_01A5KmftdEJ49A9z5mF5ESrX
This commit is contained in:
pj committed 2026-08-12 22:56:58 +05:30
1 parent ec5872ac6e
commit a97c09f6dc
1 file changed
+7
+7
View File
@@ -65,6 +65,13 @@ func (v *Verifier) Screenshot() []byte {
return v.lastScreenshot
}
// SnapshotStep returns the step index of the most recent PushSnapshot. It lags
// the runner's current step whenever an observation was skipped (a transitional
// tree), which is exactly when Screenshot returns an older step's image.
func (v *Verifier) SnapshotStep() int {
return v.stepIndex
}
// CurrentScreen returns the screen id of the most recent snapshot's first
// element, matching the runner's own screen labeling. Empty when no tree is
// loaded.