Skip to content

Audit cost accumulation for accuracy — include EBS, public IPv4, etc. across all instance states #51

Description

@scttfrdmn

Summary

Audit and harden spored/spawn cost accounting so the reported cumulative cost reflects all charges attached to an instance, in every lifecycle state.

Concern

Today cost is driven by spawn:price-per-hour (compute on-demand rate) plus an EBS hourly estimate (spawn:ebs-hourly-cost). It's unclear this captures everything, or that it's correct across states:

  • Compute — billed only while running (not stopped/hibernated/terminated). ✓ mostly handled, but verify hibernate (RAM-to-EBS) is treated as not-billing-compute.
  • EBS volumes — billed while running and stopped and hibernated (until terminated). Verify the EBS hourly figure covers the actual provisioned volumes (root + any extra), not a guess, and that it's counted in stopped/hibernated states.
  • Public IPv4 — AWS now charges ~$0.005/hr per public IPv4 including while attached to a running instance (since 2024-02). Likely not currently counted. Significant for long-lived instances.
  • Hibernation — the EBS that holds the RAM image is larger; verify it's accounted.
  • Other — provisioned IOPS/throughput (gp3 > baseline, io2), snapshots created by the instance, NAT/data transfer (probably out of scope, but state so).

Asks

  1. Enumerate every cost component attached to a spawn instance and confirm whether each is currently accounted.
  2. Verify per-state correctness: running / stopped / hibernated / terminated each bill a different subset — the cumulative figure must switch components on/off by state.
  3. Add the public IPv4 hourly charge (it's per-IP-hour whenever a public IP is assigned).
  4. Make the EBS figure reflect actual provisioned volumes (size, type, IOPS/throughput), not an estimate, once known.
  5. Document the cost model (what's included, what's explicitly excluded) so spawn status cost is trustworthy.

Context

Cost accuracy is core to this project's value (ephemeral infra + honest cost reporting). spored status already prints a cost breakdown with a "* estimates" disclaimer — this audit is to tighten it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:costcost estimation, budgets, accountingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions