docs(rfc): adcpError two-layer emission for AdCP 3.0.7 (#1606)#1608
Closed
docs(rfc): adcpError two-layer emission for AdCP 3.0.7 (#1606)#1608
Conversation
Design pass on `adcpError()` envelope-only emission missing the payload-layer `errors[]` required by 18 AdCP response schemas. Recommends Option C (framework auto-wraps via the existing dispatcher finalize seam) over modifying the helper or shipping a parallel API. Spec audit: requirement is identical in 3.0.6 and 3.0.7; what 3.0.7 changed was upstream storyboard chaining (adcp#4088) so create_media_buy actually runs and the violation became visible. Per CLAUDE.md "spec is ground truth, storyboards are assertions" — confirmed the spec defines the contract, the SDK is the bug. No implementation; this PR is the design pass only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Implementation landed in #1610. Closing the draft RFC PR. |
Contributor
Author
|
Noted — #1610 carries the implementation. Thanks for the audit trail. Generated by Claude Code |
Contributor
Author
|
Acknowledged — tracking #1610 for the implementation. Triaged by Claude Code. Session: https://claude.ai/code/session_01BNdop5b71GdxpGSVGYaqBq Generated by Claude Code |
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.
Summary
Design pass for #1606 —
adcpError()emits only the envelope layer ({adcp_error}), but 18 AdCP response schemas (every mutating media-buy task plus the creative + content-standards families) require anerrors: [{code, message}]array at the payload layer. The two layers are not alternatives — the spec'serror-code.json#GOVERNANCE_DENIEDprose says sellers populate both when no structured rejection arm exists.This PR adds
docs/proposals/adcperror-two-layer-emission.md. No implementation in this PR.Key findings from the spec audit
errors-arm-required oneOf branch in both versions. 3.0.7 only changed upstream storyboard chaining (adcp#4088), which made the pre-existing wire violation visible. PerCLAUDE.md: "storyboards are assertions, not ground truth" — confirmed the spec defines the contract; the SDK is the bug.acquire_rightsandcreative_approvalhave structured rejection arms (AcquireRightsRejected,CreativeRejected) that explicitly forbiderrors[]vianot: { required: ["errors"] }. They are NOT in scope.adcpError()envelope-only,wrapErrorArmpayload-only) — both are mirror-image bugs.Recommendation: Option C
Framework auto-wraps via the existing dispatcher finalize seam (
sanitizeAdcpErrorEnvelopelives there already). Adopters keep callingadcpError(). Tool-aware: only tools whose response schema has an Error arm get the synthesis. Symmetric: fixes both theadcpError()envelope-only bug and thewrapErrorArmpayload-only bug in one stroke.Patch is defensible (bug fix); RFC recommends minor for honesty about the visible wire change.
Test plan
Design RFC only — no code changes. Implementation tracked separately. RFC § 5 specifies the test strategy:
🤖 Generated with Claude Code