pankajastro commented on code in PR #74811:
URL: https://github.com/apache/airflow/pull/74811#discussion_r4291901119


##########
providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:
##########
@@ -1361,6 +1371,8 @@ def _resolve_message_history(self) -> list[ModelMessage] 
| None:
 
     def _emit_message_history(self, context: Context, result: Any) -> None:
         """Push the full post-run transcript to XCom for the next turn to 
resume."""
+        if not self.do_xcom_push:

Review Comment:
   Good catch, and agreed: the gate narrowed a stable feature. I removed it in 
39a4c59.
   `_emit_message_history` now pushes unconditionally again, so a seeded run 
behaves as in
   1.0.0rc1, including with `do_xcom_push=False`.
   
   ---
   Drafted-by: Claude Code (Sonnet 5.5); reviewed by @pankajastro before posting



##########
providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:
##########
@@ -502,6 +507,7 @@ def __init__(
         durable: bool = False,
         cache_prompt: bool = True,
         message_history: list[ModelMessage] | str | bytes | None = None,
+        emit_message_history: bool = False,

Review Comment:
   Agreed, done in 39a4c59: `emit_message_history` is now `bool | None = None`, 
resolved in
   `__init__` to `message_history is not None` when unset. `True` opts a 
single-turn run in,
   `False` opts a seeded run out, and the transcript no longer depends on 
`do_xcom_push`.
   `test_transcript_emitted_to_xcom` covers the seeded, opt-in and opt-out 
cases, and only
   `message_history` seeds the run.
   
   ---
   Drafted-by: Claude Code (Sonnet 5.5); reviewed by @pankajastro before posting



##########
providers/common/ai/docs/message_history.rst:
##########
@@ -49,7 +55,8 @@ fresh session instead of trying to parse the string 
``"None"``.
 
 .. note::
 
-    ``message_history`` cannot be combined with ``enable_hitl_review`` -- the
+    ``message_history`` and ``emit_message_history`` cannot be combined with

Review Comment:
   Added both, in 39a4c59. `stability.rst` has a row for 
`emit_message_history`, marked stable
   like `message_history` (it is additive and the default keeps today's 
behaviour). The
   `troubleshooting.rst` entry now lists the `emit_message_history and 
enable_hitl_review=True`
   error alongside the `message_history` one.
   
   ---
   Drafted-by: Claude Code (Sonnet 5.5); reviewed by @pankajastro before posting



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