From 724edc61f30be9d55b5853e899f1a14c06b0b4a9 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Mon, 9 Nov 2026 17:32:57 -0700 Subject: [PATCH] fix(build): the shipped program checks integer overflow, as the tested one does The release profile left overflow-checks off, so an integer that overflows wrapped silently in the program that ships and panicked in the build the tests run: the tests were checking a program nobody runs. Money itself is Decimal and goes through the kernel's checked arithmetic; this covers the integers around it (counts, sequence numbers, minor units, lengths). Checked: a release build passes -C overflow-checks=on to the workspace's crates and to their dependencies. Co-Authored-By: Claude --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 2d380a24..236566d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,3 +35,9 @@ opt-level = 3 # AppImage, .deb and .rpm are not carrying debug tables. [profile.release] strip = "symbols" +# The shipped program refuses the way the tested one does. Without this an +# integer that overflows wraps silently in a release build and panics in +# a test build, so the tests would be checking a program nobody runs. +# Money is Decimal and goes through the kernel's checked arithmetic; this +# covers the integers around it (counts, sequence numbers, minor units). +overflow-checks = true