test(tui_gateway): pin the tools.configure busy refusal during a compaction
6822acc49c made tools.configure refuse with 4009 while the session is running, because its agent reset bumps history_version and a live turn would drop its reply. No test reached that guard: reverting the hunk left the suite green. The existing manual-compaction test now calls tools.configure while the compaction holds the busy claim and expects 4009 (4017 without the guard). Gate finding: C04 r2 2ab [Low TOOTHLESS]. Refs #133504
This commit is contained in:
@@ -220,6 +220,8 @@ def test_submit_during_manual_compress_is_queued_and_reply_persists(monkeypatch)
|
||||
assert session["running"] is True
|
||||
second = server._methods["session.compress"]("r3", {"session_id": "sid"}) # the locked claim maps to busy
|
||||
assert second["error"]["code"] == 4009
|
||||
# tools.configure rebuilds the agent (history_version bump): refused before it reads the action
|
||||
assert server._methods["tools.configure"]("r4", {"session_id": "sid"})["error"]["code"] == 4009
|
||||
# "/compress --aggressive" never touches history: answered without claiming (or draining) the busy session
|
||||
assert server._compress_live_with_feedback("sid", session, agent, "--aggressive", snapshot_kwargs=True) == \
|
||||
ccm.AGGRESSIVE_UNSUPPORTED
|
||||
|
||||
Reference in New Issue
Block a user