From a97c09f6dc8859c93f9c31b1575ab5914bdabf1b Mon Sep 17 00:00:00 2001 From: PJ Date: Wed, 12 Aug 2026 22:56:58 +0530 Subject: [PATCH] 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 --- internal/verifier/llm.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/verifier/llm.go b/internal/verifier/llm.go index e404fee..c27cdf6 100644 --- a/internal/verifier/llm.go +++ b/internal/verifier/llm.go @@ -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.