Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions quest/m0/ci/tlc-cost.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Decided 2026-11-12 (maintainer, /quest-plan):

- ✅ Cap TLC's workers in `rs/justfile` and `js/justfile`, which hard-code
`-workers auto`. Recommended: 4, which the `verify-*` skills' times
already assume and Nightly's runners have; the
[native checker quest](/quest/m1/tla-native-checker.md) measured
already assume and Nightly's runners have; the native checker spike
([moq-dev/moq#8600](https://github.com/moq-dev/moq/pull/8600)) measured
core-seconds near flat from 2 to 24 workers, so the cap costs wall time,
not CPU.
- ✅ TLC 1.8 on a modern JDK. The recipes moved to `nixpkgs#tlaplus18` in
Expand Down Expand Up @@ -69,8 +69,8 @@ Decided 2026-11-12 (maintainer, /quest-plan):
`just test tla` over a directory.
- Rejected: Apalache, which is no cheaper here and ran out of memory on the
route model ([moq-dev/moq#8564](https://github.com/moq-dev/moq/pull/8564));
waiting for the Rust checker, which the m1 quest
spikes and this complements.
waiting for a Rust checker, none of which ran the route model in
[moq-dev/moq#8600](https://github.com/moq-dev/moq/pull/8600).

Not decided: the route-inductive work in progress adds a refinement check,
`RefinesClaims`, to the simulated `Blind.cfg`, where every sampled trace
Expand All @@ -89,5 +89,5 @@ Public API: none. Wire: none.

## Related

- [A Rust TLA+ checker runs the models locally if it agrees with TLC](/quest/m1/tla-native-checker.md) - a faster engine for the same specs; its TLC baseline moves with this
- [A Rust TLA+ checker is rechecked once the route model drops SumOver](/quest/m2/tla-native-recheck.md) - a faster engine for the same specs, waiting on this quest's `SumOver` rewrite
- [The route rules hold from any state, not only the runs TLC reaches](/quest/m1/route-inductive.md) - rewrites `SumOver` and adds the refinement check named above
67 changes: 0 additions & 67 deletions quest/m1/tla-native-checker.md

This file was deleted.

1 change: 0 additions & 1 deletion quest/m2/cluster-routes/route-exhaustive-sim.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ Public API: none. Wire: none.
## Related

- [Route sweeps are checked against the TLA+ model](/quest/m1/route-trace-validation.md) - guards the model against the code; this checks the code itself
- [A Rust TLA+ checker runs the models locally if it agrees with TLC](/quest/m1/tla-native-checker.md) - the other spike, a faster engine for the same specs
44 changes: 44 additions & 0 deletions quest/m2/tla-native-recheck.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# [M] A Rust TLA+ checker is rechecked once the route model drops SumOver

## Goal

The `tla` recipes run a native TLA+ checker locally when one gives TLC's
verdict and distinct-state count on every exhaustive config and costs fewer
core-seconds than TLC on the route and resume models; Nightly then runs both
engines on every config and fails when they disagree. If none does, the PR
records what each failed on and adopts nothing.

## Plan

[moq-dev/moq#8600](https://github.com/moq-dev/moq/pull/8600) compared tlx,
tla-mc, tla-rs, and tlaplusplus with TLC 1.8.0 on every exhaustive config and
adopted none. Each agreed with TLC wherever it finished, and tlx and tla-mc
cost a fifth to a third of TLC's CPU on the resume model, but on the route
model:

- tla-mc rejects `RouteHandoff.tla` (`unknown operator f`) where `SumOver`'s
operator argument is passed on (`Sum(f(_)) == SumOver(ns, f)`).
- tlx and tla-rs exceed a 16 GB cap where TLC fits in 4 GB, tlx after
finding 5% to 50% of TLC's states.

`SumOver` is a recursive function over `SUBSET S`, the likely cost for both,
and [TLC's cost quest](/quest/m0/ci/tlc-cost.md) replaces it with
`FoldSet`. Once that lands, rerun #8600's comparison at each checker's newest
revision: route and resume first, since they decide cost, then every
other exhaustive config, since adoption needs agreement on all of them:

- Build each from a pinned flake input inside the Nix sandbox, and run each
check there as a derivation under `prlimit --as=16G`, one at a time through
`quest gate`; an uncapped tla-rs run took the host's memory in #8600.
- Every config a checker runs gives TLC's verdict and broken rule, and a
passing one TLC's distinct-state count. `Simulate:` configs stay on TLC,
picked per config by the recipe.
- A broken rule prints TLC's trace format, with each step's action, which the
verify skills' replay steps read; tla-mc prints states alone.
- Report upstream bugs to the maintainer rather than filing them.

Public API: none. Wire: none.

## Required

- [TLC runs cost fewer core-seconds and share the host](/quest/m0/ci/tlc-cost.md) - replaces `SumOver` in the route model, the construct every candidate failed on, and moves TLC's baseline