phanikumv commented on code in PR #76917:
URL: https://github.com/apache/airflow/pull/76917#discussion_r4708590606


##########
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:
   >Should I handle that as well?
   
   not needed in this PR. It only matters for a custom capability that builds 
its model switch inside for_run, which is rare. A fix only helps when nothing 
but tool discovery has run, so a follow-up is fine



-- 
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]

Reply via email to