Skip to content

Commit 4dc4aca

Browse files
feat: assay / assimilate / aggregate — proof-integration subcommands (#121)
## What Three new a-themed subcommands that wire panic-attack into the **PROOF-PROGRAMME** loop (survey → swap → fold-in-proofs), plus a small version-drift fix. ### `assay` — proven-library substitution survey (`src/assay/mod.rs`) Surveys a target for code that has a formally proven drop-in equivalent in a `proven` / `proven-servers` library, reporting each candidate with the proof artifact that backs it. Operationalises the "Proven cross-fit" table in `PROOF-PROGRAMME.md` mechanically. Built-in catalogue: `SafePath`, `SafeUrl`. On this repo it reports `safe-path` **Offered** (port present in `src/safe_path.rs`, 5 call sites still to rewire) and `safe-url` **NoReplacementSource** (14 `VERISIMDB_URL` hits, not yet ported). ### `assimilate` — perform the swap (`src/assay/mod.rs`) Stages the proven module into the tree, backs up the original (`*.orig`), and records provenance — source **BLAKE3** hash + proof backing + pending call-site rewires — under `.assimilated/`. Module swaps are automatic; call-site rewiring is **reported, never auto-edited** (mechanically editing arbitrary call sites is not a reviewable operation). ### `aggregate` — fold external prover output into a report (`src/aggregate/mod.rs`) Ingests prover artifacts (Agda / Idris2 / Coq·Rocq / Lean / Isabelle / TSTP / Alethe / DRAT·LRAT). Each artifact is **BLAKE3-hashed for non-repudiation**, given a friendly name, classified (`Closed` / `Holes` / `Refuted` / `Indeterminate` — comment-stripped so prose mentioning `postulate`/`Admitted` does not false-trigger), and reconciled against an existing report's findings (**Backed / Corroborated / Contradicted**). Every verdict is explicitly conditioned on the named checker's trust; the recorded hash lets the tool show exactly which bytes it was handed if the assessment is later challenged. `@name`/`@covers [claim:]kind:value` annotations travel inside the artifact; CLI `--label`/`--covers` override. ## Proof foundation Idris2 0.8.0 installed and the existing foundation re-verified from first principles (all typecheck): `Types`, `Stripping` (Layer 1.0), `PatternCompleteness` (PA1), `ClassificationSoundness` (PA2). ## Tests 17 new unit tests; full library suite (395) green; zero new compiler warnings. ## Naming note `assay` / `assimilate` are clean, no clashes. `aggregate` has **no CLI clash** but conceptually overlaps `adjudicate` (aggregates panic-attack's own reports) and `assemblyline` ("aggregate results"). A thematically tighter alternative for "bring an external proof forward as evidence" is **`adduce`** (or `annex`) — trivial rename if preferred. ## Still open (not in this PR) - New subcommands not yet added to `README.adoc` / `EXPLAINME.adoc` (CLAUDE.md count corrected). - Next proof obligation (Layer 1.0 block/strings/composition/position, issue #114) not yet advanced. https://claude.ai/code/session_01K2TJLeQSyz4tpydZ18aRcb --- _Generated by [Claude Code](https://claude.ai/code/session_01K2TJLeQSyz4tpydZ18aRcb)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2dc1393 commit 4dc4aca

5 files changed

Lines changed: 2039 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,43 @@
22

33
## [Unreleased]
44

5+
### Added — `assay` / `assimilate` / `aggregate` proof-integration subcommands
6+
7+
Three new a-themed subcommands that wire panic-attack into the
8+
PROOF-PROGRAMME loop (survey → swap → fold-in-proofs):
9+
10+
- **`panic-attack assay [TARGET] [--proven DIR]…`** (`src/assay/mod.rs`):
11+
surveys a target for code that has a formally proven drop-in equivalent
12+
in a `proven` / `proven-servers` library and reports each candidate with
13+
the proof artifact that backs it — operationalising the "Proven cross-fit"
14+
table in `PROOF-PROGRAMME.md` mechanically instead of by hand. Built-in
15+
catalogue: `SafePath` (canonicalize/unwrap pattern) and `SafeUrl`
16+
(`VERISIMDB_URL`). On this repo: `safe-path` **Offered** (port present in
17+
`src/safe_path.rs`, call sites still to rewire), `safe-url`
18+
**NoReplacementSource** (not yet ported).
19+
- **`panic-attack assimilate [TARGET] --candidate ID [--proven DIR] [--from FILE] [--all] [--dry-run]`**:
20+
performs a swap — stages the proven module into the tree, backs up the
21+
original (`*.orig`), and writes a provenance record (source BLAKE3 hash +
22+
proof backing + pending call-site rewires) under `.assimilated/`. Module
23+
swaps are automatic; call-site rewiring is reported, never auto-edited
24+
(mechanically editing arbitrary call sites is not a reviewable operation).
25+
- **`panic-attack aggregate --proof PATH… [--label PATH=NAME] [--covers PATH=SPEC] [--report BASE]`**
26+
(`src/aggregate/mod.rs`): folds external prover output (Agda / Idris2 /
27+
Coq·Rocq / Lean / Isabelle / TSTP / Alethe / DRAT·LRAT) into a report. Each
28+
artifact is **BLAKE3-hashed for non-repudiation**, given a friendly name,
29+
classified (Closed / Holes / Refuted / Indeterminate — comment-stripped so
30+
prose mentioning `postulate` / `Admitted` does not false-trigger), and
31+
reconciled against findings (**Backed / Corroborated / Contradicted**).
32+
Every verdict is explicitly conditioned on the named checker's trust; the
33+
recorded hash lets the tool show exactly which bytes it was handed if the
34+
assessment is later challenged. `@name "…"` / `@covers [claim:]kind:value`
35+
annotations travel inside the artifact; CLI `--label` / `--covers` override.
36+
37+
Proof foundation re-verified from first principles under a fresh **Idris2
38+
0.8.0** install: `Types`, `Stripping` (Layer 1.0), `PatternCompleteness`
39+
(PA1) and `ClassificationSoundness` (PA2) all typecheck. 17 new unit tests;
40+
full library suite (395 tests) green; zero new compiler warnings.
41+
542
## [2.5.5] — 2026-06-02
643

744
Release of the v2.5.5 cohort that landed across 11 PRs in panic-attack + wiki + gitbot-fleet on 2026-06-02 PM. Tagged 2026-06-02 PM-evening.

0 commit comments

Comments
 (0)