Ablation probes take their own rlimit and a wall-clock cap per probe - #44
Open
kiranandcode wants to merge 2 commits into
Open
kiranandcode wants to merge 2 commits into
kiranandcode wants to merge 2 commits into
Conversation
`ablate` takes two optional fields, both additive: - `rlimit`: the resource limit each probe runs at, in `#[verifier::rlimit]` units (above 0, at most 1000, refused when it converts to no cvc5 unit). It applies to the search, vacuity and participation probes only: the absence check, an ordinary check of the witness, and every later request run at the query's own limit, which is restored before the absence check. - `probe_timeout_ms`: a wall-clock cap per probe, sent to the solver as cvc5's `tlimit-per` (z3's `timeout`) around each probe's check-sat and lifted after it. A probe the solver cancels answers unknown (timeout), which the search takes as not valid; it is listed in the reply's `skipped_probes` and the reply is marked `partial`. The absence check runs under the same cap. `air::Context::set_check_timeout` and `Prober::set_probe_timeout` carry the cap; `Answer::timed_out` names the cancelled answer. Without the fields the request behaves as before, and the reply gains only `partial: false`. This is the worker side of verus-tools-mcp#48, whose `ablate_to_witness` sends both fields (default rlimit 20, VERUS_MCP_PROBE_TIMEOUT_S 120) and falls back without them on a worker from before this commit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Worker side of BasisResearch/verus-tools-mcp#48 (
ablate_to_witness's probe budget). Both request fields are optional and the reply change is additive.Request (
Request::Ablate,source/rust_verify/src/resident.rs)rlimit(f32,#[verifier::rlimit]units, 0 < r ≤ 1000): the resource limit each probe runs at. Refused as an error (session kept) when out of range or when it converts to no cvc5 unit, like a ladder rung. It applies to the probes only — the search, vacuity, every-goal and participation probes. The absence check (an ordinary check of the witness) runs at the query's own rlimit, whichablaterestores before it, so every later request finds the session's limit unchanged.probe_timeout_ms(u64 > 0): a wall-clock cap per probe.Prober::runnow brackets eachcheck-sat-assumingwith cvc5'stlimit-per(z3'stimeout) and lifts it afterwards; the absence check runs under the same cap. A probe the solver cancels answersunknownwith reasontimeout(Answer::timed_out), which the search already treats as not valid.Reply (
AblateReport)partial: bool— some probe was cancelled at the cap.skipped_probes: [String](omitted when empty) — each cancelled probe by what it asked:probe with nothing removed,search probe with [3, 7] removed,before vacuity probe of goal 5,participation probe of unit 2,every-goal vacuity probe,absence check.air
Context::set_check_timeout(Option<u64>)emits the solver's per-check time option.Prober::set_probe_timeout(Option<u64>);Answer::timed_out().Tests
resident_ablation_probes_take_their_own_budget(rust_verify_test/tests/resident.rs): both fields accepted with a generous cap (partial: false, noskipped_probes); bad budgets refused without ending the session (rlimit0 / 5000 / 1e-9,probe_timeout_ms0); a 1 ms cap yieldspartialexactly whenskipped_probesis non-empty and the reply then names atimeout; the session still answersvalidafterwards; the SMT logs show exactly two budgets, the session's and twice it for the rlimit-4 probes; everytlimit-perset is matched by a reset; pushes balance pops.cargo test --release -p rust_verify --lib resident::tests(17 passed) andcargo test --release -p rust_verify_test --test resident ablat(4 passed) aftervargo --no-solver-version-check build --release(vstd 2045 verified);cargo fmt --checkclean on the touched crates. The full vstd/test suite was not run.🤖 Generated with Claude Code