Repository navigation
fix(accounts): advertise account.requests and serve account_requests on the platform path #3586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a831111
fix(accounts): advertise account.requests and serve account_requests …
bokelley a7e6cf9
fix(accounts): serve Account.revision on list_accounts
bokelley 8f7ac80
fix(accounts): serve account_requests and revision only on releases t…
bokelley fdda387
fix(accounts): refuse request_account without a declared supported_bi…
bokelley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@adcp/sdk': minor | ||
| --- | ||
|
|
||
| Sellers registering `request_account` (`accounts.requestAccount`) now advertise AdCP 3.3 `account.requests` on `get_adcp_capabilities`, with `request_task`, `read_task: 'list_accounts'` and the `account.requests` experimental feature id, so `client.accounts.ensure` routes to them. `capabilities.accountRequests` supplies `changeableAttributes`, `pendingActionKinds` and `eventType`. On the platform path, the new `accounts.listRequests(request, ctx)` hook serves the caller's requests as `account_requests[]` and `account_requests_pagination` on `list_accounts` when the buyer sends `include_requests`, `request_ids` or `requests_pagination`. Fixes #3575. |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Medium: The
account_requestsemission is gated by the buyer's request fields but not by the served release.filterCapabilitiesForToolAvailabilitydeliberately hidesaccount.requestsfrom capabilities on pre-3.3 releases, yet this handler emitsaccount_requestswhenever the buyer sendsinclude_requests/request_ids/requests_paginationat any release. Production defaults tovalidation: 'off'(create-adcp-server.ts:5732-5733), so a buyer pinned to 3.2 that sends those fields gets a 3.3-only feature on a 3.2 wire response — the exact asymmetry the capability gate exists to prevent.ctx.servedAdcpVersionis available and the file already gates other 3.3 behavior withisAdcpVersionAtLeast(servedAdcpVersion, '3.3.0-beta.0')(L1993); gate this call the same way, and add a test that a 3.2list_accountswithinclude_requestsreturns noaccount_requests. (Same unconditional-emission pattern applies toAccount.revisionintoWireAccount, lower impact.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8f7ac80.
listRequestsnow runs only whenisAdcpVersionAtLeast(ctx.servedAdcpVersion, '3.3.0-beta.0')holds. Below 3.3,account_requestsandaccount_requests_paginationare never emitted, whatever request fields the buyer sends.Account.revisionis now removed fromlist_accountsrows served to a release before 3.2. When no served version is known, rows keep it, which is the existing behavior.list_accountscall each sendinclude_requests,request_idsandrequests_paginationwith validation off. Neither getsaccount_requests, andlistRequestsis never called.revisionappears at 3.2 but not at 3.1. A 3.3 call still gets its requests.