Skip to content

Commit 5214629

Browse files
Merge pull request #24 from hyperpolymath/proof-debt/vclut-124-phase4-owed
vcl-ut Phase 4: discharge layout + L6-L10 join-closure proof debt (standards#124)
2 parents 233b9c0 + 54c2d27 commit 5214629

13 files changed

Lines changed: 881 additions & 278 deletions

File tree

.github/workflows/proof-corpus.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,24 @@ jobs:
3737
- name: Checkout repository
3838
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3939

40-
# NOTE: pin to a commit SHA per repo security posture once a stable
41-
# release SHA is recorded (TODO(SHA-pin); tags used here interim).
42-
- name: Set up Idris2 0.8.0
43-
uses: idris-community/setup-idris@v1
44-
with:
45-
idris-version: 0.8.0
40+
# Idris2 0.8.0 is built from PINNED official source. The former
41+
# `idris-community/setup-idris` action's repository no longer
42+
# resolves (404), and no maintained equivalent exists; a
43+
# SHA-pinned source build is deterministic, version-exact, and
44+
# depends on no third-party action (matches the repo's pin
45+
# posture). `idris-lang/Idris2` tag v0.8.0 == commit
46+
# 15a3e4e70843f7a34100f6470c04b791330788df.
47+
- name: Build & install Idris2 0.8.0 from pinned source
48+
run: |
49+
set -euo pipefail
50+
sudo apt-get update -qq
51+
sudo apt-get install -y --no-install-recommends chezscheme make gcc
52+
git clone --no-checkout https://github.com/idris-lang/Idris2.git /tmp/Idris2
53+
git -C /tmp/Idris2 checkout 15a3e4e70843f7a34100f6470c04b791330788df
54+
make -C /tmp/Idris2 bootstrap SCHEME=chezscheme
55+
make -C /tmp/Idris2 install PREFIX="$HOME/.idris2"
56+
echo "$HOME/.idris2/bin" >> "$GITHUB_PATH"
57+
echo "IDRIS2_PREFIX=$HOME/.idris2" >> "$GITHUB_ENV"
4658
4759
- name: Proof-escape audit (no believe_me / postulate / assert_* / sorry)
4860
run: |
@@ -51,7 +63,8 @@ jobs:
5163
files="src/core/Grammar.idr src/core/Schema.idr src/core/Decide.idr \
5264
src/core/Levels.idr src/core/Checker.idr \
5365
src/core/Composition.idr src/core/Epistemic.idr \
54-
src/interface/abi/Types.idr src/interface/abi/Layout.idr"
66+
src/interface/abi/Types.idr src/interface/abi/Layout.idr \
67+
src/interface/abi/LayoutProofs.idr"
5568
if grep -nE '\b(believe_me|really_believe_me|assert_total|assert_smaller|idris_crash|postulate|sorry)\b' \
5669
$files | grep -vE ':\s*(--|\|\|\|)' ; then
5770
echo "::error::proof-escape symbol found in the Phase-1 corpus"

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
## [Unreleased]
1212

13+
### Verified
14+
15+
**VclTotal proof corpus — Phase 0→4 remediation** (2026-05-18/19,
16+
hyperpolymath/standards#124). The `src/core/**` Idris2 corpus, which at
17+
Phase 0 did not compile and had never been machine-checked, is now
18+
CI-gated and green:
19+
20+
- `verification/proofs/vclut-core.ipkg` builds clean under idris2 0.8.0
21+
(`idris2 --build`, exit 0, `%default total`) as **10 modules**, with
22+
**zero proof-escape symbols** (no `believe_me`/`postulate`/`assert_*`/
23+
`idris_crash`/`sorry`), enforced by `.github/workflows/proof-corpus.yml`.
24+
- Phase 1 (#21): corpus resurrection — `ABI.Types`/`Grammar` repaired,
25+
`.ipkg`/CI added, L4 verified in situ.
26+
- Phase 2 (#22): L2/L3/L5 de-vacuized over the shared `Core.Decide`
27+
deciders + `checkLevel2/3/5Sound` + genuine `composeJoin` closure.
28+
- Phase 3 (#23): L1 + L6–L10 soundness; `Checker.certifyAt`/
29+
`certifyRequested` assemble a genuine dependent `SafetyCertificate`;
30+
`ABI.Layout` made sound; Phase 3d removed the fabricating Zig FFI
31+
(now fail-closed) and added the proof-gated `Checker.certifiedLevel`.
32+
- Phase 4 (PR #24): `ABI.LayoutProofs` (genuine alignment/no-padding/
33+
bounds) + L6–L10 `composeJoin` closure (`l6..l9Compose`,
34+
`epiStructJoin`); L10 acyclicity carried by the explicit
35+
`JoinSideCondition` (provably non-closed, not faked).
36+
37+
`verification/proofs/VERIFICATION-STANCE.adoc` is the authoritative,
38+
precisely-scoped catalogue (residual OWED items disclosed, not masked).
39+
1340
### Renamed
1441

1542
**V{Q→C}L-{UT→total}** (2026-04-05). Full repo-wide migration of the project

CLAUDE-CROSS-SESSION-NOTE.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

PROOF-NEEDS.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
- **LOC**: ~8,000
77
- **Languages**: Rust, ReScript, Idris2, Zig
88
- **Existing ABI proofs**: `src/interface/abi/*.idr` + domain-specific Idris2: `src/core/Checker.idr`, `Grammar.idr`, `Levels.idr`, `Schema.idr`, `Composition.idr`
9-
- **Machine-verified**: `verification/proofs/SafetyL4Model.idr` only (idris2 0.8.0 `--check`, exit 0, zero proof escapes) — the Level-4 SQL-injection remediation
10-
- **Dangerous patterns**: ⚠️ The `src/core/**` Idris2 corpus **does not compile** on `origin/main` and has **never been machine-checked** (no `.ipkg`/CI). `ABI.Types` has ≥4 type errors; `Grammar.idr` forward-references types with no `mutual` block. L2/L3/L5 safety predicates are **vacuous** (inhabited for any input, incl. injection); `SafetyCertificate` is never constructed by `checkQuery`; the Zig FFI is a `SELECT`-substring stub. See `verification/proofs/VERIFICATION-STANCE.adoc` for the authoritative, proof-backed catalogue. The earlier "None detected" line was wrong.
9+
- **Machine-verified**: the full `VclTotal` proof corpus — `verification/proofs/vclut-core.ipkg` builds clean under idris2 0.8.0 (`idris2 --build`, exit 0, `%default total`, **zero proof-escape symbols**, CI-gated by `.github/workflows/proof-corpus.yml`) as **10 modules** (`ABI.{Types,Layout,LayoutProofs}` + `Core.{Grammar,Schema,Decide,Levels,Checker,Composition,Epistemic}`), plus the self-contained `verification/proofs/SafetyL4Model.idr` (`--check`, exit 0). Phases 1–3 are on `origin/main` (PRs #21/#22/#23); Phase 4 (`LayoutProofs` + L6–L10 `composeJoin` closure) is **PR #24**, pending merge.
10+
- **Status (Phase 0 → 4 RESOLVED, honestly)**: the Phase-0 blockers are fixed, not faked — the corpus compiles and is machine-checked; `ABI.Types`/`Grammar` errors repaired; **L2/L3/L5 de-vacuized** (Phase 2, evidence-carrying predicates over `Core.Decide`); all ten levels carry `checkLevelNSound` and `Checker.certifyAt`/`certifyRequested` assemble a genuine dependent `SafetyCertificate` (Phase 3); the Zig FFI is no longer a fabricating stub — it is **fail-closed** with a proof-gated `Checker.certifiedLevel` mint (Phase 3d). Remaining honest gaps are precisely scoped (FFI proof-transport, string→`Statement` parser, L3 subquery/heuristic scoping, L9/L10 predicate depth, the additive↔ceil `alignUp` sliver). `verification/proofs/VERIFICATION-STANCE.adoc` is the authoritative, proof-backed catalogue and takes precedence over this file.
1111

1212
## What Needs Proving
1313

@@ -20,8 +20,9 @@
2020
- Prove: parser (ReScript side) accepts exactly the Idris2-specified grammar
2121

2222
### Level System (src/core/Levels.idr)
23-
- ✅ L4 `NoRawUserInput` de-vacuized + `checkLevel4Sound` + `noRawUserInputCompose` (verified in `verification/proofs/SafetyL4Model.idr`)
24-
- ⚠️ L2/L3/L5 predicates still vacuous — de-vacuize with evidence-carrying constructors and prove each `checkLevelN` sound (as done for L4)
23+
- ✅ L4 `NoRawUserInput` de-vacuized + `checkLevel4Sound` + `noRawUserInputCompose` (verified in `verification/proofs/SafetyL4Model.idr` and in situ in the corpus)
24+
- ✅ L2/L3/L5 de-vacuized (Phase 2) — evidence-carrying predicates over `Core.Decide`, with `checkLevel2/3/5Sound` and genuine `composeJoin` closure
25+
- ✅ L1 + L6–L10 sound (Phase 3) + genuine L6–L10 `composeJoin` closure (Phase 4: `l6..l9Compose`, `epiStructJoin`); L10 acyclicity carried by the explicit `JoinSideCondition` (provably non-closed, not faked)
2526
- 10-level type safety hierarchy — prove level ordering is a lattice
2627
- Prove: level promotion/demotion preserves query safety
2728

0 commit comments

Comments
 (0)