mise run test-rust (mise.toml:141-146) runs cargo nextest run three times, always in the test profile, and nothing else in mise.toml or .github/workflows/ci.yml passes --release. [profile.release] (Cargo.toml:97-99) does not set debug-assertions, so it defaults off.
The consequence: a #[cfg(not(debug_assertions))] test is compiled out of every build CI makes, and therefore never runs.
There are three such tests today, all in capsule-i18n/src/format.rs, and all of them pin production behaviour rather than debug behaviour:
release_builds_pass_the_construct_through_unchanged — a refused ICU construct is copied through verbatim instead of crashing a release build on a catalog it could previously render badly.
release_builds_render_the_first_arm_of_a_plural_with_no_other — a malformed plural still renders text.
release_builds_pass_a_too_deeply_nested_plural_through.
Each has a #[cfg(debug_assertions)] #[should_panic] twin that CI does run, so the assertion is covered and only the pass-through is not. That split is deliberate — the whole design of the refusal is "loud in debug, harmless in release" — but it only means something if both halves are executed somewhere.
This also caught a real failure once: before #414, an_unrenderable_icu_construct_is_refused_in_debug_builds was #[should_panic] with no cfg gate, so cargo test -p capsule-i18n --release failed outright. Nobody noticed, because nobody ran it.
Deliverable: a test-rust-release task (or a --release arm inside test-rust) wired into the CI test job and, if the cost is acceptable, pre-push. Note nextest and --release compile a second copy of the workspace, so the runtime cost is not free — scoping it to the crates that have profile-gated tests is a reasonable answer, provided something fails when a new one appears elsewhere.
Found while landing #414 (slice S-I7); recorded there under Owed-CI.
mise run test-rust(mise.toml:141-146) runscargo nextest runthree times, always in the test profile, and nothing else inmise.tomlor.github/workflows/ci.ymlpasses--release.[profile.release](Cargo.toml:97-99) does not setdebug-assertions, so it defaults off.The consequence: a
#[cfg(not(debug_assertions))]test is compiled out of every build CI makes, and therefore never runs.There are three such tests today, all in
capsule-i18n/src/format.rs, and all of them pin production behaviour rather than debug behaviour:release_builds_pass_the_construct_through_unchanged— a refused ICU construct is copied through verbatim instead of crashing a release build on a catalog it could previously render badly.release_builds_render_the_first_arm_of_a_plural_with_no_other— a malformed plural still renders text.release_builds_pass_a_too_deeply_nested_plural_through.Each has a
#[cfg(debug_assertions)] #[should_panic]twin that CI does run, so the assertion is covered and only the pass-through is not. That split is deliberate — the whole design of the refusal is "loud in debug, harmless in release" — but it only means something if both halves are executed somewhere.This also caught a real failure once: before #414,
an_unrenderable_icu_construct_is_refused_in_debug_buildswas#[should_panic]with nocfggate, socargo test -p capsule-i18n --releasefailed outright. Nobody noticed, because nobody ran it.Deliverable: a
test-rust-releasetask (or a--releasearm insidetest-rust) wired into the CI test job and, if the cost is acceptable, pre-push. Notenextestand--releasecompile a second copy of the workspace, so the runtime cost is not free — scoping it to the crates that have profile-gated tests is a reasonable answer, provided something fails when a new one appears elsewhere.Found while landing #414 (slice
S-I7); recorded there under Owed-CI.