Files
hermes-agent/tests/agent/test_turn_scripted_prelude.py
alt-glitch 7e0d89c4fc fix(onboarding): a scripted prelude's tool call id is unique per chat
The id was seeded by the call and its place in history only, so every onboarding run's name
card carried the same id (call_334bff8f9974 in both runs of a live rerun). The desktop keys tool
rows by that id; the rerun's chat drew the name card twice. The session id now seeds it too; it
stays byte-stable on replay.
2026-10-13 23:55:49 +05:30

12 lines
558 B
Python

"""A scripted prelude's tool call id is unique per chat: a rerun of onboarding plays the same name card at the
same place in a new chat, and the desktop keys tool rows by that id."""
from agent.turn_scripted_prelude import prelude_call_id
def test_the_same_card_at_the_same_place_gets_a_different_id_in_another_chat():
first = prelude_call_id("chat-1", "setup_beat", {"beat": "name"}, 1)
assert first == prelude_call_id("chat-1", "setup_beat", {"beat": "name"}, 1)
assert first != prelude_call_id("chat-2", "setup_beat", {"beat": "name"}, 1)