test(step_persistence): drop dead validator branch to restore 100% coverage

The `gate` output-validator in `test_does_not_regress_to_stale_stash_after_model_request_save`
had a `return value` branch that never executed: the run fails on request 3
before any output passes validation a second time. Simplify it to always raise
`ModelRetry` (one retry is all the stash scenario needs), matching the sibling
`test_rescues_newest_text_history_over_earlier_saved_snapshot`.
This commit is contained in:
David SF
2026-07-17 12:54:22 -05:00
parent 59f4059877
commit 5cabc2880a
@@ -1149,14 +1149,10 @@ class TestOnRunErrorSnapshot:
capabilities=[StepPersistence(store=store, agent_name='delegate')],
output_type=str,
)
retried = {'done': False}
@agent.output_validator
def gate(value: str) -> str: # pyright: ignore[reportUnusedFunction]
if not retried['done']:
retried['done'] = True
raise ModelRetry('call a tool first')
return value
raise ModelRetry('call a tool first')
@agent.tool_plain
def lookup() -> str: # pyright: ignore[reportUnusedFunction]