phanikumv commented on code in PR #76917:
URL: https://github.com/apache/airflow/pull/76917#discussion_r4694036089
##########
providers/common/ai/src/airflow/providers/common/ai/durable/journal.py:
##########
@@ -332,6 +335,16 @@ def position(self) -> int:
"""The position the next claimed step will take."""
return self._position
+ def ran_steps(self) -> bool:
+ """
+ Whether this attempt ran a step of this run that running it live again
would repeat.
+
+ Any step it recorded counts, and any other step it started, even one
that raised or is never
+ recorded: a tool or a capability's hook may act before raising. A
model request that raised
+ does not, so a run ``ModelFallback`` moved off a failed request can go
again.
+ """
+ return bool(self._written_positions or self._live_kinds - {"model"})
Review Comment:
The PR turns durable execution on by default for agent tasks that can retry.
When `pydantic-ai` refuses a durable run, the operator is meant to rerun the
agent without it. It skips that rerun if some step already ran, and MCP tool
discovery counts as one. So an agent with an MCP toolset plus `SelectModel` or
`ModelFallback` now fails every attempt. With durable=False the same agent
succeeds
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]