Repository navigation
Add the formal verification from formalver (v1.1.0) - #7
gabehamilton wants to merge 3 commits into
Conversation
Verbatim copy of formalver's shared-pool verification at da343e2 (PR #32, stacked on PR #31), which verifies contract v1.1.0 (57b3f02): TLA+, Lean, Prolog, Kani (with the local record of the 48 large harnesses), conformance traces, NEAR unit and sandbox tests, status.toml and strategy.md, plus the formalver scripts and CI workflow they use. Paths still follow formalver's layout and nothing runs in this repository's CI yet; verification/README.md maps the paths and lists the follow-ups. The CI workflow is kept inactive at verification/ci/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary of ChangesHello @gabehamilton, I'm the pr-review agent. I've reviewed this pull request, and here's a summary to help you and other reviewers get up to speed, with the full code review to follow. This PR copies the shared-pool-controls formal verification verbatim from difflabai/formalver ( Highlights
Changelog
Automated review by the pr-review agent (Codex CLI + GPT-5.6 Terra). Reply on any review thread to discuss a finding. |
gabehamilton
left a comment
There was a problem hiding this comment.
Code Review
This PR copies the formal verification from formalver into verification/ with an authored README. I found no way the copy breaks the existing check or pages workflows, the scripts, or the root Cargo workspace: the root members list is explicit, the four verification crates each declare their own [workspace], and ci/shared-pool.yml sits outside .github/workflows/. I also checked the README figures against the tree and the formalver CI run (98 Kani harnesses, 27 not-run mutants, 18 passed and 4 skipped jobs, a file set that matches da343e2). The findings are documentation fixes: the source-mirror file count is understated (91, not about 85), the workspace follow-up is already satisfied, and the root README and docs/verification-handoff.md still say the proofs live only in formalver.
| Nothing here runs in this repository's CI yet, and the root Cargo workspace does not include these | ||
| crates. Follow-ups to make it run here: | ||
|
|
||
| 1. Rewrite the paths above (about 85 files refer to `source-mirror`). |
There was a problem hiding this comment.
Correct the source-mirror reference count. This says about 85 files refer to source-mirror, but a recursive file-level search of verification/ finds 91 files containing that path (89 even when README files are excluded). The PR body repeats the same count, so the stated scope of the required path rewrite is understated.
| 1. Rewrite the paths above (about 85 files refer to `source-mirror`). | |
| 1. Rewrite the paths above (91 files refer to `source-mirror`). |
There was a problem hiding this comment.
Fixed in 03b57d7. A grep finds 91 files, one of which is the new README itself, so the README now says "90 of the copied files". The PR body is updated too.
| 3. Exclude `verification/` from the root workspace (or give each crate its own `[workspace]`), and | ||
| check the crates' toolchains against `rust-toolchain.toml`. |
There was a problem hiding this comment.
Remove the already-completed workspace follow-up. There is no pending workspace exclusion to perform: the root Cargo.toml has an explicit members list, and verification/conformance, kani, near-tests, and sandbox already each define a standalone [workspace]; sandbox's workspace includes relay. Leaving this as a required follow-up makes the integration checklist misleading.
| 3. Exclude `verification/` from the root workspace (or give each crate its own `[workspace]`), and | |
| check the crates' toolchains against `rust-toolchain.toml`. | |
| 3. Check the crates' toolchains against `rust-toolchain.toml`. Each of `kani`, `conformance`, `sandbox` (which also holds `relay`) and `near-tests` already declares its own `[workspace]`, so none of them joins the root workspace. |
There was a problem hiding this comment.
Fixed in 03b57d7. Confirmed: kani, conformance, near-tests and sandbox (members "." and "relay") each declare [workspace]. Follow-up 3 is now only the toolchain check against the root rust-toolchain.toml.
| | `tools/` | `verification/tools/` | | ||
| | `.github/workflows/shared-pool.yml` | `verification/ci/shared-pool.yml` | | ||
|
|
||
| Nothing here runs in this repository's CI yet, and the root Cargo workspace does not include these |
There was a problem hiding this comment.
Update repository-facing verification links for the local copy. Adding the local verification tree without updating the repository-facing documentation leaves readers directed only to formalver PR #32. In particular, docs/verification-handoff.md still states that this repository holds no proofs itself, which is now false. Add the root README/docs link updates to the PR or explicitly list them as a follow-up.
There was a problem hiding this comment.
Fixed in 03b57d7. The root README.md (both formalver links) and docs/verification-handoff.md now also point to verification/. The handoff no longer says this repository holds no proofs; it says the copy is not yet wired into CI.
…(review fixes) - 90 of the copied files refer to source-mirror, not about 85. - The verification crates already declare their own [workspace], so the follow-up is only a toolchain check. - The root README and docs/verification-handoff.md now point to verification/; the handoff no longer says the repository holds no proofs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check-kani-record.py fingerprints paths under projects/shared-pool/, including the source-mirror gitlink, so the copied record does not match at verification/ and a path rewrite would not fix that. The README now gives the two ways to keep it: restore formalver's layout with a self-submodule at 57b3f02, or re-run the 48 large harnesses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Copies the shared-pool-controls formal verification from difflabai/formalver into
verification/. The copy is verbatim from formalverda343e2: PR difflabai/formalver#32, which is stacked on difflabai/formalver#31. It verifies contract v1.1.0 (57b3f02), and no file undercrates/has changed since, so it covers the contract onmain.status.tomlandstrategy.mdrecord the claims and findings.verification/kani/local/not-run.tsv.da343e2(run 43642798201).Not wired up yet
This PR only copies the files; nothing runs in this repository's CI yet.
verification/README.mdmaps formalver's paths to this repository's and lists the follow-ups:source-mirrorsubmodule, which is this repository's root here);projects/shared-pool/, so it does not match atverification/. Either restore formalver's layout with a self-submodule at57b3f02, or re-run the 48 large harnesses (about 7 hours on a 64 GB Mac);rust-toolchain.toml(each crate already declares its own[workspace]);verification/ci/shared-pool.ymlwithpaths:filters (a full run takes about 48 minutes).The root
README.mdanddocs/verification-handoff.mdnow also point toverification/. The commit history, review threads and CI runs stay in formalver.Test plan
cargo metadataat the root still loads the workspace (the new crates are not members)da343e2are in the commit, none dropped by.gitignorecheckworkflow passes🤖 Generated with Claude Code