feat(#224): multi-region live pricing sync + sync-pricing CLI; seed is test-only - #227
Merged
Conversation
…s test-only Live pricing was single-region and unreachable from the CLI: sync_pricing_catalog hardcoded region="us-east-1", and the only pricing command was `seed-pricing` (offline test fixtures). Pricing should come live from Infracost and cover all services and all regions; the seed is a test fixture, not a user step. - sync_pricing_catalog(..., regions=None): fetch every descriptor for each requested region (defaults to us-east-1 for back-compat). Failures are tagged with the region. - New `sync-pricing` CLI command — the normal way to populate prices — defaulting to ALL known regions (or `--region` repeatable). Requires an Infracost credential; falls back to seed + warns without one. - Reframe `seed-pricing` as testing/offline only in its help text. - Docs: README gains a "Pricing data" section pointing at `sync-pricing` and stating the seed is a test-only fixture; DESIGN_PRINCIPLES reworded so the seed is described as a fixture/offline fallback, not a setup step. Tests: multi-region sync fans out per region (+ us-east-1 default); `sync-pricing` defaults to all known regions and honors explicit --region. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…erstatement) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Closes #224. Makes live Infracost pricing the source of truth, covering all services and all regions, and stops presenting the bundled seed as a user step.
Problem
sync_pricing_cataloghardcodedregion = "us-east-1"— single-region only.seed-pricing(offline test fixtures); there was no command to trigger the live Infracost sync, so live/multi-region pricing was effectively unreachable in the product flow.Changes
sync_pricing_catalog(..., regions=None)fetches every descriptor for each requested region (defaults tous-east-1for backward compatibility; failures are tagged with the region).sync-pricingCLI command — the normal way to populate prices — defaults to all known regions (or--regionrepeatable,--vendor). Requires an Infracost credential (INFRACOST_API_KEY/infracost auth login); falls back to seed + warns without one.seed-pricingreframed as testing/offline-only in its help text.sync-pricingand stating the seed is a test-only fixture;DESIGN_PRINCIPLES.mdreworded so the seed is a fixture/offline fallback, not a setup step.Test plan
sync_pricing_catalogfans out across multiple regions (and defaults to us-east-1 when unspecified).sync-pricingCLI defaults to all known regions and honors explicit--region.Follow-ups tracked separately: #223 (wire the catalog to models via a logical↔catalog metric mapping — today models still fall back to
pricingRates), #225 (NAT Gateway live descriptor).