Skip to content

Pricing: keep the cost and profile figures current (spot, the default runner types, the profiles) #118

Open

Description

@aledbf

The pricing tool (tools/pricing → src/data/pricing.json, src/lib/pricing.ts) prices three on-demand scenarios from AWS's price lists, refreshed by the daily sync. The figures added in #115 and #117 aren't covered, so they will go stale:

  • Spot. The Cost page's 30-day spot ranges (median, low, high per type and region, to 2026-11-19) are typed in. Spot is the runners' default, and its price moves daily per zone.
  • The default runner types. The scenarios price the module's defaults on demand; the runners are spot c8id/m8id/r8id 8xlarge-12xlarge with local NVMe, and the d-variants cost 18-23% more than their EBS-only versions.
  • The profiles (Profiles page: one person, one person with agents, ~5, 20-25, ~100) are dollars typed in from a model: us-east-1, 2026-11-19, spot at its 30-day median, 8 workspaces per runner assumed.
  • The smaller fixed parts in pricing.ts (IPv4, gp3, KMS, Route 53) are constants read on 2026-11-19.

Proposal

  1. tools/pricing also records spot: a 30-day median and range per type and region. AWS's spot price history needs credentials (ec2:DescribeSpotPriceHistory, read-only); the public spot pricing feed has one figure per region without zone or statistic. Decide which, and where the sync gets credentials if it's the API (an OIDC role with only that permission).
  2. Price the runner types the module's attributes actually resolve to (runner_vcpus, local storage), not a single type.
  3. Move the profiles into the tool as scenarios (Scenario already has the shape): hours per day, workspaces at the peak, runners from an assumed density, spot or on-demand. Then Profiles and Cost draw them, and the daily sync updates them.
  4. Fetch the smaller unit prices from the price lists too, instead of constants.
  5. Keep the assumptions visible next to the numbers: density is unmeasured (spin-machine#273), so a scenario shows a range over 4-16 workspaces per runner.

Done when task pricing writes every dollar figure on Cost and Profiles, task reference:check fails on a figure typed into a page that the tool should own, and the pages show the date of the prices they use.

🤖 Generated with Claude Code

Activity

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions