fix(acp): preserve JSON-RPC error data - #2436
Conversation
Signed-off-by: brainx <12695242+brainx@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 701ec6b5a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Solid root-cause fix — preserving Relatedly, the codex reviewer's P2 on the |
Signed-off-by: brainx <12695242+brainx@users.noreply.github.com>
|
@SeanGearin Addressed in |
Signed-off-by: brainx <12695242+brainx@users.noreply.github.com>
|
Updated the branch to current |
Signed-off-by: brainx <12695242+brainx@users.noreply.github.com>
|
Verified d835077 against the head - |
…error-data Signed-off-by: brainx <12695242+brainx@users.noreply.github.com>
Problem
buzz-acpcurrently keeps only a JSON-RPC error'scodeandmessage. Adapter diagnostics carried inerror.dataare lost, turning actionable failures such as an incompatible CLI flag into a generic-32603 Internal error.Fix
Preserve
error.dataas a compact, UTF-8-safe, 4 KiB-bounded owner diagnostic. High-level logs and channel failure notices continue to use only the public code and message; the encryptedturn_errorobserver payload receives the detail in a separatedatafield.Errors without a string
messageretain their bounded full error object for owner diagnosis. The implementation retains immediate handling for non-retryable authentication failures.Regression guard
Add focused tests for structured data, missing and null messages, UTF-8 truncation, public display behavior, observer propagation, and owner-transcript rendering.
Testing
cargo fmt --all -- --check— passedcargo test -p buzz-acp— 621 unit tests and 9 lifecycle tests passednode --import ./test-loader.mjs --experimental-strip-types --test src/features/agents/ui/agentSessionTranscript.test.mjs— 51 passedpnpm exec biome check src/features/agents/lib/friendlyAgentLastError.ts src/features/agents/ui/agentSessionTranscript.ts src/features/agents/ui/agentSessionTranscript.test.mjs— passedgit diff --check upstream/main...HEAD— passedAddresses the diagnostic-loss portion of #2422.