FrankenTerm

Formal Methods in This Repo

244 words1 min read3 subsectionsFrom the README at ft 0.15.21

On this page3
What's modeled whereThe "proof gauntlet" pathMethodology playbooks

The project uses formal methods where they earn their keep, typically on invariant-critical paths where the cost of an undetected bug is high.

What's modeled where

Tool Where What it proves
Loom runtime_async cancel-traces All interleavings of cancellation + recv/acquire avoid the lost-wakeup class
TLA+ docs/specs/tx-killswitch.tla Tx kill-switch invariants under arbitrary commit/compensate orderings
TLA+ docs/specs/blocker-radar-merge.tla Blocker-radar incident-merge invariants
TLA+ docs/specs/capture-fairness-scheduler.tla Round-robin scheduling fairness under priority overrides
TLA+ docs/specs/durable-state-checkpoint.tla Mux durable-state checkpoint correctness across crash + restore
Explicit-state models (Stateright-style, hand-rolled) tx_killswitch_model.rs, wire_dedup_model.rs, robot_fleet_state_machine.rs, robot_family_contract.rs Exhaustive small-bound state-space checks of the tx kill switch, wire dedup, fleet state machine, and work-claim atomicity (docs/attestations/proofs/robot-work-atomicity.json); no external model-checker crate is used
Lean docs/proofs/runtime-proof-soundness.lean The RuntimeProof sealed-trait argument (external code cannot implement Sealed)
proptest workspace-wide Property-based testing of serde roundtrips, parser invariants, state-machine transitions (many hundreds of suites)
dylint custom lints The lints/cx_propagation crate enforces Cx propagation conventions at lint time
cargo-deny deny.toml Tokio direct-dep ban; license + advisory checks

The "proof gauntlet" path

The current reality-check round (ft-tf6g3) is wiring the formal-methods substrate into the attestation graph. The intent is that every formal proof produces a per-release artifact slot; the DSR release gate runs the model checker and verifies the slot. Where proofs are vacuous (e.g., the current semantic-search PAC-Bayes bound until production data lands), the artifact says so explicitly rather than overstating coverage.

Methodology playbooks