mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
test: update lock-io auto-reset assertion to the promote write-path
test_auto_reset_does_not_recover_session_being_ended asserted the old
end_session('session_reset') call; auto-reset now writes through
promote_to_session_reset with the specific auditable reason
('suspended' for a suspended entry). Missed in the local targeted run
because the file wasn't in the touched-suite list; caught by CI shard 6.
This commit is contained in:
parent
9fc0074bac
commit
f28248c662
1 changed files with 7 additions and 1 deletions
|
|
@ -272,7 +272,13 @@ def test_auto_reset_does_not_recover_session_being_ended(tmp_path):
|
|||
assert entry.session_id != old.session_id
|
||||
assert entry.was_auto_reset is True
|
||||
db.reopen_session.assert_not_called()
|
||||
db.end_session.assert_called_once_with(old.session_id, "session_reset")
|
||||
# Auto-reset now writes through promote_to_session_reset (upgrades
|
||||
# accidental agent_close/ws_orphan_reap ends) with the specific
|
||||
# auditable reason — a suspended session resets as "suspended".
|
||||
db.promote_to_session_reset.assert_called_once_with(
|
||||
old.session_id, "suspended"
|
||||
)
|
||||
db.end_session.assert_not_called()
|
||||
|
||||
|
||||
def test_legacy_and_off_lock_saves_share_one_serialization_lock(tmp_path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue