---
title: "Verify exported aggregates follow the rounding policy"
description: "Check a sandbox report with fractional measures, comparing row-level values and totals against a documented rounding policy using independent arithmetic."
canonical_url: "https://vostride.com/agent-library/reporting-exports/aggregate-rounding-reconciliation.md"
md_url: "https://vostride.com/agent-library/reporting-exports/aggregate-rounding-reconciliation.md"
content_kind: "recipe"
topic: "reporting-exports"
---

# Verify exported aggregates follow the rounding policy

Check a sandbox report with fractional measures, comparing row-level values and totals against a documented rounding policy using independent arithmetic.

## Risk

Summing displayed rounded rows may legitimately differ from rounding an exact aggregate. The product must define which result it promises; a carefully chosen fixture distinguishes those policies and exposes accidental binary or double rounding.

## Fixtures

- An owned sandbox measurement report with synthetic fractional values chosen so sum-of-rounded and rounded-sum results differ.
- An explicit product precision and rounding specification for detail rows and aggregates, including treatment of negative values.
- An independent exact-decimal oracle and artifact parser; the fixture involves measurements rather than real financial transactions.

## Steps

1. Open the report and verify the fixture record identifiers and selected precision setting before exporting.
2. Compare the visible detail rows and aggregate with independently calculated expected values under the documented policy.
3. Export the report and parse its numeric cells, verifying both underlying precision and displayed representation when the format preserves them.
4. Reconcile the exported total with the independent exact-decimal computation and verify negative controls follow the same specified rounding rule.

## Expected results

- Row and aggregate values each follow their documented precision and rounding contract.
- The exported total matches independent decimal arithmetic for the fixture.
- Negative and positive values are treated consistently with the specified tie-breaking rule.

## False-pass traps

- Using the application aggregate endpoint to calculate the expected total reuses the implementation under test.
- An integer-only dataset cannot reveal double-rounding or fractional precision errors.

## Cleanup

- Delete the disposable report artifact and restore its precision setting.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa test](/docs/agent-qa/configuration/test.md)

- [Reporting and export QA recipes](/agent-library/reporting-exports.md)
- [Software factory QA library](/agent-library.md)
