Skip to content

Commit a301cef

Browse files
hyperpolymathclaude
andcommitted
ci(verisimdb): add TLA+ model-check workflow for V5/V9/V10
Mirrors the pattern landed in hypatia earlier today: installs Temurin 21, caches tla2tools.jar, runs TLC on all three VeriSimDB specs in a single job, tees per-spec logs, fails on any Error: line or missing clean-completion marker, and uploads logs as artifacts on failure (14-day retention). Path filter scoped to verisimdb/ so unrelated monorepo changes (lithoglyph, nqc, quandledb) don't retrigger TLC. Scheduled weekly at Mon 04:30 UTC (30min offset from hypatia to avoid runner contention on the same minute). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 94aa56f commit a301cef

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: Verify TLA+ specs (verisimdb)
3+
4+
# Model-checks the VeriSimDB TLA+ specifications (V5 OctadAtomicity,
5+
# V9 Normalizer, V10 Serializability). Triggers on push / PR touching the
6+
# specs, weekly schedule, and manual dispatch.
7+
#
8+
# Note: nextgen-databases is a monorepo. This workflow intentionally scopes
9+
# its path filter to verisimdb/ so unrelated changes (lithoglyph, nqc,
10+
# quandledb) don't re-trigger TLC.
11+
12+
on:
13+
push:
14+
branches: [main, master]
15+
paths:
16+
- 'verisimdb/verification/proofs/tlaplus/**'
17+
- '.github/workflows/verify-tlaplus.yml'
18+
- 'verisimdb/Justfile'
19+
pull_request:
20+
branches: [main, master]
21+
paths:
22+
- 'verisimdb/verification/proofs/tlaplus/**'
23+
- '.github/workflows/verify-tlaplus.yml'
24+
- 'verisimdb/Justfile'
25+
schedule:
26+
- cron: '30 4 * * 1' # Mondays 04:30 UTC (offset from hypatia's 04:00)
27+
workflow_dispatch:
28+
29+
permissions: read-all
30+
31+
jobs:
32+
tlc:
33+
name: TLC model-check
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: read
37+
timeout-minutes: 15
38+
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42+
43+
- name: Set up Eclipse Temurin 21 JRE
44+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
45+
with:
46+
distribution: temurin
47+
java-version: '21'
48+
49+
- name: Cache tla2tools.jar
50+
id: cache-tla
51+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
52+
with:
53+
path: ~/.local/share/tla2tools.jar
54+
key: tla2tools-v1.8.0
55+
56+
- name: Fetch tla2tools.jar
57+
if: steps.cache-tla.outputs.cache-hit != 'true'
58+
run: |
59+
mkdir -p ~/.local/share
60+
curl -sSL -o ~/.local/share/tla2tools.jar \
61+
https://github.com/tlaplus/tlaplus/releases/latest/download/tla2tools.jar
62+
ls -la ~/.local/share/tla2tools.jar
63+
64+
- name: Model-check all specs
65+
working-directory: verisimdb/verification/proofs/tlaplus
66+
run: |
67+
set -e
68+
fail=0
69+
for spec in OctadAtomicity Normalizer Serializability; do
70+
echo "::group::$spec"
71+
if ! java -XX:+UseParallelGC \
72+
-cp "$HOME/.local/share/tla2tools.jar" tlc2.TLC \
73+
-workers auto -config "${spec}.cfg" "${spec}.tla" \
74+
| tee "${spec}.log"; then
75+
fail=1
76+
fi
77+
if grep -q "Error:" "${spec}.log"; then
78+
echo "::error::TLC found a violation in ${spec}"
79+
fail=1
80+
fi
81+
if ! grep -q "Model checking completed. No error has been found." \
82+
"${spec}.log"; then
83+
echo "::error::${spec} did not report clean completion"
84+
fail=1
85+
fi
86+
echo "::endgroup::"
87+
done
88+
exit $fail
89+
90+
- name: Upload TLC logs on failure
91+
if: failure()
92+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
93+
with:
94+
name: tlc-logs
95+
path: verisimdb/verification/proofs/tlaplus/*.log
96+
retention-days: 14

0 commit comments

Comments
 (0)