Signal Atlas

Project 08

MarginFlow

Commerce margin · data engineering

Computes contribution margin per order across three engines that must agree — a TypeScript spec, a pure-Python port, and a DuckDB transform.

Three faithful implementations agreed perfectly on a number that was 52.5% too high. The gate proved they matched — never that they were right.

Boxes, packaging material, and pallets arranged in a warehouse.
Real-world context · Guilherme Mendes / Unsplash

01 · Evidence

The result, with the gap left visible.

Contribution margin, GST first. The headline read 3390c until the GST came out of it.

contribution margin · cm-v1 · integer centsgross → contribution
Contribution margin, GST first. The headline read 3390c until the GST came out of it.