The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: second round of native-Windows fixture portability (kanban crash, policy peer, API pending)
Tekniumed443645f6c8
diff --git a/tests/gateway/fixtures/kanban_owner_probe.py b/tests/gateway/fixtures/kanban_owner_probe.pyindex 3cb30a415a4..c88efab1f60 100644--- a/tests/gateway/fixtures/kanban_owner_probe.py+++ b/tests/gateway/fixtures/kanban_owner_probe.py@@ -140,7 +140,8 @@ def main():assert receipt['pid_preserved'] and receipt['managed_dead'], receiptelif peer.mode == 'crash':import signal- os.kill(active.worker_pid, signal.SIGKILL)+ # Windows has no SIGKILL; os.kill there is TerminateProcess for any signal.+ os.kill(active.worker_pid, getattr(signal, 'SIGKILL', signal.SIGTERM))peer.release.set()if peer.mode != 'timeout':wait_for(lambda: not kb._pid_alive(active.worker_pid))diff --git a/tests/gateway/fixtures/session_policy_peer.py b/tests/gateway/fixtures/session_policy_peer.pyindex 9ae9daa6368..f8260f43676 100644--- a/tests/gateway/fixtures/session_policy_peer.py+++ b/tests/gateway/fixtures/session_policy_peer.py@@ -23,7 +23,7 @@ class Peer(BaseHTTPRequestHandler):message = {'role': 'assistant', 'content': 'POLICY_DONE'}if not done:message = {'role': 'assistant', 'content': None, 'tool_calls': [- {'id': 'owned', 'type': 'function', 'function': {'name': 'terminal',+ {'id': 'owned-' + str(body.get('model')), 'type': 'function', 'function': {'name': 'terminal','arguments': json.dumps({'command': 'pwd; printf owned > policy-proof.txt'})}}]}payload = json.dumps({'id': 'policy', 'object': 'chat.completion', 'model': body.get('model'),'choices': [{'index': 0, 'message': message, 'finish_reason': 'stop' if done else 'tool_calls'}],diff --git a/tests/gateway/test_api_pending_daemon.py b/tests/gateway/test_api_pending_daemon.pyindex 9163fe4fbcf..8ef551586f2 100644--- a/tests/gateway/test_api_pending_daemon.py+++ b/tests/gateway/test_api_pending_daemon.py@@ -2,6 +2,7 @@import asynciofrom http.server import BaseHTTPRequestHandler, ThreadingHTTPServerimport json+import shleximport osfrom pathlib import Pathimport socket@@ -27,7 +28,8 @@ class PromptPeer(BaseHTTPRequestHandler):if last.get('role') != 'tool' and ('ASK_APPROVAL' in text or 'ASK_CLARIFY' in text):approval = 'ASK_APPROVAL' in textname = 'terminal' if approval else 'clarify'- args = {'command': 'rm -rf ' + str(self.server.target)} if approval else {+ # Git Bash eats unquoted backslashes: a bare C:\\... path removes nothing on Windows.+ args = {'command': 'rm -rf ' + shlex.quote(self.server.target.as_posix())} if approval else {'questions': [{'question': 'Choose the answer', 'choices': ['BLUE', 'GREEN']}]}message = {'role': 'assistant', 'content': None, 'tool_calls': [{'id': 'call_control', 'type': 'function', 'function': {'name': name, 'arguments': json.dumps(args)}}]}