Skip to content

Commit 76060db

Browse files
authored
Merge branch 'main' into efficiency-improver-tweaks
2 parents 4114ce5 + ecb5fea commit 76060db

11 files changed

Lines changed: 2649 additions & 1264 deletions

.github/aw/actions-lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
"version": "v7.0.0",
3636
"sha": "bbbca2ddaa5d8feaa63e36b76fdaad77386f024f"
3737
},
38-
"github/gh-aw-actions/setup@v0.68.1": {
38+
"github/gh-aw-actions/setup@v0.71.0": {
3939
"repo": "github/gh-aw-actions/setup",
40-
"version": "v0.68.1",
41-
"sha": "2fe53acc038ba01c3bbdc767d4b25df31ca5bdfc"
40+
"version": "v0.71.0",
41+
"sha": "49157453228f9641824955e35cbeccbca74ee0fd"
4242
},
4343
"github/gh-aw/actions/setup@v0.66.1": {
4444
"repo": "github/gh-aw/actions/setup",

.github/workflows/daily-repo-goals.lock.yml

Lines changed: 425 additions & 254 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/daily-workflow-sync.lock.yml

Lines changed: 420 additions & 252 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/import-workflow.lock.yml

Lines changed: 377 additions & 214 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/link-checker.lock.yml

Lines changed: 393 additions & 223 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/maintainer.lock.yml

Lines changed: 418 additions & 250 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/lean-squad.md

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🔬 Lean Squad
22

3-
The [Lean Squad workflow](../workflows/lean-squad.md?plain=1) is a [GitHub Agentic Workflow](https://github.blog/ai-and-ml/automate-repository-tasks-with-github-agentic-workflows/) that applies Lean 4 formal verification to your codebase progressively and optimistically — without requiring any prior FV expertise. Each run it selects tasks weighted to the current phase of FV progress, from initial research all the way through to completed proofs. Maybe it finds a bug; maybe it proves something; either way, it makes forward progress.
3+
The [Lean Squad workflow](../workflows/lean-squad.md?plain=1) is a [GitHub Agentic Workflow](https://github.blog/ai-and-ml/automate-repository-tasks-with-github-agentic-workflows/) that applies Lean 4 formal verification to your codebase progressively and optimistically — without requiring any prior FV expertise. Each run it selects tasks weighted to the current phase of FV progress, from initial research all the way through to completed proofs, correspondence reviews, project reports, and even a LaTeX conference paper. Maybe it finds a bug; maybe it proves something; either way, it makes forward progress.
44

55
## Installation
66

@@ -24,15 +24,19 @@ graph LR
2424
A --> T3[Task 3: Formal Spec Writing]
2525
A --> T4[Task 4: Implementation Extraction]
2626
A --> T5[Task 5: Proof Assistance]
27-
A --> T6[Task 6: Maintain Open Lean Squad PRs]
27+
A --> T6[Task 6: Correspondence Review]
28+
A --> T7[Task 7: Proof Utility Critique]
29+
A --> T8[Task 8: Correspondence Validation]
30+
A --> T9[Task 9: CI Automation]
2831
A --> T10[Task 10: Project Report]
29-
T1 & T2 & T3 & T4 & T5 & T6 & T10 --> T7[Task 7: Update FV Status Issue]
30-
T7 --> M[Save repo-memory]
32+
A --> T11[Task 11: Conference Paper]
33+
T1 & T2 & T3 & T4 & T5 & T6 & T7 & T8 & T9 & T10 & T11 --> TF[Task Final: Update FV Status Issue]
34+
TF --> M[Save repo-memory]
3135
````
3236

33-
A deterministic pre-step counts FV artifacts in the repository (Lean files, spec docs, open issues and PRs) and computes a **phase-weighted probability** for each task. Two tasks are drawn and communicated to the agent; the agent confirms them against its memory and executes them. Task 7 (status update) always runs. All notes, targets, choices, and progress live in persistent **repo-memory** so each run builds on the last.
37+
A deterministic pre-step counts FV artifacts in the repository (Lean files, spec docs, open issues and PRs) and computes a **phase-weighted probability** for each task. Two tasks are drawn and communicated to the agent; the agent confirms them against its memory and executes them. Task Final (status update) always runs. All notes, targets, choices, and progress live in persistent **repo-memory** so each run builds on the last.
3438

35-
The weighting scheme adapts automatically: when no FV work exists Task 1 dominates; once research is done Task 2 rises; as informal specs accumulate Task 3 gains weight; and so on up to proofs.
39+
The weighting scheme adapts automatically: when no FV work exists Task 1 dominates; once research is done Task 2 rises; as informal specs accumulate Task 3 gains weight; and so on up to proofs. Once implementation models exist, Task 8 becomes available and is weighted heavily when no runnable correspondence tests exist yet.
3640

3741
### Task 1: Research & Target Identification
3842

@@ -64,22 +68,46 @@ Default weighting: rises once Lean implementations exist.
6468

6569
Attempts to prove the stated propositions using Lean 4 tactics (`decide`, `omega`, `simp`, `linarith`, `ring`, `induction`, etc.). When a proof obligation cannot be closed, investigates whether the spec or the implementation is wrong. If a **counterexample** is found refuting a property, files a bug issue with the failing case, the expected property, and the impact. Proved theorems have their `sorry` removed; hard ones get a comment explaining the obstacle. Produces a PR with real progress.
6670

67-
### Task 6: Maintain Open Lean Squad PRs
71+
### Task 6: Correspondence Review
6872

69-
Weight proportional to the number of open Lean Squad PRs.
73+
Default weighting: critical when implementations exist but no correspondence doc.
7074

71-
Reviews open `[Lean Squad]` PRs, fixes CI failures (Lean syntax errors, `lake build` failures), and resolves merge conflicts. Stale or stuck PRs get a comment explaining the blocker.
75+
For each Lean file containing an implementation model, reviews how faithfully the model corresponds to the actual source code. Assesses each definition's correspondence level (*exact*, *abstraction*, *approximation*, or *mismatch*), documents all known divergences with file/line references, and evaluates the impact on proof validity. Produces or updates `formal-verification/CORRESPONDENCE.md` as a PR. Flags any mismatches that invalidate proved theorems and opens issues for them.
7276

73-
### Task 7: Update Lean Squad Status Issue *(always)*
77+
### Task 7: Proof Utility Critique
7478

75-
Maintains a single `[Lean Squad] Formal Verification Status` issue as a continuously-updated dashboard with an at-a-glance table (one row per target, showing current phase and status), summary narrative, findings section (bugs found, counterexamples), approach notes, and a prepended run history entry for every run.
79+
Default weighting: critical when proofs exist but no critique doc.
80+
81+
Steps back to honestly assess whether the FV work is actually useful — are the proved properties meaningful, at the right level of abstraction, and likely to catch real bugs? Evaluates each theorem's level, bug-catching potential, coverage, and strength. Identifies the highest-value gaps and recommends what to prove next. Optionally reviews the conference paper (`paper.tex`) as a critical reviewer and includes actionable feedback. Produces or updates `formal-verification/CRITIQUE.md` as a PR.
82+
83+
### Task 8: Implementation Correspondence Validation *(Aeneas extraction or runnable tests)*
84+
85+
Default weighting: available once implementation models exist; weighted highly when no runnable correspondence tests exist.
86+
87+
Validates that the Lean implementation model corresponds to the source code using one of two routes. Route A uses the Charon + Aeneas toolchain to automatically generate Lean 4 code from Rust source, producing a mechanically-derived model that can be bridged to the hand-written one. Route B writes and runs executable correspondence tests that exercise the source implementation and the Lean model on the same fixtures, which may require building a small standalone harness or copied test project under `formal-verification/tests/`. The task always prefers concrete, executed evidence over hand-wavy similarity claims.
88+
89+
### Task 9: CI Automation
90+
91+
Default weighting: critical when Lean files exist but no CI; regular check otherwise.
92+
93+
Sets up and maintains `.github/workflows/lean-ci.yml` and, when applicable, CI for Task 8 artifacts such as `aeneas-generate.yml` or runnable correspondence-test workflows. Audits CI health, checks for persistent failures, verifies cache effectiveness, and fixes broken workflows.
7694

7795
### Task 10: Project Report
7896

7997
Default weighting: important once proofs exist; available once Lean specs exist.
8098

8199
Creates and incrementally maintains `formal-verification/REPORT.md` — a comprehensive, reader-friendly project report summarising the entire FV effort. Uses mermaid diagrams extensively to visualise proof architecture, dependency layers, modelling choices, the main proof chain, and project timeline. Includes a mandatory Findings section documenting any bugs found (with counterexamples and issue links), formulation issues caught during development, and interesting structural discoveries. The report is updated incrementally each run rather than rewritten from scratch.
82100

101+
### Task 11: Conference Paper
102+
103+
Default weighting: important once proofs exist; only available once proofs exist.
104+
105+
Writes and maintains a LaTeX conference paper under `formal-verification/paper/` using a standard ACM (`acmart`) or IEEE (`IEEEtran`) template, targeting an 11-page limit. The paper covers methodology, findings, proof architecture, modelling choices, and lessons learned. Includes a Lean 4 listing style for code examples. The compiled PDF (`paper.pdf`) is committed to the repository and kept up to date. Each run updates the paper incrementally — adding new theorems, findings, and revised assessments. Requires `texlive` for compilation (installed automatically). Produces `paper.tex`, `paper.bib`, and `paper.pdf` as a PR.
106+
107+
### Task Final: Update Lean Squad Status Issue *(always)*
108+
109+
Maintains a single `[Lean Squad] Formal Verification Status` issue as a continuously-updated dashboard with an at-a-glance table (one row per target, showing current phase and status), summary narrative, findings section (bugs found, counterexamples), approach notes, and a prepended run history entry for every run.
110+
83111
## What Gets Created
84112

85113
| Artifact | Location | Description |
@@ -88,9 +116,14 @@ Creates and incrementally maintains `formal-verification/REPORT.md` — a compre
88116
| Target list | `formal-verification/TARGETS.md` | Prioritised targets with phase status |
89117
| Informal specs | `formal-verification/specs/<name>_informal.md` | Per-target: contracts, examples, intent |
90118
| Lean specs | `formal-verification/lean/FVSquad/<Name>.lean` | Lean 4 types, propositions, proofs |
119+
| Correspondence tests | `formal-verification/tests/<name>/` | Runnable harnesses, fixtures, copied test projects, execution notes |
120+
| Correspondence | `formal-verification/CORRESPONDENCE.md` | How each Lean model maps to the source |
121+
| Critique | `formal-verification/CRITIQUE.md` | Assessment of proof utility and coverage |
91122
| Project report | `formal-verification/REPORT.md` | Comprehensive FV report with mermaid diagrams |
92-
| Status issue | GitHub issue `[FV Squad] Formal Verification Status` | Rolling dashboard |
93-
| Bug reports | GitHub issues `[FV Squad] ...` | Properties violated, with counterexample |
123+
| Conference paper | `formal-verification/paper/paper.tex` | LaTeX source (ACM/IEEE template) |
124+
| Compiled PDF | `formal-verification/paper/paper.pdf` | Compiled conference paper |
125+
| Status issue | GitHub issue `[Lean Squad] Formal Verification Status` | Rolling dashboard |
126+
| Bug reports | GitHub issues `[Lean Squad] ...` | Properties violated, with counterexample |
94127

95128
## Design Principles
96129

docs/plan.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ This walks you through adding the workflow to your repository.
2222

2323
```mermaid
2424
graph LR
25-
A[/plan Command] --> B[Analyze Issue/Discussion]
26-
B --> C[Break Down Work]
27-
C --> D[Create Sub-Issues]
28-
D --> E[Link to Parent]
29-
E --> F[Assign to Copilot]
25+
A["/plan Command"] --> B["Analyze Issue/Discussion"]
26+
B --> C["Break Down Work"]
27+
C --> D["Create Sub-Issues"]
28+
D --> E["Link to Parent"]
29+
E --> F["Assign to Copilot"]
3030
```
3131

3232
Each sub-issue includes a clear title, objective, context, approach, specific files to modify, and acceptance criteria.

workflows/ai-moderator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
types: [opened]
1414
forks: "*"
1515
skip-roles: [admin, maintainer, write, triage]
16-
skip-bots: [github-actions, copilot]
16+
skip-bots: [github-actions, copilot, dependabot]
1717

1818
rate-limit:
1919
max: 5

0 commit comments

Comments
 (0)