Skip to content

fix(acp): redact payload-bearing errors in warning logs - #433

Merged
benbrandt merged 1 commit into
mainfrom
fix/sdk-2-redact-warning-errors
Oct 21, 2026
Merged

benbrandt merged 1 commit into
mainfrom
fix/sdk-2-redact-warning-errors

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Summary

Addresses SDK-2: malformed parameters could enter ordinary warning logs through Error.data.json and payload-bearing Serde parse reasons.

  • Use a shared redacted formatter for protocol-error warnings, emitting only the numeric error code and a fixed, code-derived reason while retaining method/request/handler context where available.
  • Apply redaction to typed notification parsing, static/default/dynamic handler failures (including retried messages), outgoing error responses and preparation failures, invalid transport input, and connection-close callback errors.
  • Add WARN-level log-capture regressions using a synthetic private marker for missing fields, invalid types, unknown enum variants, and application-controlled error messages/data. Check notification no-reply behavior and continued connection usability.
  • Document diagnostic privacy in the book, link it from the TOC, and add a changelog entry.

Privacy boundary

This implements the redacted-WARN formatter option. Returned and wire errors remain unchanged and potentially sensitive, including full failing input JSON. Explicitly enabled DEBUG/TRACE diagnostics remain unchanged. Field paths are not extracted from free-form error text because the current errors do not expose a separately trusted structured path.

Validation

  • just test (workspace all-features tests/doctests and core no-default-features tests)
  • cargo clippy -p agent-client-protocol --all-features --tests --locked -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check
  • mdbook build after mdbook-mermaid install . (non-blocking preprocessor version mismatch warning)

@benbrandt
benbrandt enabled auto-merge (squash) October 21, 2026 11:50
@benbrandt
benbrandt merged commit b34addf into main Oct 21, 2026
13 of 14 checks passed
@benbrandt
benbrandt deleted the fix/sdk-2-redact-warning-errors branch October 21, 2026 11:57
This was referenced Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant