Stabilize context-overflow compaction test in Python 3.11 CI (#1006)

* Stabilize overflow compaction test expectations

Co-authored-by: eous <13773563+eous@users.noreply.github.com>

* Fix ObservedRLock compatibility with Python 3.14 Condition

Co-authored-by: eous <13773563+eous@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eous <13773563+eous@users.noreply.github.com>
This commit is contained in:
Copilot
2026-08-11 05:46:02 -07:00
committed by GitHub
parent cf2811fceb
commit d2a6c2852e
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -225,6 +225,9 @@ class _ObservedRLock:
def release(self) -> None:
self._lock.release()
def locked(self) -> bool:
return self._lock.locked()
def __enter__(self):
self.acquire()
return self
+1
View File
@@ -225,6 +225,7 @@ class TestContextOverflowRecovery:
patch.object(session, "_stream_response", side_effect=mock_stream_response),
patch.object(session, "_compact_messages", compact_mock),
patch.object(session, "_full_messages", return_value=[]),
patch.object(session, "_over_soft", return_value=False),
patch.object(session, "_update_token_table"),
patch.object(session, "_print_status_line"),
patch.object(session, "_emit_state"),