From d887507f49d29cb3e3053995c81e05642bd73b6d Mon Sep 17 00:00:00 2001 From: Eilen Shin <136898293+Eilen6316@users.noreply.github.com> Date: Sun, 21 Jun 2026 08:37:56 +0800 Subject: [PATCH] chore: remove standalone LangGraph Server remnants from agent docs (#3304) (#3671) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to #3301 / #3344. The Gateway-embedded runtime is the standard topology — there is no standalone LangGraph service — but two stale references slipped past the cleanup guard: - .github/copilot-instructions.md still told contributors that `make dev` "Starts LangGraph (2024)" and wrote logs/langgraph.log. - SandboxAuditMiddleware's docstring pointed audit logs at langgraph.log. Update both to the Gateway-embedded reality (gateway.log) and extend test_gateway_runtime_cleanup.py to pin the agent-instruction docs so the standalone references can't reappear. Stays within the safe scope of #3304: does not touch langgraph_auth.py, langgraph.json, or the langgraph-api / langgraph-cli / langgraph-runtime-inmem deps, which the issue gates on maintainer confirmation of Studio / direct LangGraph Server support. --- .github/copilot-instructions.md | 4 ++-- .../agents/middlewares/sandbox_audit_middleware.py | 2 +- backend/tests/test_gateway_runtime_cleanup.py | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 5c6f32f80..1f3497a0f 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -94,9 +94,9 @@ make dev Behavior: - Stops existing local services first. -- Starts LangGraph (`2024`), Gateway (`8001`), Frontend (`3000`), nginx (`2026`). +- Starts Gateway (`8001`, with the embedded LangGraph-compatible runtime), Frontend (`3000`), nginx (`2026`). There is no standalone LangGraph service. - Unified app endpoint: `http://localhost:2026`. -- Logs: `logs/langgraph.log`, `logs/gateway.log`, `logs/frontend.log`, `logs/nginx.log`. +- Logs: `logs/gateway.log`, `logs/frontend.log`, `logs/nginx.log`. Stop services: diff --git a/backend/packages/harness/deerflow/agents/middlewares/sandbox_audit_middleware.py b/backend/packages/harness/deerflow/agents/middlewares/sandbox_audit_middleware.py index e41f5912a..ad7d02357 100644 --- a/backend/packages/harness/deerflow/agents/middlewares/sandbox_audit_middleware.py +++ b/backend/packages/harness/deerflow/agents/middlewares/sandbox_audit_middleware.py @@ -201,7 +201,7 @@ class SandboxAuditMiddleware(AgentMiddleware[ThreadState]): 1. **Command classification**: regex + shlex analysis grades commands as high-risk (block), medium-risk (warn), or safe (pass). 2. **Audit log**: every bash call is recorded as a structured JSON entry - via the standard logger (visible in langgraph.log). + via the standard logger (visible in gateway.log). High-risk commands (e.g. ``rm -rf /``, ``curl url | bash``) are blocked: the handler is not called and an error ``ToolMessage`` is returned so the diff --git a/backend/tests/test_gateway_runtime_cleanup.py b/backend/tests/test_gateway_runtime_cleanup.py index 145ef0eab..7574124c0 100644 --- a/backend/tests/test_gateway_runtime_cleanup.py +++ b/backend/tests/test_gateway_runtime_cleanup.py @@ -147,3 +147,14 @@ def test_gateway_runtime_docs_do_not_reference_transition_modes(): assert "./scripts/deploy.sh --gateway" not in content, path assert "docker compose --profile gateway" not in content, path assert "`/api/langgraph/*` → LangGraph" not in content, path + + +def test_agent_instruction_docs_do_not_reference_standalone_langgraph_server(): + """Agent/Copilot instruction docs must describe only the Gateway-embedded + runtime — no standalone LangGraph service, port 2024, or langgraph.log.""" + content = _read(".github/copilot-instructions.md") + + assert "langgraph.log" not in content + assert "localhost:2024" not in content + assert "127.0.0.1:2024" not in content + assert "Starts LangGraph" not in content