Skip to content

feat(#224): multi-region live pricing sync + sync-pricing CLI; seed is test-only - #227

Merged
elecnix merged 2 commits into
mainfrom
feat/224-multiregion-sync
Jul 3, 2026
Merged

feat(#224): multi-region live pricing sync + sync-pricing CLI; seed is test-only#227
elecnix merged 2 commits into
mainfrom
feat/224-multiregion-sync

Conversation

@elecnix

@elecnix elecnix commented Jul 3, 2026

Copy link
Copy Markdown
Owner

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_catalog hardcoded region = "us-east-1" — single-region only.
  • The only pricing CLI command was 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

  • Multi-region sync: sync_pricing_catalog(..., regions=None) fetches every descriptor for each requested region (defaults to us-east-1 for backward compatibility; failures are tagged with the region).
  • sync-pricing CLI command — the normal way to populate prices — defaults to all known regions (or --region repeatable, --vendor). Requires an Infracost credential (INFRACOST_API_KEY / infracost auth login); falls back to seed + warns without one.
  • seed-pricing reframed 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.md reworded so the seed is a fixture/offline fallback, not a setup step.

Test plan

  • sync_pricing_catalog fans out across multiple regions (and defaults to us-east-1 when unspecified).
  • sync-pricing CLI defaults to all known regions and honors explicit --region.
  • Full suite: 903 passed locally.

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).

elecnix and others added 2 commits July 3, 2026 12:10
…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>
@elecnix
elecnix marked this pull request as ready for review July 3, 2026 16:14
@elecnix
elecnix merged commit 0496ec7 into main Jul 3, 2026
3 checks passed
@elecnix
elecnix deleted the feat/224-multiregion-sync branch July 3, 2026 16:14
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.

pricing: sync + seed are us-east-1 only — no multi-region pricing

1 participant