Skip to content

The agent that grows with you

fix(gateway): neutral copy for a settled automation turn

Teknium1e5fbdcd1bf4
diff --git a/agent/turn_failure_copy.py b/agent/turn_failure_copy.py
index 6239ef93e0f..2f3b32924d6 100644
--- a/agent/turn_failure_copy.py
+++ b/agent/turn_failure_copy.py
@@ -43,10 +43,11 @@ PARTIAL_FAILED_TURN_NOTICE = (
"This turn did not complete. Some actions may already have run; verify their effects "
"before resending."
)
-# A turn no person sent (a cron run, a process completion) lost across a gateway restart: it
-# settles interrupted and is never re-run, so nobody is asked to resend it (#134889 GW-10).
+# A turn no person sent (a cron run, a process completion, a webhook delivery) lost across a gateway
+# restart, or fenced inside the running owner (a lost managed worker): it settles interrupted and is
+# never re-run, so nobody is asked to resend it (#134889 GW-10). Neutral: not every path restarted.
AUTOMATION_INTERRUPTED_NOTICE = (
- "An automated delivery was interrupted when Hermes restarted and was not run again. Some "
+ "An automated delivery was interrupted and was not run again. Some "
"actions may already have run; verify their effects."
)
# ``messages.display_kind`` of that row: display-only (stripped before every provider request),
diff --git a/tests/gateway/test_unknown_automation_settles.py b/tests/gateway/test_unknown_automation_settles.py
index bebcf4bcc91..b800978b85c 100644
--- a/tests/gateway/test_unknown_automation_settles.py
+++ b/tests/gateway/test_unknown_automation_settles.py
@@ -167,6 +167,9 @@ async def test_automation_fenced_unknown_in_this_owner_settles_on_the_drain(tmp_
statuses = _statuses(db)
assert statuses[head_id] == ('terminal', 'interrupted')
assert statuses[follower.admission_id] == ('terminal', 'completed')
+ # Nothing restarted on this path: the notice must not claim a restart (review #141357).
+ notices = [m['content'] for m in db.get_messages('s') if m.get('display_kind') == 'failed_turn']
+ assert notices and all('restart' not in n.lower() for n in notices), notices
finally:
store.close_all_db_handles()