Skip to content

v4.12.0

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Nov 04:28
3f913c6

autoprove reserves the end of its budget for a conclusion phase: it either finishes an already-tested proof or reports a verdict on what remains, instead of spending its last cycles on low-yield search until a limit stops it (Refs #85; autoformalize's per-claim budgets are a follow-up).

Added

  • --conclude-after=N%|Nc|<duration>|0 (default 15%). N% (0–50) reserves from every limited budget, Nc from total cycles only, a duration from runtime only; 0 turns the phase off and keeps the previous behaviour. Per limit L the reserve is 0 if L == 1 else min(max(1, ceil(L × p)), L − 1): with the defaults the conclusion is due at cycle 17 of 20, or after two consecutive stuck cycles of 3. Startup validation errors: a reserve larger than its budget, a duration with unlimited runtime, 0c/0s (use 0), a percentage above 50. Magnitudes are compared as decimal text in the tracker, so an over-long value is refused rather than wrapped by fixed-width arithmetic; the duration bound ceil(runtime / unit) is computed as runtime / unit + (runtime % unit != 0), and a percentage reserve as (L / 100) × p + ((L % 100) × p + 99) / 100, so neither overflows even at a 64-bit budget. With --formalize=auto (per-claim budgets) the phase is off, with a warning unless the value already disables it (0 or 0%). Listed in the command's argument-hint and in MIGRATION.md's autoprove-only flags.

  • The conclusion cycle (cycle-engine § Conclusion Phase). Only tick decides it is due, so at least one proving cycle always runs, and a binding limit is an ordinary stop. The next cycle concludes:

    • finalization, only when exactly one sorry remains and an already-tested candidate still applies to it, verified per File Gate Scope, with no fresh deep search — never under --repair-only, which concludes by synthesis without filling sorries;
    • otherwise synthesis, a verdict ready / fixable / no-credible-path with the best partial patch, the blocker inventory, missing lemmas, unexplored queries, the recommended next command, and cost accounting by phase.

    It ends with the final Replan and one real tick. The mapping: a successful finalization is solved, even on the last available cycle; then a limit reached on that tick; otherwise the new stop_reason: concluded. The runtime reserve is best-effort and stated as such: with the budget already spent, no further proof attempt is started. The summary gains a **Conclusion:** line and a conclusion-cost row; with --persist the helper's action is honoured during the conclusion as everywhere else, and an interrupted conclusion reports only what it produced.

  • Cycle tracker. init --conclude-after=… (default 0, so autoformalize and other callers are unchanged); tick prints conclude=yes|no, conclude_reason= and concluding=yes|no, and on LIMIT_REACHED a stop_reason= that applies max-stuck > max-cycles > max-runtime when several limits bind. A new conclude subcommand latches the phase and snapshots conclude_at (cycles, consecutive stuck, stuck total, deep total, elapsed). It is idempotent and refused before a due tick or with the phase off. status reports the reserves, the latch, the snapshot and runtime_exhausted. start-claim refuses while a reserve is enabled. Both JSON backends (jq, python3).

Changed

  • run-contract/v1: stop_reason: concluded, a non-blocker stop with null stop_detail and blocker fields, which reruns freely. The amendment is additive, not bidirectional: readers from plugin 4.12.0 on accept every older record, while older readers reject a concluded handoff (handoff-contract). The store and prior-run reuse validate through the shared validator, so they accept it unchanged.

Tests

  • Tracker suite, on both backends:

    • the rounding table (max-cycles 1/2/3/20, stuck 3, runtime);
    • form independence (2c never on stuck cycles or runtime, a duration never on cycles);
    • 0/0%, and the default off;
    • first crossing and the simultaneous-crossing order;
    • the latch surviving a stuck reset, the snapshot and idempotence;
    • a hard limit during the conclusion, and the stop-reason precedence;
    • startup validation, and the start-claim guard.

    The macOS Bash 3.2 smoke test also covers reserve parsing, the due tick, the latch and a rejected 0c.

  • Parser: grammar, ranges, fit within the budget, the --formalize=auto warning, and parity with cycle-tracker init on every case, with init given the parser's resolved value (padded values such as " 15% " are rejected by both; case is folded by both), including reserves at the boundary of a 9223372036854775807s runtime; the tracker suite checks the reserve values of 1%, 15% and 50% of INT64_MAX cycle, stuck and runtime budgets.

  • A protocol acceptance test (ConclusionPhase, real tracker and real persistence helper) for the concluded, limit-during-conclusion, finalization-on-the-last-cycle, precedence and runtime-overshoot mappings; persistence off, an unconfirmed finish, a committed final Replan with failed bookkeeping (stored and cited, no tick, no finish) and an interrupted conclusion; --conclude-after=0.

  • Contract, store and reuse tests for concluded.

  • Check 47 pins the prose; Check 14 maps the new stop condition.