Open and answer this issue on GitHub.
blocked, safety · opened 2026-11-22 · updated 2026-11-22 · 0 comments
Finds wrong proofs and lost refusals the suite’s own programs do not reach: generated programs run under debug assertions, and variants of the raw-sink tests that must stay refused. Found while reviewing pull request #2448 (a change to the raw-sink walk that the tests did not catch until two were pinned: commits “Pin: a join under a root from outside stays a raw sink” and “Pin: a call that is handed the list keeps the checks of a loop over its length”). Part of ADR-proof-kani-v1 Needs #2726
A change that makes the prover drop a check it may not drop, or makes the raw-sink walk pass a part it may not pass, is found by a tool before review, not only by a test someone thought to write. Two tools, both run by hand or by the main-only run, never in the develop CI.
ADR-proof-kani-v1 D7 (the debug-assertions build on main) and D8 (what fails is a prover defect, filed with the program). ADR-raw-sinks-1 D2-D6, D11, D13, D14 (what is a raw sink and what passes it; NK1308, “data from outside the program at a raw sink”). ADR-306 D19 (the dropped check stays as a debug_assert!).
proven::read (and siblings) whose debug_assert! stops with “a proved index is outside: {at} of {len}” (crates/unsafe/proven-index/src/lib.rs, read and write); in a build without debug assertions nothing checks it.CARGO_ENCODED_RUSTFLAGS and unsets RUSTFLAGS (project_drive.nika, the function that builds the cargo environment); whether the precompiled std follows is what #2720 measures and #2726 item 1 builds.NK1308 in their .stderr (grep -l NK1308 tests/compiler/tests/*.stderr); each is one shape of a raw sink with outside data.scripts/; the fuzzing issues filed (#2556, #2540) fuzz the unsafe crates and the regex engines, not the prover.scripts/prover_fuzz.nika, run as nikaia run scripts/prover_fuzz.nika -- --seed S --count N, writes N small programs from a seed, each a main with a list and a loop over it in one of the shapes the prover proves bounds for: an index by the loop variable over len, i + 1 and i - 1 with and without a guard, a while with its own counter, nested loops over two lists, a list grown or shrunk inside the loop, the list handed to a call inside the loop, a slice of it. Sizes and offsets come from the seed. Each program is built and run under -C debug-assertions=on through the same driver the suite uses; a program that stops with “a proved index is outside” is written to target/prover-fuzz/ with its seed and printed. The builder chooses the generator’s grammar beyond these shapes. Test: a run with a fixed seed and a small count prints the same program names each time, in the tests’ form the builder chooses (.stdout beside it).scripts/raw_sink_variants.nika reads each test whose .stderr expects NK1308, writes variants that keep the outside part at the sink: the part bound to a name first, moved into a helper function that hands it back, split from an f-string into +, passed through a call the compiler reads, and the guard moved to a value other than the one joined. Each variant is checked with nikaia check; a variant without NK1308 is printed with the test it came from and is a defect of the walk (ADR-proof-kani-v1 D8 by analogy: filed with the program, never answered by changing the test). Test: run over one of the 19 tests, its variants listed in a .stdout, each still reported NK1308.Done when nikaia run scripts/prover_fuzz.nika -- --seed 1 --count 200 and nikaia run scripts/raw_sink_variants.nika each run to the end on develop and print what they found (or that they found nothing), and each item’s test passes; item 2’s commit carries Fixes #N. Each program or variant found is a Found: line in the report with its seed or source test, never a new issue number.
Supervisor: decide whether the main-only workflow of #2726 runs the two tools after the suite.
scripts/prover_fuzz.nika and scripts/raw_sink_variants.nika and their tests; writes only under target/.main.Generated by Claude Code