Skip to content

Commit 551bd42

Browse files
mswilkisonclaude
andcommitted
ci(tbtc-signer): add formal verification workflow (moved from tbtc-v2)
Adds a focused workflow that runs the Rust signer's formal-invariant test suite + TLA model checks. Moved from threshold-network/tbtc-v2/.github/workflows/ci-formal-verification.yml (jobs `signer-formal-invariants` + `tla-model-checks`) per extraction plan v38 §3.1 — the signer code lives here at pkg/tbtc/signer/, not in tbtc-v2, so the CI jobs that exercise it belong here too. Jobs - signer-formal-invariants: cargo test --manifest-path pkg/tbtc/signer/ Cargo.toml formal_verification_ (filter to formal-only cases) - tla-model-checks: pkg/tbtc/signer/scripts/formal/run_tla_models.sh (iterates over .cfg files in pkg/tbtc/signer/docs/formal/models/ and runs TLC against each; MODELS_PATH env var allows override per the path-normalization commit b84b574c on this branch) Triggers - pull_request on pkg/tbtc/signer/** changes + this workflow file - schedule nightly at 05:23 UTC (mirrors monorepo's pattern of running formal invariants both on PRs and nightly) - workflow_dispatch for manual runs Related changes in companion PR threshold-network/tbtc-v2#971: - Removed these jobs from canonical tbtc-v2's ci-formal-verification.yml - Added a comment in that file pointing here Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bfd7658 commit 551bd42

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: tBTC Signer Formal Verification
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- pkg/tbtc/signer/**
7+
- .github/workflows/tbtc-signer-formal.yml
8+
schedule:
9+
- cron: "23 5 * * *"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: tbtc-signer-formal-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
signer-formal-invariants:
21+
name: Signer formal invariants
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 30
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Rust
29+
uses: dtolnay/rust-toolchain@stable
30+
31+
- name: Run signer formal invariant tests
32+
# Filters cargo test by the formal_verification_ prefix so only
33+
# the formal-invariant test cases run (faster + clearer signal
34+
# than the full suite). Matches the convention used in the
35+
# source monorepo's ci-formal-verification.yml.
36+
run: cargo test --manifest-path pkg/tbtc/signer/Cargo.toml formal_verification_
37+
38+
tla-model-checks:
39+
name: TLA model checks
40+
runs-on: ubuntu-latest
41+
timeout-minutes: 20
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
46+
- name: Setup Java
47+
uses: actions/setup-java@v4
48+
with:
49+
distribution: temurin
50+
java-version: "17"
51+
52+
- name: Run TLA model checks
53+
# Iterates over every .cfg under pkg/tbtc/signer/docs/formal/models/
54+
# and runs TLC against the matching .tla module. MODELS_PATH defaults
55+
# to the canonical signer-relative path; override via env var for
56+
# alternate environments (set in extraction/frost-signer-mirror PR).
57+
run: pkg/tbtc/signer/scripts/formal/run_tla_models.sh

0 commit comments

Comments
 (0)