feat(ceremony): P0 authority + enforcement-boundary kernel in Rust (Charon/Aeneas refinement target)#241
Merged
Merged
Conversation
…or Authority.lean
First Rust of the narrow waist (roadmap Phase 1, "prove the waist"). A new pure
crate `agent-bridle-ceremony` mirroring formal/Ceremony/P0/Authority.lean:
Authority = Effect × Assurance × Scope (product meet-lattice, ADR 0020)
- per-axis finite chains with rank()/meet() (GLB = lower rank)
- Authority::meet (componentwise), le, attenuate, BOTTOM (⊥), TOP (⊤)
- Resolution { NeedsDecision | Decided(Authority) }
- resolve(&[Authority]): empty ⇒ NeedsDecision (NOT ⊤ — the OB-9/OB-12
no-fail-open clause), else the fold-meet of matches (L1)
Dependency-free, total, panic-free, #![forbid(unsafe_code)] — chosen for
Charon/Aeneas extractability (Phase 1c): the Lean file states the laws as
theorems, this crate is what Aeneas will prove refines them once the opam leg
lands (docs/TOOLCHAIN.md). NO wire format here (serde/records/signatures are P1
so stay HELD until Phase-1d vectors); publish = false until the waist is proven.
Until Aeneas is wired, the same laws are discharged by EXHAUSTIVE enumeration
over the 18-point finite domain — the Rust analogue of the Lean proofs'
`by cases <;> decide`. 12 tests + doctest, all green:
- axis + product meet comm/assoc/idem (mirror *.meet_comm/assoc/idem)
- meet_never_amplifies + attenuate bounded by input and ceiling (meet_le_*/PO-4)
- sequential ceilings collapse to one meet (attenuate_compose)
- ⊥ absorbs / ⊤ is identity
- resolve empty ⇒ NeedsDecision, never Decided(⊤) (no fail-open)
- resolve order-independent + = meet of all matches (resolve_swap / L1)
fmt + clippy (-D warnings, all-features and no-default-features) clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
|
Grew this into the complete P0 Rust kernel: added |
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The pure Rust waist begins
First Rust of the narrow waist (roadmap Phase 1, "prove the waist"). New crate
agent-bridle-ceremonymirroringformal/Ceremony/P0/Authority.lean:rank()/meet()(GLB = lower rank)Authority::meet(componentwise),le,attenuate,BOTTOM(⊥),TOP(⊤)Resolution { NeedsDecision | Decided(Authority) }resolve(&[Authority]): empty ⇒NeedsDecision(not⊤— the OB-9/OB-12 no-fail-open clause), else the fold-meet of matches (L1)Why it looks the way it does
Dependency-free, total, panic-free,
#![forbid(unsafe_code)]— chosen for Charon/Aeneas extractability (Phase 1c). The Lean file states the laws as theorems; this crate is what a future Aeneas proof will show refines them, once the opam leg lands (docs/TOOLCHAIN.md). No wire format here — serde/records/signatures are P1 and stay HELD until the Phase-1d conformance vectors;publish = falseuntil the waist is proven.Verification (until Aeneas is wired)
The same laws are discharged by exhaustive enumeration over the 18-point finite domain — the Rust analogue of the Lean proofs'
by cases <;> decide. 12 tests + doctest, all green:*.meet_comm/assoc/idem)meet_never_amplifies+attenuatebounded by input and ceiling (meet_le_*/ PO-4)attenuate_compose)resolveempty ⇒NeedsDecision, neverDecided(⊤)(no fail-open)resolveorder-independent + = meet of all matches (resolve_swap/ L1)Test plan
cargo test -p agent-bridle-ceremony→ 12 + 1 doctest pass.cargo clippy -p agent-bridle-ceremony --all-targets --all-featuresand--no-default-features→ zero warnings.Risk
Low — a new, isolated,
publish = falsecrate with no dependencies and no consumers yet; touches only the workspace member list. Adds no wire format (nothing frozen).Next (Phase 1c): stand up the opam/OCaml leg so Aeneas can prove this refines
Authority.lean— upgrading "exhaustively tested mirror" to "proven refinement."