Repository navigation
Add diagnostic reasons to MCP attribution errors - #47899
Merged
copyberry[bot] merged 1 commit intoSep 24, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why The `attribution_error` status does not explain why MCP attribution is incomplete. Preserve a diagnostic reason so callers can distinguish history and recorder errors from request serialization failures. ## What changed - Add optional `error_reason` diagnostics to `McpAttribution`, retaining the first recorder error through checkpoints, compaction, resume, and fork. - Identify missing or invalid checkpoints, conflicting sources, invalid sources, and poisoned recorder state. Use `restored_error_unknown` for older error checkpoints without a reason. - Distinguish `payload_too_large` from `serialization_failed` in request metadata fallbacks. - Tolerate missing, unknown, or malformed diagnostic reasons when reading history, without letting diagnostics determine attribution status. ## Testing Add coverage for reason preservation, recorder poisoning, backward-compatible checkpoint decoding, resume and cold-fork restoration, and request metadata serialization, including oversized payloads. GitOrigin-RevId: 389b9446fae119f793978f3e7e4a926677e84d8c
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/389b9446fae119f793978f3e7e4a926677e84d8c
branch
from
September 24, 2026 18:06
9c35d44 to
62197a6
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/389b9446fae119f793978f3e7e4a926677e84d8c
branch
September 24, 2026 18:06
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add diagnostic reasons to MCP attribution errors
Why
The
attribution_errorstatus does not explain why MCP attribution is incomplete. Preserve a diagnostic reason so callers can distinguish history and recorder errors from request serialization failures.What changed
error_reasondiagnostics toMcpAttribution, retaining the first recorder error through checkpoints, compaction, resume, and fork.restored_error_unknownfor older error checkpoints without a reason.payload_too_largefromserialization_failedin request metadata fallbacks.Testing
Add coverage for reason preservation, recorder poisoning, backward-compatible checkpoint decoding, resume and cold-fork restoration, and request metadata serialization, including oversized payloads.