← Back to Pull requests

fix(a2av0): send v0.3 results for push config list and delete over JSON-RPC #607

Open
ShivamSharma43 opened this pull request with 58 lines diff across 2 files
View on GitHub
ShivamSharma43 ShivamSharma43 commented on Nov 17, 2026 05:57 UTC
Author

Problem

The v0.3 JSON-RPC handler (a2av0.NewJSONRPCHandler) sends two responses that don't match the spec:

1. A successful tasks/pushNotificationConfig/delete gets a response with neither result nor error:

   {"jsonrpc":"2.0","id":1}
   

JSON-RPC 2.0 requires result on success, and the v0.3 spec defines it as null for this method (DeleteTaskPushNotificationConfigSuccessResponse.result: null). Clients that validate the envelope reject the successful delete. For example, the v0.3 Python types declare result: None as a required field. #524 / #525 fixed the same problem in the v1 handler, but the compat handler still has it.

2. tasks/pushNotificationConfig/list for 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 get null instead of []. The default request handler already returns an empty, non-nil Configs slice in this case.

Cause

  • For delete, handleRequest leaves result as nil, and jsonrpc.ServerResponse.Result is tagged omitempty, so the member is dropped.

  • For list, FromV1PushConfigs returns a nil slice for an empty input, and the nil slice is encoded as null.
  • Fix

  • Delete returns json.RawMessage("null"), so the response contains "result":null.

  • onListTaskPushConfigs returns 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 with reflect.DeepEqual.

    Test

    New TestJSONRPC_ServerPushConfigResults sends both requests to the handler and compares the full JSON response. On main, the delete case has no result and the list case has result: null.

    Ran go vet ./a2acompat/..., go test ./a2acompat/... ./e2e/..., gofmt, and golangci-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

    Diff: 58 lines (+57 / -1) across 2 files Reviewer: yarolegovich Review duration: 25625m
    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
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    55%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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-pull-request-reviewer[bot] copilot-pull-request-reviewer[bot] commented on Nov 17, 2026 05:57 UTC
    Reviewer

    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.

    yarolegovich yarolegovich approved these changes on Nov 17, 2026 12:22 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    ShivamSharma43 ShivamSharma43
    Labels
    risk: low confidence: 55.8% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 55.8% · Lower = rushed or shallow review
    55.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23% · Safe to merge
    23%