Repository navigation
Open
Description
The 2026-11 release quality pass found 24 points, out of 297, where a test can't fail, or can't fail for the reason it exists. Most are fixed or tracked already. This issue is about catching the same shape before merge, plus the few cases on main that no issue tracks yet.
What the sweep found
- An assertion that can never be false: the rejected-download test checks for a notice text that is never produced (#1696), and
kriging_files_huge_coordinates_in_cells_of_their_owncomparescoincident_cell(f)with itself (#2500). Both are fixed in chore(sweep): ui and small-crate fixes from the release quality pass #2651 and chore(sweep): render, map and analysis fixes from the release quality pass #2652. - An assertion only inside
if let Some(..): the curved-text test passes when the label is refused, the very case it was meant to cover (#2260, fixed in chore(sweep): render, map and analysis fixes from the release quality pass #2652). - An oracle too loose to notice the bug:
never_silent_roundtripaccepted any export notice for a change that names no field, and had no clean-input half (fixed in fix(engine): say cut names, unknown project keys and held parameters (#2639, part 1) #2658, under Never silent: losses still not reported with a notice (2026-11 sweep) #2639). The cancellation sweep accepts a lateOkfor every kind and compares 5 of the 9Stepfields (Never hold the window: UI-thread reads and cancellation test fidelity (2026-11 sweep) #2641). - A test that passes by not running: every GDAL source test returns early without GDAL, and no workflow installs it (Developer tooling: GDAL tests in CI, xtask rows rebuilds, CI platform conditions (2026-11 sweep) #2644).
In each case the test arrived in the same pull request as the change it covers, and nothing shows it was ever seen failing.
Not tracked yet
crates/data/src/source/gdal.rs~787 checks that the cache key's hash is stable withassert_eq!(fnv1a(b"rustgis"), fnv1a(b"rustgis")), which holds whateverfnv1areturns.crates/data/src/time.rs~543 comparesadd(f64::MAX, …)with itself, so it checks only that the call doesn't panic.crates/data/src/dxf.rs(reads_entities_blocks_and_hatches,layers_filter_and_crs,polylines_and_polyfaces): four geometry checks sit insideif let Some(Geometry::…)with noelse, so a feature read with no geometry, or with the wrong kind, passes. Most other readers' tests useelse { panic!(…) }.- Five property tests (
analysis/tests/parallel_serial.rs,data/tests/integration/{extent_query_properties,date_properties,reprojection_round_trip}.rs,geom/tests/geodesic_identities.rs) copy the sameenv()helper, so an unparsablePROPERTY_SEEDorPROPERTY_CASESruns the defaults without a word. The copies innever_silent_roundtripandproject_save_roundtripnow panic on a value that isn't a whole number (fix(engine): say cut names, unknown project keys and held parameters (#2639, part 1) #2658). - The DuckDB tests in
crates/data/src/source/duckdb.rs,crates/engine/src/tests.rsandcrates/engine/tests/integration/portable_projects/reload.rsreturn early without DuckDB in the same way as the GDAL ones, and no workflow installs DuckDB either. The switch Developer tooling: GDAL tests in CI, xtask rows rebuilds, CI platform conditions (2026-11 sweep) #2644 proposes could cover both.
Proposal
- Say how the new test was seen failing. For a fix, the pull request's Testing section says that the new or changed test fails without the fix and quotes the failure. For a new check or oracle, it names a change that breaks what it checks and says the test then fails. fix(tiles): harden redirects, picture probes and Earthdata sign-out #1570 did this ("hand mutants … the test failed with the mutant in place"). Add one line to the template's Testing comment and to
docs/contributing.md. This costs one local test run per fix and nothing in CI. cargo xtask test-hygienerefuses an assertion that compares an expression with itself (assert_eq!(a, a),assert_ne!(a, a), same tokens on both sides). It is a spelling check on the tokenizer it already has, with no exceptions to mark. A search ofmainfor this shape finds the two cases above (the third, inkriging_files_huge_coordinates_in_cells_of_their_own, is fixed in chore(sweep): render, map and analysis fixes from the release quality pass #2652).- Fix the cases listed under "Not tracked yet": a fixed expected value for
fnv1a;else { panic!(…) }in the DXF tests; the same panic on a value that doesn't parse in the fiveenv()copies.
Out of scope
- The fixes already tracked in Never silent: losses still not reported with a notice (2026-11 sweep) #2639 (
never_silent_roundtrip, the save round trip's unknown keys), Never hold the window: UI-thread reads and cancellation test fidelity (2026-11 sweep) #2641 (cancellation sweep) and Developer tooling: GDAL tests in CI, xtask rows rebuilds, CI platform conditions (2026-11 sweep) #2644 (GDAL in CI). - A CI job that runs a pull request's new tests against its base commit. Many tests sit in the module they test, and a new test often calls code the base doesn't have, so this would mean a second full build and test run on every pull request.
- Mutation testing (cargo-mutants) in CI. Each mutant rebuilds a crate and runs its tests, which takes minutes for
rustgis-engine. It also mutates only the code under test, not the tests, so a pull request that changes only tests gets no mutants. - Matching notices by code instead of by text. Proposal: give loss notices a kind and a code, then add
--strict#2371 covers it: its second step has the never-silent tests assert the loss code, which tightens the oracles in Never silent: losses still not reported with a notice (2026-11 sweep) #2639.
Metadata
Metadata
Assignees
Labels
No labels
Activity
test(xtask): refuse an assertion that compares an expression with its…