Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThe A2A plugin claims the /a2a/v1 prefix so unsupported descendants receive its existing JSON 404 response. Example: GET /a2a/v1/agent-card with A2A configured and Control UI enabled.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current routing bug with a focused production change; the prior lifecycle finding is resolved, runtime proof is sufficient, and exact-head CI passes. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway HTTP routing matches plugin registrations before the Control UI fallback; the A2A account owns route registration, JSON responses, peer authentication, and cleanup. flowchart TD
Client[HTTP client] --> Gateway[Gateway HTTP routing]
Gateway --> Matcher[Plugin route matcher]
Matcher --> A2A[A2A handler]
A2A --> JSON[JSON response]
Gateway --> UI[Control UI fallback]
Technical reviewBest possible solution: Retain plugin-owned prefix matching and lifecycle coverage, and remove the redundant direct-handler test. Do we have a high-confidence way to reproduce the issue? Current-main registration, matcher, handler, and fallback establish the failure path, supported by the official-release report and contributor Gateway trace; no target code was executed during review. Is this the best way to solve the issue? Changing the existing plugin registration is the smallest complete production fix and preserves supported endpoints, peer authentication, and account lifecycle ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ffbbb514ba3b. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +2, Tests +19, Other +2. Total +23 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 4, 2026, 10:25 PM ET / November 5, 2026, 03:25 UTC (Revision 2). |
|
Real behavior proof from a running Gateway (isolated config/state, Base ( With this PR: Controls on the same patched Gateway are unchanged: The P2 lifecycle finding is fixed in |
|
@clawsweeper re-review — real Gateway trace added above, and the lifecycle expectation is updated in b2339d3. |
|
🦞👀 Re-review progress:
|
|
Hey @HeMiaolin — nice clean fix on the same root cause as #193086. ClawSweeper pointed at this PR as the canonical duplicate vs my #193128. Happy to defer to yours. The one extra piece on #193128 that might be worth folding in here is the Gateway-level integration regression (via the plugin-sdk HTTP helper): it covers If you'd rather keep this PR as-is, no worries — I'll leave #193128 open only as long as a maintainer wants the extra coverage, otherwise I'll close it in favor of yours. |
|
Thanks Jerome — happy to keep this PR as the canonical one, and yes please to porting the Gateway-level regression from If you open it against my branch (or paste the test here and I will land it), credit is unnecessary — you wrote the |
…3102 Port the table-driven Gateway suite and plugin-sdk HTTP helper from openclaw#193128 onto this branch. No production-fix changes.
|
@HeMiaolin Port PR is up against your branch: Adds the Gateway control-ui regression suite + |
Unsupported /a2a/v1 descendants return application/json 404 while Control UI is mounted, and neighboring paths still serve the SPA document. The Accept table stays on the public A2A route handler. The plugin-sdk/gateway-http-testing subpath is removed. Co-authored-by: Jerome <[email protected]>
Drop the route-shape checks already covered by the gateway lifecycle test, and set the test-line credit to the exact added-line delta. Co-authored-by: Jerome <[email protected]>
fb331f7 to
b2339d3
Compare
…a-unknown-route-fallback-193086
…a-unknown-route-fallback-193086
…a-unknown-route-fallback-193086
|
@jerome-queck — sorry for the long silence on this, and thanks for the work. I merged your port into this branch just now
Verified on the merged head: If you want the remaining #193128 cases (SPA still on |
|
Thanks for the work here. We're closing this: it doesn't show a real user-facing problem (no report from an affected user and no natural reproduction), and it follows a pattern of small, speculative or duplicate changes split across many PRs. Please open an issue with a reproduction of real harm first; a fix can follow once the problem is confirmed. |
What Problem This Solves
GET /a2a/v1/agent-carddid not answer as an API route. The A2A channel registered/.well-known/agent-card.json,/.well-known/agent.jsonand/a2a/v1as exact paths, so anything else under the prefix missed the plugin routeentirely and fell through to the Control-UI single-page app: HTTP 200 with ~21 kB of
text/html. A client probing asibling path under the same prefix got a web page instead of a JSON error.
The handler already answers unknown paths with a JSON 404; it simply never saw them.
Why This Change Was Made
The gateway route registration now carries the match mode per path:
The well-known agent-card routes stay exact, so their behavior is unchanged. Prefix matching is boundary aware
(
prefixMatchPathaccepts/a2a/v1and/a2a/v1/..., not/a2a/v10), and the handler's existingpathname !== "/a2a/v1"branch now covers unknown subpaths with{"error":"Not found"}.User Impact
A2A clients and probes under
/a2a/v1/...get a JSON 404 instead of an HTML app shell, so a mistyped or unknownendpoint is distinguishable from a working web UI. Existing agent-card and JSON-RPC behavior is unchanged.
Evidence
extensions/a2a/src/http.test.tsagainst the real account registration and handler:/a2a/v1route is registered withmatch: "prefix";GET /a2a/v1/agent-cardanswers404with{"error":"Not found"}.1 failed | 41 passed); with the fix, all 42pass.
oxlinton both files: 0 warnings, 0 errors. The added test lines carry an allocation inconfig/test-lines-allocations/a2a-gateway-prefix-ownership.txt.Real Gateway trace (isolated config/state, Control UI enabled)
GET /a2a/v1/agent-card200 text/html, 48972 bytes, body starts<!doctype html>(the Control UI document)404 application/json,{"error":"Not found"}GET /.well-known/agent-card.json200 application/json(control)POST /a2a/v1401 application/json(control)Known coverage gap
The review asked for a table-driven Gateway suite (
Acceptabsent and*/*, exactGET /a2a/v1, the nestedGET /a2a/v1/.well-known/agent-card.json, unauthenticatedPOST /a2a/v1, the SPA still served on/chatand/a2a/v10, and the descendant returning to the document after the account stops). A contributor wrote that suiteagainst a new
plugin-sdk/gateway-http-testingsubpath; I declined to add a public SDK subpath for test fixtures, and myattempt to port it onto the core gateway harness (
createTestGatewayServer+createGatewayTestRegistry) returned500 Internal Server Errorfor both the plugin route and the SPA fallback, so that version is not in this PR. Theextension-level registry assertion above plus the trace table are what this PR ships today; the wider suite is welcome as
a follow-up.
AI Assistance
This PR was prepared with AI assistance (an agent working from the issue report); the author reviewed the change and its
evidence.