Problem
GetCosts returns ProviderCost with Currency hardcoded to "USD" even though the BigQuery billing record struct parses a currency field. A EUR/GBP-billed GCP account is reported with foreign-currency amounts mislabeled USD, and the aggregator sums into a USD grand total with no normalization, compounding the error.
Where
internal/cost/gcp_provider.go:91
internal/cost/gcp_provider.go:101
internal/cost/aggregator.go:91
internal/cost/aggregator.go:168
Root cause
Parsed currency is never propagated to ProviderCost.Currency, and the aggregator does unit-agnostic summation with a hardcoded USD label.
How to fix
Propagate the parsed currency into ProviderCost.Currency and normalize/flag mixed currencies in internal/cost/aggregator.go before summing.
Acceptance criteria
clanker cost against a non-USD GCP billing export reports the correct currency for the GCP line item and does not silently add it to USD totals.
Severity: low · from holistic hardening review.
Problem
GetCosts returns ProviderCost with Currency hardcoded to "USD" even though the BigQuery billing record struct parses a currency field. A EUR/GBP-billed GCP account is reported with foreign-currency amounts mislabeled USD, and the aggregator sums into a USD grand total with no normalization, compounding the error.
Where
internal/cost/gcp_provider.go:91internal/cost/gcp_provider.go:101internal/cost/aggregator.go:91internal/cost/aggregator.go:168Root cause
Parsed currency is never propagated to ProviderCost.Currency, and the aggregator does unit-agnostic summation with a hardcoded USD label.
How to fix
Propagate the parsed currency into ProviderCost.Currency and normalize/flag mixed currencies in internal/cost/aggregator.go before summing.
Acceptance criteria
clanker cost against a non-USD GCP billing export reports the correct currency for the GCP line item and does not silently add it to USD totals.
Severity: low · from holistic hardening review.