Issue #2946: Proof figure fell between 0.0.1563 and 131fd2e5: unbounded args[N] in the chain-loop emission, lost parameter facts in emit_core_args

Open and answer this issue on GitHub.

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

The async driver reported PROVED FELL 131fd2e5: indexes -0.36 points, operations -0.21 points since 0.0.1563 c51f75c7.

Measured

Measured with nikaia lower-std --bounds --asserts, then scripts/proved.nika, at both ends:

Per-file changes:

file c51f75c7 131fd2e5
emit_core_calls.nika indexes 79/86 86/109 (+16 unproved)
emit_core_args.nika indexes 45/49 40/49 (5 proved sites lost, no new indexes)
emit_stmt.nika operations 20/35 20/40 (+5 unproved)
bounds_proven.nika operations 0/0 0/2
bounds_walk.nika operations 47/144 47/146

Cause 1: new args[0] / args[1] reads with no bound (emit_core_calls.nika)

These come from the io::lines chain-loop emission (ADR-chain-loop-v1 D6/D7). All 16 sites give “no fact bounds what it reads”:

Example: the count/collect/join/fold/nth emission calls emit_core_argument(..., args[0], ...) with no length fact on args.

Cause 2: old sites in emit_core_args.nika lost their proof

The text of these sites did not change in the range. At 131fd2e5 they are:

They now give one of two reasons:

Sites 719/776/802 stand under an explicit i < x.len() guard. That points at the prover or the derivation, not at a missing guard.

Candidates in the range:

To build

  1. Measure at the candidate commits and their parents. Find the commit after which 719/776/802 are no longer proved, and fix the prover or derivation so a guarded index is proved again. Add a test: a guarded index in a function called from another file of the package.
  2. Give the chain-loop emission in emit_core_calls.nika a bound on args. This can be a precondition or a length check where the method’s arity is settled. Do not use a workaround.
  3. Find the 5 new unproved operations in emit_stmt.nika and fix them the same way.

Done when

scripts/proved.nika at the fix shows indexes and operations no lower than at c51f75c7, per file, for emit_core_args, emit_core_calls and emit_stmt.

Back to Open Issues