fix(decisioning): strip permitted_billing leak from INVALID_BILLING_MODEL details#399
Closed
fix(decisioning): strip permitted_billing leak from INVALID_BILLING_MODEL details#399
Conversation
…ODEL details The billing-not-permitted-for-agent details schema forbids carrying the agent's full permitted-billing subset on the wire. Drop the field from `details` and remove the enumerated modes from the human message; the recognized caller already knows its own capabilities. Partial fix for #375 — the code-rename portion (AGENT_SUSPENDED / AGENT_BLOCKED / REQUEST_AUTH_UNRECOGNIZED_AGENT / INVALID_BILLING_MODEL → spec-conformant codes) is deferred behind v3.1 of the AdCP spec, which needs to add AGENT_SUSPENDED/AGENT_BLOCKED/BILLING_NOT_PERMITTED codes with proper recovery semantics before the SDK can switch. Refs #375 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lling-leak # Conflicts: # src/adcp/decisioning/registry.py # tests/test_buyer_agent_registry.py
Contributor
Author
|
Superseded by #393, which landed on main with the comprehensive Path A + Path C fix (full rename to |
Contributor
Author
|
Acknowledged — #393 landed the comprehensive Path A + Path C fix, making this PR's delta empty. Nothing further to action here. 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
details.permitted_billingand the enumerated modes from the human message invalidate_billing_for_agent. The AdCPbilling-not-permitted-for-agentdetails schema forbids carrying the agent's full permitted-billing subset on the wire — the recognized caller already knows its own capabilities, structured echo is non-conformant.validate_billing_rejects_passthrough_only_with_agent_billingtest to assert the leak is gone (nopermitted_billingkey, no['operator']rendering, no "permitted modes" phrasing).Scope
This is the partial fix (Path A) from #375 — the one-line spec-leak fix that's independent of the larger code-rename question. It is not breaking for adopters that aren't reading
details.permitted_billing.The full code rename (
AGENT_SUSPENDED/AGENT_BLOCKED/REQUEST_AUTH_UNRECOGNIZED_AGENT/INVALID_BILLING_MODEL→ spec-conformant codes) is deferred behind AdCP v3.1, which needs to addAGENT_SUSPENDED/AGENT_BLOCKED/BILLING_NOT_PERMITTED_FOR_AGENTto the error vocabulary with proper recovery semantics before the SDK can switch. Issue #375 is labeledv3.1to track that follow-up.Test plan
validate_billing_rejects_passthrough_only_with_agent_billingupdated and verified manually (conftest broken on this workspace from a2a-sdk migration; ran the assertions directly against the function — all pass)validate_billing_rejects_advertiser_when_not_in_capabilitiesstill passes (only checkscodeand message-contains-"advertiser")validate_billing_accepts_permitted_modesstill passesruff checkcleanmypy src/adcp/cleanRefs #375
🤖 Generated with Claude Code