Skip to content

fix: harden asa metrics transport and surface limits - #26

Merged
adressop6789-max merged 5 commits into
mainfrom
fix/asa-metrics-horizon-and-transport
Sep 10, 2026
Merged

adressop6789-max merged 5 commits into
mainfrom
fix/asa-metrics-horizon-and-transport

Conversation

@adressop6789-max

Copy link
Copy Markdown
Collaborator

From a customer's full-account review (160 campaigns, ~17.9k keywords) driven from an AI agent.

Wrong numbers, silently

  • asa metrics now warns when a requested --by-days window is past meta.max_valid_day. Cohort metrics report what has happened so far, so a window the cohort has not lived through repeats the last real figure — that cost the customer a published ROAS understated by a third.

Transport

  • A 2xx with an unparseable body raised TypeError: Cannot read properties of undefined. It now says the response was cut short and nothing was read.
  • The rate-limit retry notice is suppressed under --json, so agents that merge streams still get parseable output.
  • A dropped GET retries once; writes keep retrying only under their idempotency key.

Docs
Rate budgets and the breakdown-row cap are per company — asa whoami now reports the effective ones instead of the docs hardcoding a number that goes stale. Also documented: money is in account currency (spend and local_spend are the same figure), and meta.pagination.count is the inventory, not the row count on a page.

199 tests pass.

…on-and-transport

# Conflicts:
#	package.json
…on-and-transport

# Conflicts:
#	src/commands/asa/ad-groups/create.ts
#	src/commands/asa/ad-groups/get.ts
#	src/commands/asa/ad-groups/list.ts
#	src/commands/asa/ad-groups/update.ts
#	src/commands/asa/ads/create.ts
#	src/commands/asa/ads/get.ts
#	src/commands/asa/ads/list.ts
#	src/commands/asa/ads/update.ts
#	src/commands/asa/apps/list.ts
#	src/commands/asa/automations/create.ts
#	src/commands/asa/automations/get.ts
#	src/commands/asa/automations/list.ts
#	src/commands/asa/automations/run.ts
#	src/commands/asa/automations/runs.ts
#	src/commands/asa/automations/update.ts
#	src/commands/asa/campaigns/bulk-create.ts
#	src/commands/asa/campaigns/bulk-list.ts
#	src/commands/asa/campaigns/bulk-status.ts
#	src/commands/asa/campaigns/create.ts
#	src/commands/asa/campaigns/get.ts
#	src/commands/asa/campaigns/list.ts
#	src/commands/asa/campaigns/update.ts
#	src/commands/asa/competitors/summary.ts
#	src/commands/asa/connect.ts
#	src/commands/asa/creatives/list.ts
#	src/commands/asa/keywords/add.ts
#	src/commands/asa/keywords/list.ts
#	src/commands/asa/keywords/update.ts
#	src/commands/asa/metrics/index.ts
#	src/commands/asa/metrics/overview.ts
#	src/commands/asa/negative-keywords/add.ts
#	src/commands/asa/negative-keywords/list.ts
#	src/commands/asa/orgs/list.ts
#	src/commands/asa/product-pages/list.ts
#	src/commands/asa/product-pages/sync.ts
#	src/commands/asa/search-terms/list.ts
#	src/commands/asa/whoami.ts
#	src/lib/api-client.ts
#	src/lib/asa-client.ts
#	src/lib/asa-schemas.ts
#	test/commands/asa-reads.test.ts
#	test/commands/asa-writes.test.ts
#	test/commands/asa.test.ts
@adressop6789-max
adressop6789-max merged commit 9fcb7a0 into main Sep 10, 2026
4 checks passed
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