Repository navigation
ci(tla): coverage lint — spec/CI/corpus/docs drift fails loudly - #1693
Merged
Merged
Conversation
Restores the intent of the spring-cleaned tla_coverage.py as an enforced check: scripts/tla-coverage-check.py verifies every .cfg has a module, every checkable spec is in tla.yml's model-check loop (with a reasoned KNOWN_UNCHECKED allowlist, itself staleness-checked in both directions), every behavior corpus has a spec + generator entry + replay interpreter + RUST_MAPPING row, and every generator entry has a committed corpus. Runs as the first step of the TLA+ workflow. First run found four real drifts, each adjudicated: - InductiveInvariants.cfg orphan (module never landed) — removed. - BuggyInventory never CI-checked — correct by design (deliberate-bug teaching spec; TLC fails it on purpose) — allowlisted. - FIFOCheck never CI-checked — historical pre-fix FIFO spec (source of tla_fifo_bug_test.rs) — allowlisted. - SimpleInventory never CI-checked — investigated by actually running TLC: its totalAdded/totalReduced are UNBOUNDED, so TLC never terminates — allowlisted with that reason (the tutorial spec is non-model-checkable as configured; a future fix could add an opCount bound). Co-Authored-By: Claude Opus 4.8 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an enforced “coverage lint” to keep the TLA+ formal-verification layers (specs, CI loop, behavior corpora, and mapping docs) from silently drifting out of sync, and removes an orphaned config that no longer has a corresponding module.
Changes:
- Delete orphan
spec/tla/InductiveInvariants.cfg. - Add
scripts/tla-coverage-check.pyto validate spec/CI/corpus/docs cross-references (with a reasoned allowlist for intentionally-unchecked specs). - Run the new lint early in
.github/workflows/tla.ymland trigger the workflow when the lint script changes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| spec/tla/InductiveInvariants.cfg | Removes an orphaned TLA+ config file that no longer matches a module on disk. |
| scripts/tla-coverage-check.py | New Python lint enforcing cross-layer coverage invariants and detecting drift. |
| .github/workflows/tla.yml | Adds the lint step and ensures workflow triggers include the new script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
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.
FV backlog: restore the spring-cleaned
tla_coverage.pyintent as an enforced lint. The four FV layers reference each other by name (specs ↔ tla.yml loop ↔ corpora/replay ↔ RUST_MAPPING), and history shows the links rot silently — the counterexample converter vanished leaving a dead workflow step, and a stale trigger path stopped the models running on inventory changes entirely.First run found four real drifts, each adjudicated
InductiveInvariants.cfgorphan (module never landed)BuggyInventorynever CI-checkedFIFOChecknever CI-checkedtla_fifo_bug_test.rs); allowlistedSimpleInventorynever CI-checkedtotalAdded/totalReducedare unbounded — TLC never terminates. Allowlisted with that reason (the tutorial spec is non-model-checkable as configured; a future opCount bound would fix it)Checks
Orphan cfgs · loop membership with a reasoned
KNOWN_UNCHECKEDallowlist (staleness-checked both directions) · corpus ↔ spec ↔ generator registry ↔ replay ↔ docs cross-references · registry entries without corpora. Runs first in the TLA+ workflow; this PR triggers it, so the lint validates itself alongside the 16-spec loop.🤖 Generated with Claude Code