fix(a2av0): send v0.3 results for push config list and delete over JSON-RPC #607
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.52) × (1 − Review Confidence (0.56)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 58 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.289
Diff Size
diff_size
0.244
Sensitive Paths
sensitive_paths
0.052
Real PR Conversation Timeline
3 items
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Approved
Approved these changes.
yarolegovich
ShivamSharma43
Problem
The v0.3 JSON-RPC handler (
a2av0.NewJSONRPCHandler) sends two responses that don't match the spec:1. A successful
tasks/pushNotificationConfig/deletegets a response with neitherresultnorerror:JSON-RPC 2.0 requires
resulton success, and the v0.3 spec defines it asnullfor this method (DeleteTaskPushNotificationConfigSuccessResponse.result: null). Clients that validate the envelope reject the successful delete. For example, the v0.3 Python types declareresult: Noneas a required field. #524 / #525 fixed the same problem in the v1 handler, but the compat handler still has it.2.
tasks/pushNotificationConfig/listfor a task with no push configs returns"result": null. The v0.3 spec defines the result as an array (ListTaskPushNotificationConfigSuccessResponse.result: TaskPushNotificationConfig[]), so clients that read it as a list getnullinstead of[]. The default request handler already returns an empty, non-nilConfigsslice in this case.Cause
handleRequestleavesresultas nil, andjsonrpc.ServerResponse.Resultis taggedomitempty, so the member is dropped.FromV1PushConfigsreturns a nil slice for an empty input, and the nil slice is encoded asnull.Fix
json.RawMessage("null"), so the response contains"result":null.onListTaskPushConfigsreturns an empty slice instead of nil, so the response contains"result":[].I made the list change in the handler instead of in
FromV1PushConfigs, because the interceptor adapters compare that function's output withreflect.DeepEqual.Test
New
TestJSONRPC_ServerPushConfigResultssends both requests to the handler and compares the full JSON response. Onmain, the delete case has noresultand the list case hasresult: null.Ran
go vet ./a2acompat/...,go test ./a2acompat/... ./e2e/...,gofmt, andgolangci-lint run --new-from-rev=origin/main ./a2acompat/a2av0/(0 issues). All pass.I used Claude Code (AI) to write this change. I reviewed the code and checked the failing test before and after the fix.
🤖 Generated with Claude Code