Ledger
Set up
Menu

Financial correctness

A cloud cost is only useful when the path to it survives review.

Ledger treats billing rows as financial evidence. Exact storage, declared authority, deterministic methods, two reconciliation boundaries, immutable publication, and versioned explanations make results reproducible.

StorageExact decimal values

Up to 38 total digits, including 18 after the decimal point. Agent Mode stores an equivalent canonical decimal string, so money never passes through floating-point arithmetic.

RoundingHalf-even at declared boundaries

No ambient float conversion and no hidden display-time recalculation.

CurrencyNever aggregated implicitly

Every reconciliation and Cost Pool retains its billing currency.

EvidenceChecksummed and immutable

Published values retain links to normalized rows and their exact source objects.

A worked result

Why did Amazon EC2 cost USD 8.00?

The answer is not a generated summary. It is a persisted calculation over two normalized records, under a declared basis and authority, with an exact zero reconciliation difference.

Usage chargeUSD9.000000000000000000
Service creditUSD-1.000000000000000000
EffectiveCostUSD8.000000000000000000
Method
focus_dimension_effective_cost_with_adjustments
Authority
provider_adopted
Difference
0.000000000000000000
Evidence
Rows 2 and 3 · SHA-256 verified

Controls

Correctness is enforced at every transition.

The system does not depend on one final total check. Each boundary protects a different class of error.

01

Monetary parsing

Reject exponent notation, non-finite values, unsupported precision, and malformed canonical decimals before persistence.

02

Schema conformance

Validate mandatory fields, conditional relationships, enums, timestamps, currencies, and evidence locations.

03

Conversion reconciliation

Compare every supported cost basis by currency between source evidence and Normalized Charges.

04

Calculation reconciliation

Compare materialized results with the authoritative normalized total under the calculator contract.

05

Atomic publication

Prepare complete results before making one logical billing-period publication current.

06

Immutable explanation

Persist method, version, formula, basis, authority, rounding, and lineage references with the Cost Pool.

Lineage

Move backward from a report without changing systems.

A published amount can be followed through the calculated service cost, evidence links, normalized records, dataset manifest, adapter report, source row, and immutable import object.

  1. ReportService summary
  2. PublicationCost Pool
  3. CalculationMaterialized service cost
  4. ContractNormalized Charges
  5. EvidenceSource object + row

Correction history

Current does not mean rewritten.

When a provider issues a corrected export, Ledger creates a new evidence object, normalized dataset, calculation run, and publication. The previous chain remains inspectable and is explicitly marked as superseded.

PublicationStatusEffectiveCostEvidence
July 2026 / v2CurrentUSD 24.256 rows
July 2026 / v1SupersededUSD 25.005 rows

Evidence for engineering discipline

The contracts are executable.

Financial behavior is covered by adapter conformance fixtures, exact-money boundary tests, PostgreSQL pipeline tests, deterministic golden totals, rollback cases, and browser workflows.

  • SQLite and PostgreSQLDatabase-sensitive monetary and pipeline contracts run against the authoritative production adapter.
  • Golden provider fixturesKnown source shapes and expected totals constrain adapters independently from calculators.
  • Failure injectionPartial ingestion, reconciliation mismatch, and publication rollback are tested as product behavior.
  • Open methodologyADRs document accepted financial, architectural, and provider-specific decisions.

Bring a bill. Keep the audit trail.

Review supported imports