From 783734b69f8317d2a33468a30b0c3b86c49a3597 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 23:22:59 +0000 Subject: [PATCH] style: apply black formatting to pass CI lint check 8 files were flagged by `black --check` in the lint-and-test-backend CI job. Applied `black` to bring them into compliance with no logic changes. Co-Authored-By: Claude Sonnet 4.6 --- services/orchestrator/goal_conversation_service.py | 4 ++-- services/orchestrator/main_with_hierarchy.py | 4 +++- services/orchestrator/sandbox_manager.py | 4 +++- services/orchestrator/simple_main.py | 4 +++- services/orchestrator/tests/test_auth_authz.py | 4 +++- services/orchestrator/tests/test_claude_code_wrapper.py | 4 +++- services/orchestrator/tests/test_hierarchy_ws_authz.py | 4 +++- services/orchestrator/tests/test_residual_authz.py | 4 +++- 8 files changed, 23 insertions(+), 9 deletions(-) diff --git a/services/orchestrator/goal_conversation_service.py b/services/orchestrator/goal_conversation_service.py index 15fc167..bf2be4f 100644 --- a/services/orchestrator/goal_conversation_service.py +++ b/services/orchestrator/goal_conversation_service.py @@ -634,8 +634,8 @@ async def get_goal_conversations( ORDER BY last_activity_at DESC, created_at DESC LIMIT ${param_idx} """.format( # nosec B608 -- where clause is fixed fragments with $N placeholders; all values bound as query params - where_clause=where_clause, param_idx=param_idx - ), + where_clause=where_clause, param_idx=param_idx + ), *params, limit, ) diff --git a/services/orchestrator/main_with_hierarchy.py b/services/orchestrator/main_with_hierarchy.py index 031900f..fdfd2e0 100644 --- a/services/orchestrator/main_with_hierarchy.py +++ b/services/orchestrator/main_with_hierarchy.py @@ -1411,6 +1411,8 @@ async def demo_endpoint(): uvicorn.run( app, - host=os.getenv("HOST", "0.0.0.0"), # nosec B104 -- container service binds all interfaces by default; override via HOST env + host=os.getenv( + "HOST", "0.0.0.0" + ), # nosec B104 -- container service binds all interfaces by default; override via HOST env port=int(os.getenv("PORT", "8000")), ) diff --git a/services/orchestrator/sandbox_manager.py b/services/orchestrator/sandbox_manager.py index 0abebd0..02fc415 100644 --- a/services/orchestrator/sandbox_manager.py +++ b/services/orchestrator/sandbox_manager.py @@ -397,7 +397,9 @@ async def _create_container(self, sandbox: Sandbox, config: SandboxConfig): "cap_drop": config.capabilities["drop"], "cap_add": config.capabilities["add"], "read_only": False, # Need write access for development - "tmpfs": {"/tmp": "rw,noexec,nosuid,size=1g"}, # nosec B108 -- Docker tmpfs mount point inside the sandbox container, hardened with noexec,nosuid + "tmpfs": { + "/tmp": "rw,noexec,nosuid,size=1g" + }, # nosec B108 -- Docker tmpfs mount point inside the sandbox container, hardened with noexec,nosuid "labels": { "fuzeagent.sandbox": "true", "fuzeagent.agent_id": sandbox.agent_id, diff --git a/services/orchestrator/simple_main.py b/services/orchestrator/simple_main.py index 88f549a..3021f0e 100644 --- a/services/orchestrator/simple_main.py +++ b/services/orchestrator/simple_main.py @@ -461,6 +461,8 @@ async def get_agent_documents(agent_id: str): uvicorn.run( app, - host=os.getenv("HOST", "0.0.0.0"), # nosec B104 -- container service binds all interfaces by default; override via HOST env + host=os.getenv( + "HOST", "0.0.0.0" + ), # nosec B104 -- container service binds all interfaces by default; override via HOST env port=int(os.getenv("PORT", "8000")), ) diff --git a/services/orchestrator/tests/test_auth_authz.py b/services/orchestrator/tests/test_auth_authz.py index 5242834..0606adf 100644 --- a/services/orchestrator/tests/test_auth_authz.py +++ b/services/orchestrator/tests/test_auth_authz.py @@ -27,7 +27,9 @@ # Configure verification material before importing the auth module so that # get_current_user runs in its prod-like (fail-closed) mode. -os.environ["JWT_SECRET"] = "test-secret-for-issue-6-authz" # nosec B105 -- test-only JWT secret fixture, not a real credential +os.environ["JWT_SECRET"] = ( + "test-secret-for-issue-6-authz" # nosec B105 -- test-only JWT secret fixture, not a real credential +) os.environ["JWT_ALGORITHM"] = "HS256" os.environ.pop("AUTH_DISABLED", None) os.environ.pop("JWT_AUDIENCE", None) diff --git a/services/orchestrator/tests/test_claude_code_wrapper.py b/services/orchestrator/tests/test_claude_code_wrapper.py index 5f14e12..2ab05f3 100644 --- a/services/orchestrator/tests/test_claude_code_wrapper.py +++ b/services/orchestrator/tests/test_claude_code_wrapper.py @@ -95,7 +95,9 @@ def test_constructor_accepts_agent_context(self, mock_anthropic_client): task_id="task-456", ) - assert wrapper.workspace_path == "/tmp/does-not-need-to-exist" # nosec B108 -- test-only literal path assertion + assert ( + wrapper.workspace_path == "/tmp/does-not-need-to-exist" + ) # nosec B108 -- test-only literal path assertion assert wrapper.agent_id == "agent-123" assert wrapper.task_id == "task-456" # repository_context is initialised as a fresh dict per instance. diff --git a/services/orchestrator/tests/test_hierarchy_ws_authz.py b/services/orchestrator/tests/test_hierarchy_ws_authz.py index 70dea3b..395cf6d 100644 --- a/services/orchestrator/tests/test_hierarchy_ws_authz.py +++ b/services/orchestrator/tests/test_hierarchy_ws_authz.py @@ -34,7 +34,9 @@ # Environment — set BEFORE importing auth/hierarchy_endpoints so the module # evaluates with the correct JWT config (fail-closed, no bypass). # --------------------------------------------------------------------------- -os.environ["JWT_SECRET"] = "test-secret-hierarchy-ws-authz" # nosec B105 -- test-only JWT secret fixture, not a real credential +os.environ["JWT_SECRET"] = ( + "test-secret-hierarchy-ws-authz" # nosec B105 -- test-only JWT secret fixture, not a real credential +) os.environ["JWT_ALGORITHM"] = "HS256" os.environ.pop("AUTH_DISABLED", None) os.environ.pop("JWT_AUDIENCE", None) diff --git a/services/orchestrator/tests/test_residual_authz.py b/services/orchestrator/tests/test_residual_authz.py index 3734e59..e3651e1 100644 --- a/services/orchestrator/tests/test_residual_authz.py +++ b/services/orchestrator/tests/test_residual_authz.py @@ -31,7 +31,9 @@ import pytest # Configure verification material BEFORE importing auth so it runs fail-closed. -os.environ["JWT_SECRET"] = "test-secret-for-issue-6-authz" # nosec B105 -- test-only JWT secret fixture, not a real credential +os.environ["JWT_SECRET"] = ( + "test-secret-for-issue-6-authz" # nosec B105 -- test-only JWT secret fixture, not a real credential +) os.environ["JWT_ALGORITHM"] = "HS256" os.environ.pop("AUTH_DISABLED", None) os.environ.pop("JWT_AUDIENCE", None)