ensureRecoverySnapshot method
Returns the snapshotId a failed invocation should report as its resume point.
A failed turn already committed its own failed snapshot via
maybeSnapshot, and that row's state is the last-good history the failing
turn preserved, so it is a rerunnable resume point on any turn (not just
the first). Report it directly rather than writing a fresh completed row
from the prior turn's state, which would drop the failed turn's own user
message. Mirrors Go's failedOutput, which returns lastSnapshotID.
Implementation
Future<String?> ensureRecoverySnapshot() async {
return _lastSnapshot?.snapshotId;
}