fix: harden asa metrics transport and surface limits - #26
Merged
Merged
Conversation
…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
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.
From a customer's full-account review (160 campaigns, ~17.9k keywords) driven from an AI agent.
Wrong numbers, silently
asa metricsnow warns when a requested--by-dayswindow is pastmeta.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
TypeError: Cannot read properties of undefined. It now says the response was cut short and nothing was read.--json, so agents that merge streams still get parseable output.Docs
Rate budgets and the breakdown-row cap are per company —
asa whoaminow reports the effective ones instead of the docs hardcoding a number that goes stale. Also documented: money is in account currency (spendandlocal_spendare the same figure), andmeta.pagination.countis the inventory, not the row count on a page.199 tests pass.