Skip to content

test: /stop regression test missing suspend_session guard (post-#9224) #9241

@r266-tech

Description

@r266-tech

Problem

PR #9224 removed suspend_session() calls from the /stop command to prevent users from losing their conversation history. The updated tests in that PR only check message text ("stopped" instead of "force-stopped") — they never verify that suspend_session is NOT called.

If someone reverts the fix or re-adds suspend_session() to any of the three /stop code paths, all existing tests still pass because none of them assert on session store state.

Proposed fix

Add test_stop_does_not_suspend_session to tests/gateway/test_session_race_guard.py that covers all three /stop paths:

  1. Sentinel set (agent still starting)
  2. Real agent running
  3. No agent running (no-op)

Each path asserts session_store.suspend_session.assert_not_called().

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/gatewayGateway runner, session dispatch, deliverytype/testTest coverage or test infrastructure

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions