Rules / TAU-H001
Release builds check integer overflow
Why
Integer overflow panics in debug builds but silently wraps in release builds unless overflow-checks is on. The arithmetic lints cover the source tauten scans; this setting covers everything compiled in the workspace, dependencies included. The decision is proved (tauten_check_kernel::manifest::hardening): a setting tauten cannot read is never clean. A project that will not set it workspace-wide (dependencies compiled with checks) can set [profile.release.package.<kernel-crate>] overflow-checks = true; tauten does not check that and it is not equivalent: rustc compiles generic and #[inline] functions of that crate with the setting of the crate that instantiates them (measured, #88), so only its non-generic, non-inlined functions trap. Limits: it covers binaries built from this workspace, not downstream users of a library crate (their own profile decides), and an environment override (CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS) or a Cargo config outside the workspace (for example ~/.cargo/config.toml) at build time is not seen.
Fix
Add overflow-checks = true under [profile.release] in the workspace Cargo.toml (cargo tauten init --write does), and remove any [profile.release.package.<name>] or .cargo/config.toml entry that sets it to false.
In the terminal
cargo tauten explain TAU-H001$ cargo tauten explain TAU-H001
TAU-H001: Release builds check integer overflow Why: Integer overflow panics in debug builds but silently wraps in release builds unless `overflow-checks` is on. The arithmetic lints cover the source tauten scans; this setting covers everything compiled in the workspace, dependencies included. The decision is proved (tauten_check_kernel::manifest::hardening): a setting tauten cannot read is never clean. A project that will not set it workspace-wide (dependencies compiled with checks) can set `[profile.release.package.<kernel-crate>] overflow-checks = true`; tauten does not check that and it is not equivalent: rustc compiles generic and `#[inline]` functions of that crate with the setting of the crate that instantiates them (measured, #88), so only its non-generic, non-inlined functions trap. Limits: it covers binaries built from this workspace, not downstream users of a library crate (their own profile decides), and an environment override (`CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS`) or a Cargo config outside the workspace (for example `~/.cargo/config.toml`) at build time is not seen. Fix: Add `overflow-checks = true` under `[profile.release]` in the workspace Cargo.toml (`cargo tauten init --write` does), and remove any `[profile.release.package.<name>]` or `.cargo/config.toml` entry that sets it to false. Decided by: TautenDecides: Release builds of the workspace check integer overflow.Sees: manifest; complete: yesDoes not see: Settings outside the workspace manifests (environment variables, Cargo configs outside the workspace). Downstream builds of a library crate.Applies to tests: yesExceptions allowed: with #[expect(.., reason)] kernel deny core deny edge deny