Skip to content

docs(rfc): adcpError two-layer emission for AdCP 3.0.7 (#1606)#1608

Closed
bokelley wants to merge 1 commit intomainfrom
bokelley/rfc-1606-adcperror-two-layer
Closed

docs(rfc): adcpError two-layer emission for AdCP 3.0.7 (#1606)#1608
bokelley wants to merge 1 commit intomainfrom
bokelley/rfc-1606-adcperror-two-layer

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 8, 2026

Summary

Design pass for #1606adcpError() emits only the envelope layer ({adcp_error}), but 18 AdCP response schemas (every mutating media-buy task plus the creative + content-standards families) require an errors: [{code, message}] array at the payload layer. The two layers are not alternatives — the spec's error-code.json#GOVERNANCE_DENIED prose 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

  • Requirement is identical in 3.0.6 and 3.0.7. The same 18 response schemas have an 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. Per CLAUDE.md: "storyboards are assertions, not ground truth" — confirmed the spec defines the contract; the SDK is the bug.
  • acquire_rights and creative_approval have structured rejection arms (AcquireRightsRejected, CreativeRejected) that explicitly forbid errors[] via not: { required: ["errors"] }. They are NOT in scope.
  • Today the framework already supports two parallel error paths (adcpError() envelope-only, wrapErrorArm payload-only) — both are mirror-image bugs.

Recommendation: Option C

Framework auto-wraps via the existing dispatcher finalize seam (sanitizeAdcpErrorEnvelope lives there already). Adopters keep calling adcpError(). Tool-aware: only tools whose response schema has an Error arm get the synthesis. Symmetric: fixes both the adcpError() envelope-only bug and the wrapErrorArm payload-only bug in one stroke.

Criterion A (modify helper) B (parallel helper) C (auto-wrap)
Adopter friction Medium High Low
Wire correctness Partial Partial until full migration Full
Regression resistance Medium Low High

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:

  • Spec audit (18 affected tools enumerated; verbatim spec quote captured)
  • Current SDK state documented (67 call sites across 12 files)
  • Three migration options analysed with version-bump impact
  • Recommendation justified with criterion matrix
  • Implementation phases for the recommended path
  • Open questions called out
  • Related prior art linked (existing dispatcher patterns + spec rejection arms)

🤖 Generated with Claude Code

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>
@bokelley
Copy link
Copy Markdown
Contributor Author

bokelley commented May 8, 2026

Implementation landed in #1610. Closing the draft RFC PR.

@bokelley bokelley closed this May 8, 2026
@bokelley
Copy link
Copy Markdown
Contributor Author

bokelley commented May 8, 2026

Noted — #1610 carries the implementation. Thanks for the audit trail.


Generated by Claude Code

@bokelley
Copy link
Copy Markdown
Contributor Author

bokelley commented May 8, 2026

Acknowledged — tracking #1610 for the implementation.


Triaged by Claude Code. Session: https://claude.ai/code/session_01BNdop5b71GdxpGSVGYaqBq


Generated by Claude Code

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