Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
2ac921a
Refuse a grade that stands on a receipt recording failure
claude Nov 16, 2026
c8d6c5c
Narrow two prose claims to what the provers actually state
claude Nov 16, 2026
f37b92c
fix(pwg): reject receipt results with trailing newlines
coderabbitai[bot] Nov 16, 2026
da0d680
Anchor every PWG vocabulary and commit check at the true string end
claude Nov 16, 2026
bedc32f
Contain the dispatch job's egress instead of auditing it
claude Nov 16, 2026
7c289cb
Give the push/schedule Hypatia lane its fleet report-backs
claude Nov 16, 2026
94e10e2
Resolve every PWG witness name against the sources
claude Nov 16, 2026
3f6796f
Make PWG-2ii reachable: PWG-1 is about which commit receipts describe
claude Nov 16, 2026
f283023
Correct INTERFACE-REPORT where it stated the retired carrier as current
claude Nov 16, 2026
fd37323
Grade L4 and A2 by their parts (owner ruling: split)
claude Nov 16, 2026
e1a8cee
Let operators cancel the Hypatia scan
claude Nov 16, 2026
9e02d9b
Merge branch 'claude/new-session-snuoro' into claude/pwg-names-ladder
claude Nov 16, 2026
a79d514
Close a tab-split hole in rule 6; correct the A2-chain and census prose
claude Nov 16, 2026
c5c5147
Prove L4 in full and A2 (Fate is a chain); recheck both in Rocq and c…
hyperpolymath Nov 17, 2026
6106878
Amend ADR 0005 D4/D5: core Lean and Rocq are §2 recheck legs (#124)
hyperpolymath Nov 17, 2026
2324569
docs(verification): clarify manual correspondence review and sampled …
coderabbitai[bot] Nov 17, 2026
a33fa6a
Run all four proof developments in the just recipes (ADR 0005 amendme…
hyperpolymath Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/hypatia-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,23 @@ permissions:
security-events: write

jobs:
# The same producer fork-governance.yml runs on PRs. Without it this lane's
# reusable downloads `fleet-report-backs` (its default), finds no such
# artifact, and renders every enrolled fleet row 🟠 indeterminate — on
# every push and scheduled run, permanently. The reusable checks out
# `github.event.pull_request.head.sha || github.sha`, so it serves
# push/schedule unchanged. Same pin as fork-governance.yml.
fleet:
name: Fleet report-backs
uses: hyperpolymath/gitbot-fleet/.github/workflows/fleet-report-back-reusable.yml@8906f47f945d4675d7375eb78898ed0f1c48cc95
permissions:
contents: read

scan:
# After the fleet job whatever its result: a dead fleet job renders as
# orange fleet rows, never as a missing gate.
needs: [fleet]
if: ${{ !cancelled() }}
# Explicit on the calling job (a job-level block replaces, never merges
# with, the workflow-level one). The previous pin (cc58c0c…) no longer
# exists in standards, so this gate failed at startup with zero jobs —
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/instant-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@ jobs:
env:
HAS_DISPATCH_TOKEN: ${{ secrets.FARM_DISPATCH_TOKEN != '' }}
steps:
# This job holds FARM_DISPATCH_TOKEN; monitor its outbound egress
# (Hypatia RE001). Audit mode first: record every endpoint without
# risking the dispatch; tighten to block+allowlist once a main run
# shows the observed set.
- name: Harden runner (egress audit)
# This job holds FARM_DISPATCH_TOKEN, so its egress is CONTAINED, not
# merely audited (Hypatia RE001/RE002: audit mode is telemetry-only and
# never blocks). The only outbound call any step makes is
# repository-dispatch's POST /repos/{repo}/dispatches on api.github.com;
# action tarballs are fetched at job set-up, before this step arms. Same
# shape as the estate's other block-mode instant-sync workflows.
- name: Harden runner (egress block)
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
with:
egress-policy: audit
egress-policy: block
allowed-endpoints: >
api.github.com:443
- name: Trigger Propagation
if: env.HAS_DISPATCH_TOKEN == 'true'
uses: peter-evans/repository-dispatch@v4.0.1
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/proofs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ on:
paths:
- 'verification/proofs/lean4/**'
- 'verification/proofs/agda/**'
- 'verification/proofs/rocq/**'
- 'scripts/check-recheck-legs.sh'
- 'verification/pwg.json'
- 'scripts/pwg-derive.sh'
- 'scripts/pwg-check.sh'
Expand Down Expand Up @@ -207,6 +209,50 @@ jobs:
fi
echo "PASS: All.agda + Smoke.agda typecheck (${AGDA_FLAGS[*]}; --safe => postulate-free by construction)"

# PROOF-POLICY §2 recheck legs for the ratified-carrier order laws and L4 in
# full (TB.OrderLaws, TB.Monotone): a Rocq leg and a core-only Lean leg. No
# Mathlib, so unlike the lean-build packages below these legs can count
# (PROOF-POLICY §2: "No Mathlib, in Lean or elsewhere"). The gate is
# scripts/check-recheck-legs.sh, which runs the same way locally: pinned
# prover version asserted, compile, an axiom audit that fails on any axiom
# AND on an empty audit domain, then six planted controls that must each be
# caught (Admitted, sorry, a user axiom, an empty domain, and a definition
# drift that only the TB.Bridge tables can see).
# TOOLCHAIN: Ubuntu 24.04's coq package is Coq 8.18.0 (the version mathesis
# pins; the script refuses any other). Lean 4.16.0 (the repo's pin) is the
# GitHub release archive, checked against the SHA-256 observed 2026-11-17.
recheck-legs:
name: "Recheck legs (Rocq 8.18.0, Lean 4.16.0 core): order laws + L4"
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install Coq 8.18.0 (apt) and Lean 4.16.0 (pinned, checksummed)
shell: bash
env:
LEAN_URL: https://github.com/leanprover/lean4/releases/download/v4.16.0/lean-4.16.0-linux.tar.zst
LEAN_SHA256: cdd31f1064783fff163be53e285722102f16767e65e6fb7f7cb1c232514e0c3a
run: |
set -euo pipefail
sudo apt-get update -q
sudo apt-get install -y -q --no-install-recommends coq zstd
cd "$RUNNER_TEMP"
curl --fail --proto '=https' --proto-redir '=https' --tlsv1.2 -sSL -o lean.tar.zst "$LEAN_URL"
echo "$LEAN_SHA256 lean.tar.zst" | sha256sum -c -
tar --zstd -xf lean.tar.zst
echo "$PWD/lean-4.16.0-linux/bin" >> "$GITHUB_PATH"
- name: Rocq leg (compile + Print Assumptions on every declaration)
shell: bash
run: bash scripts/check-recheck-legs.sh rocq
- name: Lean leg (check + collectAxioms on every declared theorem)
shell: bash
run: bash scripts/check-recheck-legs.sh lean
- name: Planted controls (each must be caught)
shell: bash
run: bash scripts/check-recheck-legs.sh controls

# The Lean developments actually built. `lean-source-honesty` above is a cheap
# syntactic guard that runs in seconds on every push; this is the semantic one,
# and it is what makes ADR 0003's "grade-algebra ground truth" a measured claim
Expand Down
178 changes: 171 additions & 7 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,164 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning].

=== [Unreleased]

==== Added

* *L4 in full and A2 (Fate is a chain) proved, and rechecked in Rocq and
core Lean (2026-11-17).*
+
The owner ruled to prove, not narrow. `+TB/Monotone.agda+` proves bond and merge
monotonicity and the lifting to the grade composition (one argument at a time, and
both at once as `+▷-mono+`). `+TB/OrderLaws.agda+` proves that `+fateLte+` is
transitive, antisymmetric and total (`+fate-isTotalOrder : IsTotalOrder _≡_ _≤F_+`),
and that `+⊑+` is a decidable preorder. No existing definition changed.
+
The repository's first Rocq development, `+verification/proofs/rocq/RatifiedOrder.v+`
(Coq 8.18.0, no `+Require+`), and a core-Lean file with no import,
`+verification/proofs/lean4/ratified-order/RatifiedOrder.lean+` (Lean 4.16.0, no
Mathlib), re-prove all of it. `+TB/Bridge.agda+` pins six restated definitions to
the Agda on a fixed sample (exhaustive for Bond and Merge), and each leg proves the
same six literals. A planted one-clause drift that keeps every theorem true is
caught only by the bridge, in both legs. `+scripts/check-recheck-legs.sh+` is the
gate. It asserts the prover version, audits every declaration for axioms, fails
on an empty audit, and runs six planted controls. CI runs it as the new
`+recheck-legs+` job.
+
Ledger: `+L4-bond-merge+`, `+L4-lifting+`, `+A2-chain+` and `+retention-order+` gain
`+PROVEN+` Agda legs. All seven L4/A2/retention rows gain `+RECONCILED+` Rocq and
Lean legs, with receipts from CI run 44006871652 on `+d5234b1+`. The census moves
from 28 obligations (`+PWG-3+` 18, ungraded 10) to 28 (`+PWG-3+` 15, `+PWG-2ii+` 7,
ungraded 6). The derivation does not reach `+PWG-1+`, because the receipts are not at
the ledger's source commit. The core-Lean leg counts by owner ruling of 2026-11-17,
which ADR 0005 records in its amendment: the 2026-11-09 ruling ("Lean is a
generator, not a leg") covers the Mathlib development only.

==== Fixed

* *The proof recipes run all four proof developments in their ADR 0005 D4
roles (2026-11-17, upkeep).*
+
The ADR 0005 amendment named this as upkeep: the recipes D5 touched still
described three provers. `+build/just/proofs.just+` gains `+proof-check-rocq+`,
`+proof-check-lean-core+` and `+proof-check-recheck-controls+`, which run
`+scripts/check-recheck-legs.sh rocq|lean|controls+`, and `+recheck-legs+`, which
runs all three as the CI job of that name does. A missing or wrong-version prover
fails; it never skips. `+proof-check-all+` and `+verify-all+` now include them, so
both also need `+coqc+` 8.18.0 and `+lean+` 4.16.0. `+proof-status+` lists the four
developments by role, with the PWG census in place of a summary row that
PROOF-STATUS no longer has.
+
`+proof-check-lean4+` had failed since the core-Lean leg landed (#122), with or
without a toolchain problem. Its orphan guard counted `+lean4/ratified-order/RatifiedOrder.lean+` as a file no lake package
builds. That file is the core-Lean leg, which the recheck gate checks. The guard
now exempts exactly the file the gate names, so a stray file beside it still
fails. `+proof-check-rocq+` has the same guard for `+.v+` files. No proof, ledger
entry or grade changed.

* *Every PWG witness name now resolves, the ladder's top two rungs are
distinct, and L4 and A2 are graded by their parts (2026-11-16).*
+
_Witness names._ Nothing read the ledger's `+declarations+`: 13 of 91 distinct
witness names named nothing in the sources — ASCII transliterations
(`+|>+` for `+▷+`, `+|=+` for `+⊑+`, `+beta-+` for `+β-+`, `+-r+` for `+ʳ+`),
kebab-case spellings of camelCase lemmas, `+gmonoid-unit+` for the pair
`+gmonoid-unitL+`/`+gmonoid-unitR+`, and a Lean name in the wrong namespace. L2's
only Agda witness and all three veridicality-derivation witnesses were among them,
on rows published `+PWG-3+`. `+scripts/pwg-names.sh+` inventories the declared
names (through the comment stripper) and `+scripts/pwg-check.sh+` rule 6 resolves
every Agda and Lean witness against it. The 13 are corrected; no grade moved.
Canaries 25–26 fail against the pre-rule-6 gate. Review then found that a
citation with a tab and text appended split into an extra field the resolver
ignored, so the real prefix resolved; each field is now JSON-escaped before
resolution, and canary 29 (which fails against the first version) plants it.
+
_Ladder._ With both recheck legs counting, the derivation's `+PWG-1+` test
re-checked conjuncts counting already implied, so `+PWG-2ii+` was unreachable and
`+PWG-1+` was granted on `+PWG-2ii+` evidence (measured: receipts recording commit
`+ffff…+` derived `+PWG-1+`). §8.2/§8.5.2 make `+PWG-1+` a question of which commit
the receipts describe; the branch now requires each counted witness's receipt to
record the ledger's source commit. Latent — no obligation has two counting legs.
Canaries 27–28 read the derived grade; 28 fails against the pre-fix derivation.
The suite stands at *29/29*.
+
_L4 and A2, split (owner ruling 2026-11-16)._ "L4 (monotonicity), in full" and
"Fate is a chain (A2)" derived `+PWG-3+` from Agda legs whose own notes conceded they
covered only part of the statement. L4 is now four obligations — `+L4-fate+` and
`+L4-fidelity+` (`+PWG-3+`), `+L4-bond-merge+` and `+L4-lifting+` (ungraded) — and A2
two: `+A2-directions+` (`+PWG-3+`) and `+A2-chain+` (ungraded; Lean states only
totality and reflexivity, transitivity is proved in Idris2 off the ladder, and
antisymmetry is cited nowhere, so its Lean leg is `+OPEN+` too). The
census moves from 24 theory obligations (`+PWG-3+` 17, ungraded 7) to 28
(`+PWG-3+` 18, ungraded 10). The denominator changed because the obligations
did; no evidence changed.
+
_INTERFACE-REPORT._ It said `+fate-tier-meet-hom-fails+` "would be false under a
commutative model"; the carrier is commutative (`+grade-comm+`) and the theorem
holds on it. It named `+grade-not-comm+` and `+cut-symmetric-fails+` as live (both
replaced), stated the retired clause `+dropped ▷f falsified = dropped+` as
definitional (the ratified clause is `+= falsified+`), and gave
`+GradeBoundary.lean+`'s axiom bound as `+propext+`/`+Quot.sound+` only, where the
file's own footer names three. All corrected; prose only.

* *Two prose claims narrowed to what the provers actually state (2026-11-16).*
Both were raised in review on #114 and merged unaddressed.
+
`+README.adoc+` said `+psiBond+` "separates honest from deceptive bonds". The Lean
file states one pair: `+psiBond_separates_honest_deceptive+` is
`+psiBond Bond.severed ≠ psiBond Bond.misbound+`, by `+total ≠ unknown+`. The
general claim is believed and is a single `+cases+` away — `+psiBond intact+` and
`+psiBond withheld+` are both `+Q 0+`, and `+Q_ne_unknown+` is already in the same
file — but it is *not* a theorem today, so the README no longer asserts it. It is
not added here because no Lean toolchain was available to check it, and an
unverified theorem in a proof file is the thing these gates exist to stop.
+
`+INTERFACE-REPORT.adoc+`'s F4 checklist said "the deceptive tier is
forward-closed (L5)". The checklist refutes that two bullets above: the fate
*tier* is not closed under `+▷+` on the right, and `+fate-tier-meet-hom-fails+` is
the witness — `+dropped ▷f atten unknown+` reduces to `+dropped+`, which is
`+honestLossy+`, although `+atten unknown+` is tier-deceptive. What Agda proves is
`+deceptive-absorbs-▷+`: the grade-level *predicate*, closed in its *left*
argument. Both qualifications now appear, with the distinction `+TB/Tier.agda+`
already drew in a comment ("does not launder the GRADE-level deceptive
predicate") lifted into the report.

* *A receipt that records FAILURE no longer supports a grade (2026-11-16).*
`+scripts/pwg-derive.sh+` read a receipt's `+state+` but never its `+result+`.
Measured against `+main+` `+0dceab6+`: flipping this repository's Agda receipt to
`+"result": "fail"+` while leaving `+"state": "current"+` left the derived census
*byte-identical* — 17 `+PWG-3+` grades still published on a receipt recording the
checker *rejecting* the development — and `+scripts/pwg-check.sh+` exited `+0+`.
A grade may not outlive the run that earned it; a regressed run is §8.2 evidence
of the opposite. `+usable_receipt+` and `+pwg3_receipt+` now both require
`+result == "pass"+`, and rule 3 constrains `+result+` to the closed vocabulary
`+pass|fail+` so an unrecognised value is an error rather than a silent
non-pass. With the fix the same planted receipt collapses the census to
`+PWG-3+` 0, `+ungraded+` 24. Canaries 20 and 21 plant exactly these two cases
and were confirmed to FAIL against the pre-fix scripts. Canary 22 plants a
`+result+` of `+"pass\n"+`: jq's `+$+` anchor matches before a final newline, so
the rule-3 check admitted it. Rule 3 now compares `+result+` by exact equality.
+
The same defect sat in the seven sibling anchors: the commit check in rule 3
and in both derivation predicates, and the `+state+`, token, §2.2-state and route
vocabularies. Measured: a 40-hex commit followed by a newline passed the *whole*
gate, derivation included, so a malformed provenance field could carry a grade.
All seven are now anchored with `+\A…\z+`. Canaries 23 and 24 plant a trailing newline on a
commit and on a token; both FAIL against the pre-fix scripts and PASS against
the fix. The suite is now *24/24*.
+
Two things this change did *not* do are worth recording, because each was tried
and rejected on evidence. The ShellCheck `+SC1112+` warning on `+pwg-derive.sh+`
could not be fixed the obvious way: that comment sits inside the single-quoted
`+jq+` program, so replacing the Unicode right-quote with a plain apostrophe
*terminated the string* and broke the script — caught immediately by the suite's
own live-ledger canary. The comment is reworded to contain no apostrophe at all,
and the block now carries a warning saying why. And `+SC2030+`/`+SC2031+` were
not silenced: the meta-canary shadowed `+PASS+`/`+FAIL+` inside a command
substitution to discard the probe's deliberate failure, which tainted *ten*
later reads of the real counters. It now reads the probe's verdict line instead,
so the warnings go away by construction rather than by suppression.
`+shellcheck 0.11.0 --severity=style+` — the version and severity CI pins — is
clean over every tracked `+*.sh+`, with no disable added.

* *A comment marker inside a string literal is no longer read as a comment
(2026-11-09).* `+tests/lib/strip-proof-comments.awk+` tracked block comments with
no notion of string literals, so `+def m : String := "/-"+` opened a block
Expand Down Expand Up @@ -65,7 +221,8 @@ count is now part of the claim.
+
Added canary 19, the *meta-canary*: it breaks one canary's own `+jq+` program and
asserts the suite reports FAILURE. It fails against the pre-fix harness, which
is what makes it evidence rather than decoration. The suite is *19/19*, and all
is what makes it evidence rather than decoration. The suite stands at *24/24*
once the receipt-result canaries recorded below are counted, and all
four breakages — a corrupted transform, a no-op fixture, a dropped group, and a
suite that cannot see its own breakage — were each confirmed to fail it.

Expand Down Expand Up @@ -102,7 +259,8 @@ Wired: `+just pwg+` (census and per-obligation grades), `+just pwg-render+`
job in `+proofs.yml+` that needs no prover because the kernels already ran.
+
Falsified, not assumed: `+scripts/test-gate-falsifiability.sh+` gains seven PWG
canaries plus a control, and the suite now runs 18/18. Two are load-bearing —
canaries plus a control, taking the suite to 18 cases at that point (it stands at
*24/24* after the later entries in this same block). Two are load-bearing —
removing the import cone collapses all 17 `+PWG-3+` to `+ungraded+` (census
`+ungraded+` 24), and flipping one Lean leg to `+RECONCILED+` lifts that
obligation to `+PWG-2i+` — so they fire only if the published table really is
Expand All @@ -113,11 +271,17 @@ receipts, the derivation returns `+PWG-1+`.

* *Proof Witness Grades recorded, and the proof records reconciled with the
sources (2026-11-09).* `+docs/status/PROOF-STATUS.adoc+` gains the §8.5 PWG record
that `+PROOF-POLICY.adoc+` §8 (owner ruling 2026-11-04) requires, with both theory
groups derived as `+ungraded+` — Theorem B for want of a §2.1-conformant *receipt*
(its flags in force already are §2.1), the Lean-witnessed results for want of an
Agda *source* — plus the §1.1 import-cone record and a census in the form §8.4
rule 7 allows. Four published rows narrowed to what the provers actually state: L3
that `+PROOF-POLICY.adoc+` §8 (owner ruling 2026-11-04) requires, plus the §1.1
import-cone record and a census in the form §8.4 rule 7 allows. *As first
drafted this entry read "both theory groups derived as `+ungraded+`"; that
reading was superseded within this same block* by the evidence ledger below,
which records the §2.1-conformant Agda receipt the first reading treated as
missing, and so derives `+PWG-3+` for 17 of the 24 theory obligations and
`+ungraded+` for 7 — on three §8.1 grounds: no §2.1-conformant receipt, no
Agda source at all, or an incomplete Agda leg. The last applies to
`+retention-order+` and `+tier2-membership+`: their Agda token is `+OPEN+`
despite a current, passing Agda receipt, as the ledger and breakdown above record.
The published census is the derived one, and `+scripts/pwg-check.sh+` fails on any drift between them. Four published rows narrowed to what the provers actually state: L3
(two-sidedness is stated only for `+Falsified+` in Agda), L4 (Agda covers fate and
fidelity; Lean covers fate; bond, merge and the grade-level lifting have an Idris2
leg only, which §8.1 excludes from the ladder), Target 3 (`+_↝_+` has two
Expand Down
Loading
Loading