Millennium Harness is a model-free acceptance gate for Lean 4 and Dafny solutions: a solution counts only if the frozen specification kept its meaning and the kernel accepted the proof with no escape hatch.
What it is #
It ships from the Formal-Verification-RSI repository of Sahibzada Allahyar, an MIT-licensed Python package with one contributor and no release.
The
lock command freezes a task record into a frozen specification, and the check command runs a solution against it.
On the Lean side a comparator rejects any change to the theorem statement, every axiom and sorry escape, and the run_cmd_addDecl kernel-replay trick.
On the Dafny side it rejects assume, {:axiom}, bodiless lemmas with ensures, disallowed attributes, and captured specification helpers, then runs dafny audit and a compile check.
It pins Lean v4.23.0-rc2 and Dafny 4.11, and a bench adapter runs OpenCode or Claude Code with the gate inside a sandbox.
The same repository carries Millennium RSI, a loop in which an improver model rewrites a solver’s harness (a strategy plus a lemma library) and keeps a change only when the gate certifies more held-out tasks proved.
Status #
Active, single-handed, and quiet for six weeks. The repository counts 2,938 stars and 130 forks as of 2026-12-05, was created 2025-02-22, and last saw a commit on its main branch on 2026-10-22. It has no tag or release, and its citation record dates the software to 2026-10-28. Its 149 open issues are not a user signal: none is closed, and of the first hundred the search API returns, 99 are the owner’s own task tickets. The dozen newest I read are tickets for an unrelated virtual-office project, apart from one drive-by vulnerability report. The footprint outside GitHub is thin: zero Hacker News stories on the repository, the harness name, or the author, directory listings, and one descriptive third-party blog post with no comments.
Strengths #
- It closes the exits a plain verifier leaves open: Lean accepts
sorrywith only a warning, and Dafny reports0 errorsforassume {:axiom} false. - Against a 96-cheat suite the strongest existing checkers still accept 45 and plain exit-0 criteria accept 83, while the gate accepts none and passes all 25 genuine solutions.
- Its own audit of 4,219 published solutions in the vericoding benchmark rejects 215 of the 2,207 benchmark-accepted files it checked, labelling 69 of them unsound.
- The gate calls no model, so it adds no judge variance and no token cost to a run.
- The results document is a living record that reports its preregistered verdicts even where they came out null.
Cautions #
- The in-loop gain is not established. On the sealed 33-task cross-harness run all three preregistered hypotheses came out not significant, and the README itself puts the gain at 0 to 2 tasks with two of the models tested.
- Most rejections in the audit were alarms on genuine proofs: of the 215 files the gate rejected, it labelled 139 benign and 7 unclear, against 69 unsound.
- The README headline and the living results document carry different denominators (69 fakes with 0.2% false rejections against 96 cheats with 0.5% false alarms on the development split), so I read the results document for the numbers.
- The author lists cheats every check combined still accepts, such as a Dafny solution whose
requires falseattaches to the frozen method. - It covers Lean 4 and Dafny only, on vericoding tasks, with pinned toolchain versions.
- The self-improvement loop is a smoke test: eight held-out tasks, 2 to 3 proved per generation, nine improver lemmas kernel-checked, with larger runs promised and not yet published.
- Everything is self-published by one contributor with no independent replication.
Pricing #
Pricing does not apply: the code is MIT-licensed with no paid tier or hosted service as of 2026-12-05. Running the loop costs only the solver and improver model tokens.
Compared to #
- HermesGate judges whether a repository’s own checks passed on exact bytes, for any stack; Millennium Harness judges one narrow output class with a kernel instead of a configured runner.
- deepeval scores natural-language and agent outputs with LLM judges; choose Millennium Harness only when the output is a formal proof.
- Plain
leananddafny verifyexit codes are free and already in CI, but the audit shows they accept most of the cheats in the suite.
Bottom line #
Recommended for teams running proof-generating agents on Lean 4 or Dafny, and for anyone auditing a published set of verified solutions. Not for general code review, natural-language outputs, or as evidence that gating a loop improves the agent.
Changes #
- 2026-12-05 - Created.
See also #
- HermesGate - the receipt-bound gate for ordinary repositories, the nearest neighbour in this category.
- Verbatim Citation Gate - another deterministic, model-free auditor of generated output.
- MLR-Bench - the benchmark whose headline finding, fabricated results in 8 of 10 tasks, is the reward hacking this gate exists to block.
- Anthropic Claude mathematical research - a formal-math benchmark note, for how much a benchmark number depends on who checks the proofs.
References #
https://github.com/sahibzada-allahyar/Formal-Verification-RSI - the repository: description, stars, forks, created and pushed dates, open issues, license (as of 2026-12-05)
https://github.com/sahibzada-allahyar/Formal-Verification-RSI/blob/main/README.md - the gate’s definition, the 83 and 45 comparison, the RSI smoke run, install and pinned toolchains
https://github.com/sahibzada-allahyar/Formal-Verification-RSI/blob/main/docs/RESULTS.md - the living results: preregistered verdicts, the 96-cheat comparison, false-alarm rates, accepted cheats
https://github.com/sahibzada-allahyar/Formal-Verification-RSI/blob/main/docs/audit-vericoded.md - the 4,219-solution audit and its limitations
https://github.com/sahibzada-allahyar/Formal-Verification-RSI/blob/main/LICENSE - the MIT terms
https://github.com/sahibzada-allahyar/Formal-Verification-RSI/blob/main/CITATION.cff - the software citation record and its release date
https://github.com/sahibzada-allahyar/Formal-Verification-RSI/issues - the open-issue backlog (as of 2026-12-05)
https://arxiv.org/abs/2509.22908 - the vericoding benchmark paper behind the audited solution set
https://github.com/Beneficial-AI-Foundation/vericoding-benchmark - the audited benchmark repository
https://offsecblog.com/2026/10/formal-verification-rsi-for-catching.html - the one third-party write-up, descriptive, dated 2026-10-23