ci: run the proofs and the interpreter that nothing was running - #112
Merged
Merged
Conversation
The Taskfile defined kani and miri tasks and both crates carry real harnesses (agent-uri/src/kani_impls.rs, agent-uri-attestation/src/proofs.rs), but no job ever ran them. Nineteen proof harnesses sat in the tree proving nothing. Both jobs run on the existing weekly schedule and on workflow_dispatch, beside fuzz, for the same reason fuzz does: a model checker exhausts a state space and Miri is two orders of magnitude slower than native, and neither is something a pull request should wait for. Scope is deliberate. Kani runs only the two crates that carry harnesses, since --workspace would put the model checker to work compiling the CLI, the evaluation harness, and libp2p to prove nothing. Miri runs the same two, whose tests are pure computation; the DHT, libp2p, and CLI suites test against tokio, real sockets, and the filesystem, which Miri cannot execute, so pointing it at them would fail every week for reasons that are not defects. Miri needs -Zmiri-disable-isolation because the attestation tests read the clock and its isolation refuses clock_gettime. That relaxes no undefined-behaviour check, which is what the job is for. The Kani version is pinned so a run is reproducible and an upstream release cannot turn a green week red on its own, and ~/.kani is cached separately because Swatinem's cache does not reach outside the cargo directories. The Taskfile now runs the same commands, so a local run and a CI run agree. Closes #15
rrrodzilla
force-pushed
the
ci/15-kani-miri-schedule
branch
from
July 31, 2026 22:56
cc07b42 to
49b5382
Compare
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.
Closes #15. (#11, which blocked it, is merged.)
The Taskfile defined
kaniandmiritasks and both crates carry real harnesses —agent-uri/src/kani_impls.rs(6 proofs) andagent-uri-attestation/src/proofs.rs(13 proofs) — but no job ever ran them. Nineteen proof harnesses sat in the tree proving nothing.Both new jobs sit on the existing weekly schedule plus
workflow_dispatch, besidefuzz, for the same reasonfuzzis there: a model checker exhausts a state space and Miri is roughly two orders of magnitude slower than native. Neither is something a pull request should wait for.Scope, and why it is not
--workspacekaniagent-uri,agent-uri-attestation--workspacewould compile the CLI, the eval harness, and libp2p to prove nothingmiriagent-uri,agent-uri-attestation(--lib)agent-uri-dht,-dht-libp2p, and the CLI test against tokio, real sockets, and the filesystem, none of which Miri can executePointing Miri at the networked crates would produce a job that fails every week for reasons that are not defects, which is worse than no job.
Two details that are load-bearing
Miri needs
-Zmiri-disable-isolation. This is not a guess — running without it fails concretely:The flag relaxes no undefined-behaviour check — those are what the job is for — it only lets the attestation tests read the clock they were written against.
The Kani version is pinned (
KANI_VERSION: 0.67.0) so a run is reproducible and an upstream release cannot turn a green week red on its own.~/.kaniis cached separately fromSwatinem/rust-cache, which does not reach outside the cargo directories, keyed on the version that produced it.The Taskfile now runs exactly these commands, so a local run and a CI run agree rather than drifting.
Verification status — please read
I could not complete a full local run of either tool: CBMC and Miri both exhaust this workstation's session and kill it. What was verified locally before that happened:
cargo kani -p agent-uri-attestation --harness matching_issuers_succeed— passes, 0 of 400 checks failed. (Also the evidence for Move kani-verifier out of regular dev-dependencies #18, that thekani-verifierdev-dependency was unnecessary.)cargo +nightly miri test -p agent-uri --lib— passes, 196 tests.cargo +nightly miri test -p agent-uri-attestation --libwithout the flag — fails as quoted above, which is what established the need for it.What is not yet confirmed end-to-end: the full 19-harness Kani run, and the attestation crate under Miri with isolation disabled.
Both are cheap to settle on GitHub's runners, which is where these jobs live anyway. After merge, trigger CI via workflow_dispatch on
main; thekaniandmirijobs will run. If either turns up something, it is a real finding about the code or a scope adjustment to this file, and either way it is better learned there than not at all. I did not want to present these as verified when they are not.