Fix proposal (read-only investigation, 2026-10-26). Not built: billing is sensitive, so this waits for Paul's go.
Which numbers are wrong
Every compute meter is attributed by matching a sampled unit (carlos-exec@<host>, carlos-app@<host>.service) against the console box's own registry (unitOwner → routeForUnit, internal/console/economicspass.go). A unit with no local route is charged to the ops account (bab) as platform overhead. That affects:
- Statements (
statementsPass, hourly, create-or-replace for the month to date):instance_hours,cpu_core_hours,mem_gb_hours. - Plan caps: the awake-hours cap reads
instance_hoursfrom the statement (monthMeters,planmeasure.go), so a remote tenant's awake hours never count against its cap. - Census (
censusPass, daily, create-only):appsandroutesper account, which feedapp_months. - The economics page (
LoadEconomics→sweepUsagewithloadRoutesForEconomics) andcarlos status --instances, both live reads.
Correct as they are: egress, requests and backhaul (each edge row carries its own account), storage (bucket prefix), fleet box-hours, and the running-things cap (it counts records).
It is worse than "remote tenants". The statement re-sweeps the whole month against today's routes, so moving a tenant off the console box also wipes the compute it used on the console box earlier in the month. Flagship October, from the metrics day rollups:
| | instance-hours | core-hours | mem GB-hours | |---|---|---|---| | bdn on annie, 1-21 Oct (before the UK move) | 738.2 | 0.29 | 55.4 | | bdn on iris, 21-26 Oct | 7.0 | 0.00 | 0.4 | | bdk on annie | 1.5 | 0.00 | 0.0 |
bdn's October statement (usage/accounts/bdn/2026-10.json, updated 17:38Z today) has no instance_hours, cpu_core_hours or mem_gb_hours at all. All 745 hours sit in bab's. September's statement (1849.5 instance-hours) is right, because bdn was on annie all month. Census: bdn is missing from every census day since 2026-10-22 (it was apps 9, routes 12 up to the 21st), so bdn's October app_months reads 5.84 instead of about 7.5. barbara has no metered tenant time in October (au.bdk slept all month).
Where the right data is
- Instance and sidecar records (
apps/<sqid>/<app>/{instances,sidecars}/<host>.json): region-neutral, and they outlive a move. A unit's name is derived from its host (activator.UnitName,ExecName), so records map unit → account/app on any box. Read through the record view snapshot (change index, armed on flagship), they cost no new requests. - Box reports through the
remoteFactsaccessor (pageBoxReports, cached 60 s): the account and app of every host a box serves, for hosts with no record (apex mints, hand routes). Per box, so the box that sampled the unit decides. - The console box's registry stays as the last source, for named units (
console.service) and local hand routes.
The change
- A
unitAttributionbuilt once per pass: local registry rows with a namedUnitfirst, then records, then fresh box reports for the sampling box, then the ops fallback.sweepUsage,unitOwnerandhandleAPIStatusInstancestake it instead of[]registry.Route. censusPasscounts per account from records, plus local rows that no record covers (deduplicated by host).- Remove the "single-box today, so inert" comments (
apistatusinstances.go,economicspass.go) and the matching limit note indocs/site/cli.md.
Size: about 200 lines of console code and 250 of tests, all in internal/console. No box change, no new polling. One Astra review (billing is a gate under the stopping rules).
Decision for Paul
Statements are month-to-date and create-or-replace, so the first hourly pass after the release rewrites October: bdn gains about 745 instance-hours, bab loses the same. Nothing is invoiced from statements today; they feed the economics page and the awake-hours cap. Options:
- (a) Recommended: let the open month correct itself, and leave closed months as written (September and earlier are right anyway).
- (b) Apply the new attribution only from a cutover date, so October keeps today's split. This needs extra code, and it keeps a known-wrong number.
- Separately, whether to backfill the create-only census days 2026-10-22 to 2026-10-26 (it is a one-off rewrite of five objects, so it needs approval).
Check before the roll: if bdn's or bdk's plan has an awake-hours cap, the corrected statement could cross a warning threshold mid-month.