Skip to content

Commit 2cb3332

Browse files
docs(proof-debt): adopt OWED-with-justification convention (Refs standards#158) (#65)
## Summary Single doc PR documenting the OWED-with-justification convention adopted by the standards#158 Fork A campaign. Companion to the 28 module-annotation PRs (proven#37-64). ### Human-facing: PROOF-NEEDS.md - Top-of-file note flags the 2026-05-20 re-audit of the 39 "carried forward, pending Proofs.idr re-audit" directories. Result: 6 clean, 28 with bodyless decls now annotated as OWED, 5 already fully proven. - New **"OWED-with-justification convention"** section codifies the pattern: ```idris ||| OWED: <one-sentence claim> ||| Held back by <Idris2 0.8.0 blocker>. Discharge once <unblocker>. 0 declarationName : Type ``` - Blocker-family table for the five recurring categories surfaced in the audit. - Fork-A-vs-Fork-B scope note. - "Honestly proven" section updated to reflect the re-audit (was "not re-verified by this pass"). ### Machine-facing: `.machine_readable/6a2/STATE.a2ml` - `last-updated` bumped 2026-03-15 → 2026-05-20. - New `[proof-coverage]` section with module counts. - New `[trust-posture]` section pinning the zero-bypass-token state. - New `[active-campaigns]` + `[session-history]` sections. ### Machine-facing: `.machine_readable/6a2/META.a2ml` - `last-updated` date added. - New `[architecture-decisions]` section with **ADR-001** recording the OWED-with-justification convention adoption, modelled on the boj-server META.a2ml ADR format. - New `[proof-conventions]` section pinning shape + banned tokens. ## What this is NOT - No Idris2 sources touched. Doc-only. - No `postulate` keyword introduced anywhere — the convention explicitly bans it (zero existing files use it). - Not a closure of #158 — the 28 annotation PRs are still DRAFT pending estate CI clear. ## Test plan - [x] PROOF-NEEDS.md still renders; the existing "Honesty refresh 2026-05-18" framing is preserved unchanged. - [x] STATE.a2ml + META.a2ml are TOML-parseable (visual inspection). - [x] No `.idr` files touched; build status unaffected. - [ ] CI will run on this branch once the estate-wide concurrency pool clears. ## Refs Refs hyperpolymath/standards#158 (Fork A campaign tracker), hyperpolymath/standards#124 (estate proof-debt epic). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fbfc404 commit 2cb3332

3 files changed

Lines changed: 115 additions & 6 deletions

File tree

.machine_readable/6a2/META.a2ml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# META.a2ml — Project meta-information
3-
# Converted from META.scm on 2026-03-15
43

54
[metadata]
65
project = "proven"
76
author = "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>"
87
license = "PMPL-1.0-or-later"
98
standard = "RSR 2026"
9+
last-updated = "2026-05-20"
10+
11+
[architecture-decisions]
12+
decisions = [
13+
{ id = "ADR-001", title = "OWED-with-justification convention for bodyless declarations in Proofs.idr files", status = "accepted", date = "2026-05-20", body = "Bodyless type signatures (implicit postulates) are made discoverable via triple-pipe doc-comment naming the claim + Idris2 0.8.0 blocker + discharge condition, plus a leading `0 ` erased-multiplicity marker, plus the original bare signature. The `postulate` keyword is NOT used (zero Proofs.idr files use it). Canonical example: src/Proven/SafeChecksum/Proofs.idr. Reference: hyperpolymath/standards#158 Fork A campaign, PROOF-NEEDS.md." },
14+
]
15+
16+
[proof-conventions]
17+
# Reference: see PROOF-NEEDS.md "OWED-with-justification convention".
18+
unproven-obligation-pattern = "owed-with-justification"
19+
unproven-obligation-shape = "triple-pipe-doccomment + 0-erased-multiplicity + bare-signature"
20+
banned-tokens-in-proofs-idr = ["believe_me", "idris_crash", "postulate"]
21+
canonical-example = "src/Proven/SafeChecksum/Proofs.idr"
22+
adr-reference = "ADR-001"

.machine_readable/6a2/STATE.a2ml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,48 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# STATE.a2ml — Project state checkpoint
3-
# Converted from STATE.scm on 2026-03-15
43

54
[metadata]
65
project = "proven"
76
version = "0.1.0"
8-
last-updated = "2026-03-15"
7+
last-updated = "2026-05-20"
98
status = "active"
109

1110
[project-context]
1211
name = "proven"
1312
completion-percentage = "stable"
1413
phase = "stable-library"
14+
15+
[proof-coverage]
16+
# Counts as of 2026-05-20 audit (standards#158 Fork A).
17+
safe-modules-with-proofs-idr-directory = 41
18+
safe-modules-clean = 6
19+
# Clean = zero bodyless decls. Modules: SafeChecksum, SafeBuffer, SafeBloom,
20+
# SafeCryptoAccel, SafeHKDF, SafeFPGA. These landed 2026-05-19/20 and set the
21+
# OWED convention.
22+
23+
safe-modules-with-owed-annotation = 28
24+
# Annotated via PRs #37-64 under standards#158 Fork A (excl. #36 = CI bump).
25+
# Eight locally idris2-0.8.0-verified: #52 #54 #56 #57 #58 #60 #62 #63.
26+
27+
bodyless-decls-total = 250
28+
# All annotated with ||| OWED: + 0 erased-multiplicity per the SafeChecksum
29+
# convention. See PROOF-NEEDS.md "OWED-with-justification convention" and
30+
# META.a2ml ADR-001.
31+
32+
[trust-posture]
33+
believe-me-uses = 0
34+
idris-crash-uses = 0
35+
postulate-keyword-uses = 0
36+
# Zero proof-bypass tokens in Proofs.idr files. All unproven obligations are
37+
# explicit OWED declarations with named blocker + discharge condition.
38+
39+
[active-campaigns]
40+
fork-a-annotation = "complete (28 DRAFT PRs filed, awaiting estate CI clear of concurrency-pool exhaustion)"
41+
fork-b-discharge = "triage open — quick-wins flagged in PROOF-NEEDS.md (SafeCrypto isSecure refactor; SafePath already-Refl pairs)"
42+
43+
[session-history]
44+
# Most recent first.
45+
"2026-05-20" = "Fork A campaign complete: 250 bodyless decls across 28 of 41 modules annotated via OWED-with-justification convention (PRs #37-64, Refs standards#158); cross-prover audit confirms 0 Lean sorry / 0 Coq Admitted in first-party code (only echidnabot dogfood fixtures)"
46+
"2026-05-19" = "Six new modules merged with explicit OWED markers (SafeChecksum, SafeBuffer, SafeBloom, SafeCryptoAccel, SafeHKDF, SafeFPGA) — convention-setting"
47+
"2026-05-18" = "PROOF-NEEDS.md honesty refresh (standards#124); ~70 single-file overclaim modules surfaced separately from the Proofs.idr-directory audit"
48+
"2026-03-15" = "STATE.scm converted to STATE.a2ml"

PROOF-NEEDS.md

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# PROOF-NEEDS.md — proven
22

3+
> **Re-audit update 2026-05-20.** The 39 "carried forward, pending Proofs.idr
4+
> re-audit" directories have now been re-audited (hyperpolymath/standards#158
5+
> Fork A). Net finding: of those 39, **6 are clean** (no bodyless decls;
6+
> SafeChecksum, SafeBuffer, SafeBloom, SafeCryptoAccel, SafeHKDF, SafeFPGA —
7+
> these set the OWED convention), **28 carried bodyless decls** which have
8+
> now been annotated as `||| OWED:` + `0 ` erased-multiplicity per the
9+
> convention (PRs hyperpolymath/proven#37-64, all DRAFT pending estate CI
10+
> clear; 8 locally idris2-0.8.0-verified). Total: 250 bodyless decls
11+
> surfaced and made discoverable. See the new "OWED-with-justification
12+
> convention" section below and `.machine_readable/6a2/META.a2ml` ADR-001.
13+
>
314
> **Honesty refresh 2026-05-18.** `proven` is the estate trust root, so this
415
> ledger must not overclaim. The prior edition asserted "the most complete
516
> Idris2 proof infrastructure in the ecosystem" and "~30 modules lack proof
@@ -137,16 +148,67 @@ Each line: module — verbatim doc claim — why it is owed.
137148
> `Prevents:|formally verified|cannot crash|guarantee|no false negative|
138149
> traversal|injection|attack` without a discharged theorem is OWED.
139150
140-
## Honestly proven (carried forward, pending Proofs.idr re-audit)
151+
## OWED-with-justification convention (adopted 2026-05-20)
152+
153+
Bodyless type signatures in `Proofs.idr` files are *implicit postulates*
154+
Idris2 parses them as axioms with no proof body. To make the trust posture
155+
visible (to readers and to grep), each bodyless declaration carries:
156+
157+
```idris
158+
||| OWED: <one-sentence statement of what's claimed>
159+
||| Held back by <specific Idris2 0.8.0 blocker>. Discharge once
160+
||| <what would unblock it>.
161+
0 declarationName : Type
162+
```
163+
164+
Three parts: triple-pipe doc-comment with claim+blocker+discharge condition;
165+
leading `0` (Idris2 quantitative-type-theory erased-multiplicity marker —
166+
runtime-erased); original bare type signature.
167+
168+
**Do NOT use the `postulate` keyword.** Zero `Proofs.idr` files in `proven`
169+
use it. The OWED+`0`+bare-sig pattern is chosen so that the reason each
170+
obligation exists is discoverable, and erasure means proof gaps cannot
171+
silently affect runtime behaviour.
172+
173+
Canonical example: `src/Proven/SafeChecksum/Proofs.idr` (L24-100). Also see
174+
SafeBuffer, SafeBloom, SafeCryptoAccel, SafeHKDF, SafeFPGA — these landed
175+
2026-05-20 and set the convention.
176+
177+
### Blocker families surfaced in the 2026-05-20 audit
178+
179+
| Family | Typical shape | Discharge route |
180+
|--------|---------------|-----------------|
181+
| String FFI opacity | claims about `unpack`/`pack`/`ord`/`toLower`/`prim__eq_String` | Typed String/Char primitive layer, or Class-J axiom set parallel to gossamer/boj-server |
182+
| Numeric-literal Refl gaps | `Bits32`/`Bits64`/large-`Nat` literal equality | `Data.Bits` reflective tactic or `Integer`-backed bound |
183+
| Covering-not-total reduction | e.g. `gcd n 0 = n` under `Data.Nat.gcd` declared `covering` (cf. SafeMath PR#46) | Upstream Idris2 stdlib promoting to `total`, or local total reimplementation |
184+
| Foldl-predicate gaps | claims about `Data.List.all`/`any` on abstract lists | Cons-distribution lemmas inline (cf. proof-of-work PR#60) |
185+
| Structurally OWED | e.g. SafeJWT `validatedJWTFromValidation` (record type lacks provenance proof field) | Type-side widening, not just FFI seam |
186+
187+
### Fork A scope vs. Fork B scope
188+
189+
Fork A (this campaign) = make every bodyless decl explicit with a justified
190+
OWED note. Surfacing, not discharging. **Complete 2026-05-20** via PRs
191+
hyperpolymath/proven#37-64.
192+
193+
Fork B (per-module discharge triage) is the next layer — selectively
194+
proving the dischargeable subset. Quick-win candidates surfaced in the
195+
audit: SafeCrypto `modernIsSecure`/`standardIsSecure` (3-line `isSecure`
196+
refactor), SafePath already-Refl-able pairs (already done in PR#57). Other
197+
modules require deeper triage.
198+
199+
## Honestly proven (carried forward, Proofs.idr re-audited 2026-05-20)
141200

142201
39 directories: SafeAPIKey, SafeArgs, SafeBase64, SafeCORS, SafeCSP, SafeCSRF,
143202
SafeCSV, SafeContentType, SafeCookie, SafeCrypto, SafeEmail, SafeEnv, SafeFile,
144203
SafeHSTS, SafeHTTP, SafeHeader, SafeHtml, SafeJWT, SafeJson, SafeMath,
145204
SafeNetwork, SafeOTP, SafePassword, SafePath, SafeRBAC, SafeRateLimiter,
146205
SafeRecord, SafeRedirect, SafeRegex, SafeSQL, SafeSRI, SafeSSRF, SafeSemVer,
147206
SafeShell, SafeString, SafeTOML, SafeUrl, SafeXML, SafeYAML — **plus**
148-
SafeOrdering (single-file, one discharged theorem). These are *claimed*
149-
proven; their `Proofs.idr` bodies are not re-verified by this pass.
207+
SafeOrdering (single-file, one discharged theorem). Their `Proofs.idr` bodies
208+
were re-audited 2026-05-20 under standards#158 Fork A: of the 39 directory-form
209+
modules, 6 are clean (zero bodyless decls), 28 had bodyless decls now
210+
annotated as explicit OWED, 5 had only fully-discharged proofs already. No
211+
silent postulates remain.
150212

151213
## Stubs — proof absence disguised as presence (CRITICAL) — *now empty*
152214

0 commit comments

Comments
 (0)