Skip to content

ReportingStatusHandler ignores max_results; validator node cap refuses a server's own large responses #1966

Backlog

Description

@rachitm022

Two SDK problems surfaced on staging by a seller (embedded-sales-agent, worked around in scope3data/embedded-sales-agent#1362).

1. ReportingStatusHandler ignores the buyer's page size and never bounds a page by size

get_reporting_status (view periods) is served in a fixed page of 100 records. pagination.max_results (schema: min 1, max 100, default 50) is ignored. Each record names every media buy in its delivery-config generation, so an obligation of an 80-buy generation is ~350 JSON nodes and a revision ~290. A single staging page of 69 records rendered to 11,671 nodes and was refused by the SDK's own 10,000-node response validation.

Expected:

  • honour pagination.max_results within the schema's bounds and default;
  • also bound each page by rendered size, so a page stays under a safe fraction of the validator's node limit; the cursor continues the walk under the same ledger_snapshot_id (a shorter page is a correct step);
  • a public, supported way to set the page size / size budget, so sellers don't reach into ReportingStatusHandler._page_size.

2. The 10,000-node validator cap refuses a server's own valid responses

adcp.validation.schema_validator._MAX_PAYLOAD_NODES = 10_000 was added (PR #256 review) to bound CPU when walking hostile or accidentally huge payloads. It is applied by the server dispatcher to the seller's own responses, before and after version conversion. A legitimately large valid response (get_media_buys, list_accounts, get_reporting_status on staging) is refused outright and the buyer gets nothing.

Expected: keep the cap on inbound requests and on buyer-side parsing of untrusted responses; on the server's own outbound responses, don't refuse a valid response for size alone, while still guaranteeing either schema validation or a loud signal. Expose a public node-count helper/limit so sellers don't import private names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    no-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions