Skip to content

formal(phase1): unify P0 authority + P1 signed-object Lean project + CI gate (integrates #233)#238

Merged
hartsock merged 1 commit into
mainfrom
feat/phase1-authority-kernel
Jul 17, 2026
Merged

formal(phase1): unify P0 authority + P1 signed-object Lean project + CI gate (integrates #233)#238
hartsock merged 1 commit into
mainfrom
feat/phase1-authority-kernel

Conversation

@hartsock

Copy link
Copy Markdown
Member

Phase 1 kickoff — the formal foundation

Per the roadmap (Phase 0.5/1a): rather than rebuild, this harvests the valuable P1 Lean work from #233 (GPT-5/Codex) and integrates the P0 authority algebra into it, giving one Lake project that builds P0 + P1 together under a CI gate.

What's here

  • formal/Ceremony/P0/Authority.lean — the P0 authority algebra (product meet-lattice, attenuation L4, no-fail-open OB-9/OB-12, order-independence L1). 25 theorems, 0 sorry.
  • formal/Ceremony/P1/SignedObject.lean + Gate.lean + Tests/ — from formal: prove P1 signed-object contracts #233: profile/algorithm allowlist, canonical-encoding injectivity, the universal SignaturePreimage binding profile/codec/domain/store/thread/body/cid/signer (OB-13), counterexample + contract tests, and the formalGate proof-escape check.
  • Lake project (lakefile, toolchain v4.31, manifest) — lake build9 jobs, exit 0; lake exe formalGate → green. No Mathlib; builds in seconds.
  • .github/workflows/formal.yml — Tier-3 CI gate (ubuntu + windows).
  • just check-formal (graceful skip if Lean absent) + pre-push parity (HOOK PARITY, ADR 0023).
  • .gitignore **/.lake/; ROADMAP Phase 0 updated.

Test plan

  • just check-formallake build (9 jobs) + lake exe formalGate, exit 0.
  • Full pre-push gate passed on push ([pre-push] OK).

Integrates #233

The P1 signed-object Lean contracts were authored by GPT-5/Codex in #233; this PR incorporates them alongside P0. #233 can close as integrated once this lands.

Next (Phase 1c)

The pure Rust authority kernel mirroring Ceremony/P0/Authority.lean, extracted by Charon and proven by Aeneas to refine it — gated on the opam/OCaml leg (docs/TOOLCHAIN.md). No wire structs frozen here; kernel stays pure.

Refs #229 (merged spec), #233 (integrated), #232 (design plans).

…e Lean project + CI gate

Phase 1 kickoff. Rather than rebuild, harvest the valuable P1 Lean work from
PR #233 (GPT-5/Codex) and integrate the P0 authority algebra into it, giving
one Lake project that builds P0 + P1 together.

- formal/Ceremony/P0/Authority.lean — the P0 authority algebra (moved from
  formal/lean/; namespaced Ceremony.P0): product meet-lattice, attenuation
  (L4), no-fail-open (OB-9/OB-12), order-independence (L1). 25 theorems, 0 sorry.
- formal/Ceremony/P1/SignedObject.lean, Gate.lean, Tests/ — harvested from
  PR #233: profile/algorithm allowlist, canonical-encoding injectivity, the
  universal SignaturePreimage binding profile/codec/domain/store/thread/body/
  cid/signer (OB-13), + counterexample/contract tests + the formalGate
  proof-escape gate.
- Lake project (lakefile, lean-toolchain v4.31, manifest) — lake build (9 jobs)
  plus lake exe formalGate, green; no mathlib, builds in seconds.
- .github/workflows/formal.yml — Tier-3 CI gate (ubuntu+windows).
- justfile check-formal (graceful skip if lake absent) + pre-push parity.
- .gitignore: **/.lake/ build artifacts.
- ROADMAP Phase 0 updated; only the opam leg remains before Charon/Aeneas
  Rust->Lean refinement (Phase 1c).

Incorporates PR #233 (P1 signed-object Lean contracts, GPT-5/Codex); #233 can
close as integrated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hartsock hartsock added the documentation Improvements or additions to documentation label Jul 17, 2026
@hartsock
hartsock merged commit 831ed8c into main Jul 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant