ci: make CI genuinely green — rust-ci toolchain pin + canonical Julia ABI-FFI gate + fmt/clippy#42
Merged
Merged
Conversation
Add Lustreiser.ABI.Semantics, raising the Idris2 ABI to Layer 2 with a machine-checked flagship proof of the repo headline (formally verified real-time embedded code via Lustre). Faithful model: a synchronous saturating bounded-counter Lustre node with Tick/Reset inputs, a static cap, and one-tick state memory; step/run give the synchronous execution semantics. Properties proven (no believe_me/postulate/assert): - Invariant preservation per tick: WithinBound c -> WithinBound (step i c) for every input, lifted to whole runs via runPreservesBound (no overflow). - Determinism (synchronous hypothesis): equal input streams from equal state yield equal output streams. - Sound+complete Dec (decWithinBound) + sound certifier (certifyBoundSound). - Positive controls (explicit witnesses, incl. a run that saturates) and a machine-checked negative control (overflowNotWithinBound) ensuring non-vacuity; a deliberately false witness is rejected by idris2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
…tInc monotonicity Adds Lustreiser.ABI.Invariants over the existing Semantics model (same Input/CounterNode/satInc/step/run). Proves a deeper, distinct class of property than the Layer-2 bound/cong-determinism: - FLAGSHIP: runAppend — run (xs ++ ys) c = run ys (run xs c), the monoid action / fold-fusion law, by genuine induction on the prefix (not cong). - Corollaries: runConsSplit, runResetClears, runEndingInResetIsZero (transition soundness consumed through runAppend). - ORTHOGONAL: satIncMonotone — order preservation of the saturating successor (m <= n => satInc cap m <= satInc cap n), plus stepTickMonotone. - decEqInput: sound+complete Dec for input equality. - Positive controls (appendWitness, resetSuffixWitness, monotoneWitness) and non-vacuity controls (prefixMatters, inputsDistinct, satIncNotConstant, all Not (...)). No believe_me/postulate/assert/idris_crash. %default total. Clean build, zero warnings; adversarial false-equality check rejected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
Add Lustreiser.ABI.FfiSeam proving the FFI result-code encoding is sound: - resultToIntInjective: distinct Result outcomes never collide on the wire - intToResult + resultRoundTrip: faithful/lossless decode (injectivity derived) - positive controls (concrete decodes = Refl) and a non-vacuity negative control (distinct codes have distinct ints, machine-checked) Genuine proof: %default total, no believe_me/postulate/assert_total/idris_crash. Builds clean (idris2 0.7.0) with zero warnings; false seam claim rejected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
Assemble the existing prior-layer proofs into one inhabited certificate.
ABISound bundles the key proven facts, one field per layer, reusing the
ACTUAL exported witnesses (no reproving, no fabrication):
- Layer 2 (Semantics): safeWatchdogWithinBound + safeRunWithinBound
(per-tick / whole-run saturating-counter safety bound)
- Layer 3 (Invariants): appendWitness (run is a monoid action / fold-fusion)
+ monotoneWitness (satInc monotonicity)
- Layer 4 (FfiSeam): resultToIntInjective (result-code encoding injective)
abiContractDischarged : ABISound is the single inhabited capstone value: if
any prior layer were unsound it would fail to typecheck. Non-vacuity verified
adversarially — a bogus flagshipBound claiming WithinBound (MkCounter 2 5) is
rejected (no LTE 5 2 witness). Builds with zero warnings under Idris2 0.7.0.
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, replaces the estate-banned Python ABI-FFI gate with the canonical Julia gate (matchesverisimiser), and brings the Rust sources to 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.cargo fmt+clippy --fixwhere the repo had pre-existing drift, socargo fmt --all -- --checkandcargo clippy --locked --all-targets -- -D warningspass.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