Issue #2991: nikaia.proofs: a trace per walked function, so a book-alone walk is adopted without a replay and loses no proof; –search-unproved

Open and answer this issue on GitHub.

ready · opened 2026-11-30 · updated 2026-11-30 · 0 comments

Why. “Keep only results in nikaia.proofs: the bounds walk adopts a check’s entry” (#2971) adopts a walk that used the book alone after a second walk (bp_walk_alone) replays it.

It is also the likely cause of two other failures:

Decision. ADR-270 D19, amended by the owner on 2026-11-30 (commit cd041b3ae):

To build in Nikaia: bounds_proven.nika, bounds_walk.nika, and the book’s reader and writer.

  1. Hash the questions. Hash the key of every question the walk asks, in order, as a running SHA-256 per function (bp_walk_adopted / ask_in).
  2. Book format. Read and write trace lines in the book (# nikaia.proofs 2, sorted with the entries). Prune the ones no walk matched.
  3. Adoption.
    • If the book-alone walk’s digest is in the book, adopt it.
    • Otherwise run BP_SEARCH on that function and write its trace.
    • Remove what the trace makes redundant: the bp_walk_alone replay, its rounds, and the BP_KEEP_ALL fallback.
  4. The flag. Add --search-unproved to nikaia build, check and test, and pass it through to the walk.
  5. Tests in tests/compiler/tests/:
    • a call precondition the search did not prove stays unproved after a rebuild from the book;
    • a rebuild from the book asks no solver question;
    • from an empty book, one build is the fixpoint: a second build changes nothing;
    • --search-unproved finds a proof that a stale trace skipped.
  6. Measure with the work gate. benches/work.baseline is not raised (owner, 2026-11-30). The figures should fall back to about the old ones.
  7. Ledgers. Regenerate the ledgers. Check that packages/yaml, packages/logic and benches/lowering are fresh after one build.

Done when

Then “Keep only results in nikaia.proofs: the bounds walk adopts a check’s entry” (#2971) and #2986 close.


Generated by Claude Code

Back to Open Issues