Repository navigation
RSPEED: remove /query/direct endpoints (defer chat on cloud-agents) - #60
Merged
Merged
Conversation
Removed: - src/app/endpoints/query_direct.py (POST /v1/query/direct and /stream) - src/workflow/query_executor.py (ChatWorkflowRunner bridge) - src/workflow/middleware.py (only used by the chat runner) - router registration; test_routers count 29 -> 28 - unit tests: test_query_executor.py, test_middleware.py - e2e tests: test_query_direct_handler_e2e.py, test_otel_tracing_e2e.py, TestPromptValidation in test_step_executor_e2e.py - openapi.json regenerated; design docs updated Refs #59 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
beesarmy
approved these changes
Oct 1, 2026
beesarmy
left a comment
Collaborator
There was a problem hiding this comment.
Review: approve
Clean removal. I verified completeness rather than trusting the file list:
Removal is complete
- On the base branch, the only importers of
workflow.query_executor/workflow.middleware/app.endpoints.query_directare exactly the files this PR touches — no othersrc/consumers, so nothing is left dangling. - On this branch, zero remaining references to
query_direct,QueryDirect,query_executor,workflow.middleware, orget_default_middlewareanywhere insrc/ortests/.MAX_PROMPT_LENGTH/MAX_INSTRUCTIONS_LENGTHare fully gone, and there is nolimits.pycoupling (consistent with the PR description). - Built the FastAPI app from this branch:
openapi()yields 49 paths with no/v1/query/direct*, while/v1/query,/v1/streaming_query, and/v1/streaming_query/interruptare intact. The three deleted modules are not importable.
Tests & schema
tests/unit/app/test_routers.pypasses with the updated count of 28;tests/unit/cloud_agents/collects and passes (96 passed) with the two deleted test modules gone.docs/devel_doc/openapi.jsonis a pure deletion (2 paths +QueryDirectRequestschema) and is byte-identical to a freshscripts/generate_openapi_schema.pyrun on this branch.- No test-list / Makefile / workflow references to the deleted test files. CI is green (3/3 Cloud Agents Tests).
Scope tracking
- Breaking change is clearly called out, and the bring-back uses
Refs #59(notCloses), so nothing is prematurely closed. Correct.
Nits (non-blocking)
[LOW]docs/design/cloud-agents/integration-architecture.md— the Migration Path diagram still styles Phase 1 (/query/directendpoint) plus P2/P3 green under a "Green = done" legend, which now reads as shipped. The new Deferred callout covers the status table, but consider restyling p1–p3 or annotating the diagram as the original plan.[LOW]The titleRSPEED: ...doesn't matchpr-title-checkerprefixes (RSPEED-<n>: ...). Not enforced on this fork (no checker run on this PR), but worth a retitle if this is ever upstreamed.
🤖 Reviewed by beesarmy via Claude Code
17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes
POST /v1/query/directand/v1/query/direct/stream(chat on cloud-agents via ChatWorkflowRunner). Deferred because of the G5 cross-user runner leak and in-processspawn: nonecredential handling, and to keep #51 / cloud-agents#269 focused. Bring-back tracked in #59.Refs #59
Removed
src/app/endpoints/query_direct.py,src/workflow/query_executor.py,src/workflow/middleware.py(only used by chat)src/app/routers.py;tests/unit/app/test_routers.pycount 29 -> 28tests/unit/cloud_agents/test_query_executor.py,test_middleware.pytests/e2e/cloud_agents/test_query_direct_handler_e2e.py,test_otel_tracing_e2e.py,TestPromptValidationintest_step_executor_e2e.pyEdited
docs/devel_doc/openapi.json(regenerated),docs/design/cloud-agents/integration-architecture.md,e2e-testing-strategy.md, docstrings injaeger_helpers.pyandtest_workflow_tracing_e2e.pyNo dependency on PR #57 (
limits.py); constants vanish withquery_executor.py.Tests
make format,make schemaclean;make test-unit: 3358 passed, 1 skipped, 90% coverage. Remaining pyright/pylint findings are in untouched e2e files (pre-existing).Breaking
The two endpoints are gone.
🤖 Generated with Claude Code