simplify(compat): approval — drop 43 facade re-exports + _command_detection_variants late-bind seam, repoint 30 callers + 46 test files

tools/approval.py no longer re-exports sibling names (approval_context/prompt/floors/detection/
human_wait/smart/gateway_wait); it imports only what it uses. Siblings reference sibling-defined
names directly (module-attribute reads on tools.approval_context so patching the defining module
still works); only facade-owned state (_lock, _gateway_queues, _permanent_approved, _denied,
_denial_breaker_addendum, _gateway_notify_cb) is still read back through tools.approval.
approval_detection calls its own _command_detection_variants instead of late-binding through the facade.
This commit is contained in:
Teknium
2026-09-03 13:49:57 -07:00
parent 7b8c11bcf7
commit 14791b4d4e
74 changed files with 438 additions and 518 deletions
+1 -1
View File
@@ -216,7 +216,7 @@ class TestKernelOwnershipAndLifecycle(unittest.TestCase):
"""
def _run_as(self, session_key, code, task_id, **kwargs):
from tools.approval import reset_current_session_key, set_current_session_key
from tools.approval_context import reset_current_session_key, set_current_session_key
token = set_current_session_key(session_key)
try: