REQ-NFR-070

Cost amounts stored as fixed-precision integer cents, never float

ID
REQ-NFR-070
Category
Non-Functional Requirements
Status
approved
Priority
P0
Created
2026-05-11T18:34:00.000Z
Approved
2026-05-11T18:37:00.000Z
Updated
2026-05-11T18:37:00.000Z

What

Every monetary amount in budget_allocation, cost_baseline_allocation, and cost_ledger SHALL be stored as a signed 64-bit integer representing cents (or the equivalent minor unit for the base currency). Float / double representation is forbidden for monetary fields.

Why

Float arithmetic on money introduces silent errors and breaks the determinism guarantee in REQ-NFR-069. established project management guidelines + every accounting tradition requires exact decimal arithmetic.

How

Postgres BIGINT columns; ORM-level type wrapper exposing Decimal in application code; lint rule in CI flags float arithmetic on monetary variables; OpenAPI schema documents amounts as integer cents.

Done when

Schema review confirms all monetary columns are BIGINT; lint rule active; round-trip of 1234567 cents -> $12,345.67 in UI -> 1234567 cents preserves exactness.

Out of scope

Currencies with three-decimal minor units (deferred with multi-currency).

established project management guidelines Mapping

Primary Knowledge Area
Cost Management
Secondary KAs
Quality Management
Primary Process Group
Planning
established project management guidelines Deliverable
Cost Management Plan

Precision NFR for monetary storage - foundational to established project management guidelines Cost Management.