Merge pull request #25957 from stephenschoettler/fix/main-ci-unblocker-after-21012

fix(ci): stabilize shared test state after 21012
This commit is contained in:
ethernet 2026-05-14 21:26:52 -04:00 committed by GitHub
commit 1702a94c88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 38 additions and 9 deletions

View file

@ -4268,6 +4268,7 @@ class AIAgent:
except Exception:
pass
review_agent = None
review_messages = []
try:
with open(os.devnull, "w", encoding="utf-8") as _devnull, \
contextlib.redirect_stdout(_devnull), \
@ -4385,6 +4386,7 @@ class AIAgent:
review_agent.close()
except Exception:
pass
review_messages = list(getattr(review_agent, "_session_messages", []))
review_agent = None
# Scan the review agent's messages for successful tool actions
@ -4394,7 +4396,7 @@ class AIAgent:
# re-surface stale "created"/"updated" messages from the prior
# conversation as if they just happened (issue #14944).
actions = self._summarize_background_review_actions(
getattr(review_agent, "_session_messages", []),
review_messages,
messages_snapshot,
)