ci: make CI genuinely green — rust-ci toolchain pin + canonical Julia ABI-FFI gate#42
Merged
Merged
Conversation
…emantics Add a flagship machine-checked semantic proof raising the Tlaiser Idris2 ABI to Layer 2. Models a two-process lock-based mutual-exclusion state machine (the canonical PlusCal example) with an Init predicate, a nondeterministic Step relation, and an inductive Reachable closure. Headline theorem (safetySound): mutual exclusion (Safe) holds on every reachable state. The engine is invInductive (TLA+ INV1): a strengthened, genuinely inductive invariant Inv that couples "process is Critical" to "process holds the lock" holds initially (initEstablishes) and is preserved by every transition (stepPreserves), hence holds on all reachable states; Safe is derived from Inv (invImpliesSafe). Includes a sound+complete Dec (decSafe), a Result-valued certifier with soundness (certifyReachableSound), a positive control (a real reachable Critical state, proven Safe) and negative controls (the (Critical,Critical) state has no Safe proof and is unreachable). The "both critical" bad case has no constructor, so a deliberately false safety witness is rejected by idris2 (non-vacuity verified). Builds clean (idris2 0.7.0, zero warnings). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
…inductive)
Add Tlaiser.ABI.Invariants, a deeper, distinct machine-checked theorem built
over the SAME Layer-2 state-machine model (St/Init/Step/Reachable/Inv in
Tlaiser.ABI.Semantics; no datatypes redefined).
Layer-2 proved INV1 for one hand-crafted invariant. Layer-3 proves the
meta-theorem that licenses modular invariant construction in TLA+/TLAPS:
andInductive : IsInductive p -> IsInductive q -> IsInductive (And p q)
"the conjunction of two inductive invariants is itself inductive."
Contents:
- IsInductive p: the two INV1 premises (established by Init, preserved by Step)
packaged as a first-class value so inductiveness can be combined.
- inductiveOnReachable: generic INV1 (any inductive p holds on all reachable
states), proved once polymorphically.
- andInductive: the headline composition theorem.
- HolderCrit: a SECOND, independent concrete invariant ("the lock holder is
Critical"), proved inductive from scratch (holderInit + holderStep over the
existing Step relation), packaged as holderIsInductive.
- combinedIsInductive / combinedOnReachable: Inv and HolderCrit composed via
andInductive, yielding the conjunction on every reachable state with no new
induction.
- decHolderCrit: sound + complete Dec for the second invariant; certifyHolder
reuses the Result ABI; certifyHolderReachableSound ties it together.
- Controls: positive (inhabited reachable witness of the conjunction +
decided Ok), negative (Not (HolderCrit (Idle,Idle,HeldBy0))), and a
distinctness/non-vacuity control (HolderCrit holds but Inv fails on
(Critical,Critical,Free) — proving the two predicates are genuinely
different).
Clean build, zero warnings; adversarial false statements rejected. No
believe_me/postulate/assert_total/idris_crash. %default total throughout.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
Prove resultToInt is a sound wire encoding for the Tlaiser FFI Result enum: a total faithful decoder intToResultSeam with resultRoundTrip (encode-then-decode = identity), and resultToIntInjective derived from the round-trip via cong + justInjective. Includes positive decode controls and a machine-checked non-vacuity control (Ok and Error have distinct wire integers). Genuine total proofs; no escape hatches. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
Assembles the existing proven facts of every prior ABI layer into one inhabited record value, abiContractDischarged : ABISound: - Layer 2 flagship safety (Semantics.positiveControl) - Layer 3 deeper invariant (Invariants.positiveControl: Inv & HolderCrit) - Layer 4 FFI seam (FfiSeam.resultToIntInjective) Genuine composition only (no believe_me/postulate/assert_total/etc.); if any prior layer were unsound this value would not typecheck. Adversarial check confirms a bogus seam witness is rejected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
…ble fix); port ABI-FFI gate Python->Bash (Python is estate-banned) Resolves the standing baseline CI reds (rust-ci toolchain error, governance Language/anti-pattern, governance workflow-lint) without altering the proven ABI. The Bash gate reproduces the former Python gate's verdict verbatim (validated across all -iser repos) and catches the same drift classes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
…simiser) in place of the interim Bash port
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.
Summary
Make CI genuinely green. The shared rust-ci pin on
mainpredates standards#439, so the SHA-pinneddtolnay/rust-toolchainstep errors out before the job runs. This bumps the pin so rust-ci actually runs and replaces the estate-banned Python ABI-FFI gate with the canonical Julia gate (matchesverisimiser). The Rust sources are already fmt + clippy(-D warnings) clean.Changes
rust-ci-reusable.ymlpind135b05→8dc2bf0(currentstandardsHEAD; includes #439 toolchain fix + #441/#442).scripts/abi-ffi-gate.py(Python banned estate-wide); addscripts/abi-ffi-gate.jl(behaviour-identical Julia port); workflow installs Julia 1.11.5. Matchesverisimiser's canonical gate.RSR Quality Checklist
Required
cargo test --locked --all-targets)cargo fmt --all -- --check)cargo clippy --locked --all-targets -- -D warnings).envfiles includedAs Applicable
Testing
Verified locally with the toolchain CI uses (cargo 1.94.1, rustfmt 1.8.0):
cargo fmt --check,clippy -D warnings,cargo check --locked,cargo test --lockedall pass.🤖 Generated with Claude Code
Generated by Claude Code