Teknium
6e2796b82d
review-fix(locks): restore BASE fail-loud lock-slot reads and _is_openai_client_closed truth table
...
Adolanium review §3 (Medium/Low). BASE shape at every steer/redirect/persist/agent-cache
lock site was: lock = getattr(obj, "_x_lock", None); if lock is not None: with lock: <direct
attribute read>; else: <getattr fallback for object.__new__ test stubs>. The refactor rewrote
several of these as 'with getattr(...) or nullcontext(): getattr(slot, None)', which (a) turned a
missing slot under the lock from a loud AttributeError into silent None and (b) in the gateway
peek helper read the cache without any lock when the lock attribute was absent.
Restored BASE semantics at:
- agent/agent_runtime_helpers.py::_requeue_pending_steer
- agent/interrupt_control.py: steer, redirect, clear_interrupt, _has_pending_redirect,
_drain_pending_redirect, _drain_pending_steer (new _ic_slot helper: direct read under lock)
- agent/session_persistence.py::_persist_lock (explicit None check + BASE rationale)
- gateway/slash_commands.py::_cached_agent_for (BASE callers read ONLY under the lock; no lock -> None)
- gateway/run_agent_cache.py::_evict_cached_agent (BASE: self._agent_cache direct under lock)
- agent/client_lifecycle.py::_is_openai_client_closed: BASE body + docstring verbatim (outer
is_closed first; inner _client.is_closed only when _client exists; else False)
- agent/stream_delivery.py::_ensure_stream_writer_state: restore BASE rationale that the lock is
created unconditionally in agent_init (_STREAM_STATE) and the lazy path is stub-only
A/B (/tmp/rf/rev/ab_lock_fallbacks.py, ab_client_closed.py) is byte-identical BASE vs HEAD on
the reviewer's inputs + edge cases. tests/agent/test_lock_fallback_base_semantics.py pins it
(7 of 25 cases fail on the pre-fix tree).
2026-09-03 12:29:52 -07:00
..
2026-09-03 03:31:03 -07:00
2026-09-02 22:44:07 -07:00
2026-09-02 23:04:29 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:25:43 -07:00
2026-09-02 13:29:48 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:56:06 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:48:44 -07:00
2026-09-03 12:29:52 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:07:53 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 20:10:26 -07:00
2026-09-02 21:38:20 -07:00
2026-09-02 21:38:20 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:07:53 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:18:18 -07:00
2026-09-03 09:48:45 -07:00
2026-09-02 18:49:57 -07:00
2026-09-02 18:49:57 -07:00
2026-09-02 18:49:57 -07:00
2026-09-02 18:18:18 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:18:18 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 12:29:52 -07:00
2026-09-02 18:47:54 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 10:40:25 -07:00
2026-09-02 18:18:18 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:49:57 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 10:52:45 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:57:14 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:57:14 -07:00
2026-09-02 20:14:01 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 20:02:44 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:58:42 -07:00
2026-09-02 19:32:53 -07:00
2026-09-03 04:31:46 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:32:53 -07:00
2026-09-02 13:29:48 -07:00
2026-09-02 18:58:42 -07:00
2026-09-02 18:22:13 -07:00
2026-09-02 18:58:42 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:23:20 -07:00
2026-09-02 19:32:53 -07:00
2026-09-02 18:58:42 -07:00
2026-09-02 18:58:42 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:58:42 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:53:53 -07:00
2026-09-03 12:29:52 -07:00
2026-09-02 18:53:53 -07:00
2026-09-02 18:22:13 -07:00
2026-09-02 18:58:42 -07:00
2026-09-02 18:22:13 -07:00
2026-09-02 20:02:44 -07:00
2026-09-02 20:02:44 -07:00
2026-09-02 19:22:42 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:22:13 -07:00
2026-09-02 18:29:05 -07:00
2026-09-02 22:21:06 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:50:13 -07:00
2026-09-02 18:28:38 -07:00
2026-09-02 18:28:38 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:10:21 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:33:06 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:12:17 -07:00
2026-09-02 22:21:06 -07:00
2026-09-02 19:05:15 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 02:44:24 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:10:21 -07:00
2026-09-02 18:22:01 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:28:38 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:33:06 -07:00
2026-09-02 19:10:21 -07:00
2026-09-02 18:44:36 -07:00
2026-09-02 19:10:21 -07:00
2026-09-02 19:22:52 -07:00
2026-09-02 19:18:18 -07:00
2026-09-02 18:51:24 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:18:18 -07:00
2026-09-02 18:31:56 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:16:38 -07:00
2026-09-02 19:19:44 -07:00
2026-09-02 19:19:44 -07:00
2026-09-02 19:18:18 -07:00
2026-09-03 04:56:59 +05:30
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 12:29:52 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:19:44 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:51:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:18:18 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 10:40:25 -07:00
2026-09-03 12:29:52 -07:00
2026-09-02 19:43:36 -07:00
2026-09-02 19:42:28 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 03:31:03 -07:00
2026-09-02 19:36:47 -07:00
2026-09-03 10:40:25 -07:00
2026-09-02 19:21:04 -07:00
2026-09-02 19:09:28 -07:00
2026-09-02 19:45:03 -07:00
2026-09-02 19:19:44 -07:00
2026-09-02 19:42:28 -07:00
2026-09-03 10:40:25 -07:00
2026-09-02 19:25:43 -07:00
2026-09-03 10:40:25 -07:00
2026-09-03 10:40:25 -07:00
2026-09-03 02:46:19 -07:00
2026-09-02 22:23:45 -07:00
2026-09-02 22:23:45 -07:00
2026-09-02 19:08:38 -07:00
2026-09-02 18:51:24 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:29:10 -07:00
2026-09-02 18:51:40 -07:00
2026-09-02 19:39:27 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 04:31:46 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:54:04 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:53:04 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:22:39 -07:00
2026-09-02 18:40:01 -07:00
2026-09-03 05:36:21 -07:00
2026-09-02 19:30:27 -07:00
2026-09-02 19:26:50 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:45:32 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 04:31:46 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:19:54 -07:00
2026-09-02 18:29:10 -07:00
2026-09-02 19:07:07 -07:00
2026-09-02 19:14:31 -07:00
2026-09-02 18:29:10 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00