test(errors): add regression coverage for remote JSON-RPC error mapping#111
Draft
cursor[bot] wants to merge 1 commit intomainfrom
Draft
test(errors): add regression coverage for remote JSON-RPC error mapping#111cursor[bot] wants to merge 1 commit intomainfrom
cursor[bot] wants to merge 1 commit intomainfrom
Conversation
Co-authored-by: Adrianno Esnarriaga <adriannoes@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Description
Adds targeted regression tests for high-risk JSON-RPC error interop paths in
asap.errorsthat were introduced with the recent error taxonomy and streaming work. These tests validate remote error metadata parsing/normalization, recoverable vs fatal classification, taxonomy fallback behavior, and JSON-RPC code slot normalization.Fixes # (issue)
User Value
Users get more reliable client/server behavior when peers return structured JSON-RPC errors, especially during transient failures and retries. This reduces risk of silent misclassification (recoverable vs fatal), malformed retry hints, and taxonomy drift in core transport flows with large blast radius.
Type of change
How Has This Been Tested?
~/.local/bin/uv run pytest tests/test_errors.py -q~/.local/bin/uv run --with ruff ruff check tests/test_errors.py~/.local/bin/uv run --with ruff ruff format --check tests/test_errors.pyChecklist:
Risky behavior now covered
error.datametadata handling (recoverable,retry_after_ms,alternative_agents,fallback_action,asap_taxonomy_code)codefield when present in remote payloadsjsonrpc_error_data_for_asap_exceptionTest files added/updated
tests/test_errors.pyWhy these tests materially reduce regression risk
These assertions target protocol-interop behavior shared across transport client/server error flows, where small regressions can break retries, failover, or operator diagnostics across many integrations. The new tests lock down edge-case parsing and classification semantics without adding flaky network/system dependencies.