Repository navigation
quest: re-plan the routing quests for the path rule, and plan Babel's removal #8554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,12 +2,15 @@ | |||||||||
|
|
||||||||||
| ## Goal | ||||||||||
|
|
||||||||||
| An inductive invariant of the route model implies `LoopFree`, `NoRevival`, | ||||||||||
| `NoFalseEnd`, `NoRegression`, and `Truthful`. Apalache checks in Nightly that | ||||||||||
| it holds initially and that every step preserves it from any state satisfying | ||||||||||
| it, on each mesh shape of up to five relays. The rules then hold for runs of | ||||||||||
| any length and any number of changes, where TLC's pass covers one claim, two | ||||||||||
| revisions, and two session opens or closes. | ||||||||||
| An inductive invariant of the route model implies `NoRevival`, `NoFalseEnd`, | ||||||||||
| `NoRegression`, `Truthful`, and the loop rule the model proves for the path | ||||||||||
| rule: no relay uses a route whose path names it, and selected next hops loop | ||||||||||
| only within the bound | ||||||||||
| [the model](/quest/m2/cluster-routing/routes/scope-model.md) found. Apalache | ||||||||||
| checks in Nightly that it holds initially and that every step preserves it | ||||||||||
| from any state satisfying it, on each mesh shape of up to five relays. The | ||||||||||
| rules then hold for runs of any length and any number of changes, where | ||||||||||
| TLC's pass covers one claim, two revisions, and two session opens or closes. | ||||||||||
|
|
||||||||||
| ## Plan | ||||||||||
|
|
||||||||||
|
|
@@ -23,14 +26,26 @@ moq-net): | |||||||||
| a fix quest that joins [Finalize moq-lite-07](/quest/m2/lite07-finalize.md) | ||||||||||
| then. | ||||||||||
|
|
||||||||||
| What it removes is the bound on the run, not on the mesh: sequence numbers, | ||||||||||
| revisions, and churn are unbounded, while the relay count and queue lengths | ||||||||||
| Decided 2026-11-12 (maintainer, /quest-plan on the quests still written for | ||||||||||
| Babel), asked what happens to this quest now that the route rule is the path | ||||||||||
| ([routes epic](/quest/m2/cluster-routing/routes/README.md) Plan item 27): | ||||||||||
| ✅ keep it in m1, rewritten for the path rule (rejected: m4, since the path | ||||||||||
| argument is simpler than Babel's; deleting it and resting on the bounded | ||||||||||
| TLC runs and the sweeps). The claim rules are where the stale copies were, | ||||||||||
| and they are what a bounded run covers least. `LoopFree` leaves the Goal as | ||||||||||
| an invariant: under the path rule selected next hops can loop for a moment | ||||||||||
| when two unrelated things fail at once, which the maintainer accepted, so | ||||||||||
| the invariant implies the bound the model states instead. | ||||||||||
|
Comment on lines
+35
to
+38
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-planning this quest onto the path rule leaves its replay step at L50-51 pointing at |
||||||||||
|
|
||||||||||
| What it removes is the bound on the run, not on the mesh: revisions, | ||||||||||
| sessions, and churn are unbounded, while the relay count and queue lengths | ||||||||||
| stay constants the config states. Say both bounds in the `verify-route` skill. | ||||||||||
|
|
||||||||||
| - Start from the argument Babel and DUAL rest on: along selected next hops the | ||||||||||
| (seqno, distance) pair strictly improves, and every message in flight carries | ||||||||||
| a value no better than its sender's feasibility distance when it was sent. | ||||||||||
| Strengthen until Apalache finds no counterexample to induction. | ||||||||||
| - Start from the path argument: no relay holds or selects a route whose path | ||||||||||
| names it, every route in flight extends the path its sender held when it | ||||||||||
|
Comment on lines
+44
to
+45
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. State the path rule on the incoming path, not the stored path. The stored Suggested fix
Committable suggestion
|
||||||||||
| sent it, and every withdrawal in flight names a hop whose session closed. | ||||||||||
| The doubt's timer is a step that may fire at any moment, as the model has | ||||||||||
| it. Strengthen until Apalache finds no counterexample to induction. | ||||||||||
| - A counterexample to induction starts from a state that may be unreachable. | ||||||||||
| If TLC cannot reach it, the invariant is too weak: strengthen it. If it can, | ||||||||||
| replay it on `route::tests::Sim` as the skill says before calling it a bug. | ||||||||||
|
|
@@ -40,6 +55,8 @@ stay constants the config states. Say both bounds in the `verify-route` skill. | |||||||||
| the invariant also says a route is held only from a node the holder shares | ||||||||||
| a link with: every route sent adds its sender to hops that did not name it | ||||||||||
| ([moq-dev/moq#8487](https://github.com/moq-dev/moq/pull/8487)). Start there. | ||||||||||
| - Apalache checks safety. That every hold ends is a liveness rule the model | ||||||||||
| checks with TLC; leave it there and say so in the skill. | ||||||||||
| - Run it through the `tla` recipes with Apalache from the flake. If five | ||||||||||
| relays does not fit Nightly, record the largest mesh that does and its time. | ||||||||||
|
|
||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,9 +29,15 @@ Decided 2026-11-10 (maintainer, a later /quest-plan the same day): | |||||||||||||||
| This is TLA+ trace validation (Cirstea, Kuppe, Loillier, Merz, 2024, used on | ||||||||||||||||
| CCF and etcd's raft): `route::tests::Sim` records each step as the model | ||||||||||||||||
| action it corresponds to, with the variables the model keeps, and TLC checks | ||||||||||||||||
| that the recorded trace is a behaviour of the spec. The model fixes interest | ||||||||||||||||
| at the root and drops scopes, so the sweeps either restrict to what it models | ||||||||||||||||
| or the model grows to cover them; pick whichever costs less and say which. | ||||||||||||||||
| that the recorded trace is a behaviour of the spec. Where the model covers | ||||||||||||||||
| less than the sweeps do, the sweeps either restrict to what it models or the | ||||||||||||||||
| model grows to cover them; pick whichever costs less and say which. | ||||||||||||||||
|
Comment on lines
+32
to
+34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the existing sweeps at full coverage when validating traces. The plan lets the sweeps "restrict to what it models." That wording applies to the existing scoped sweep. The sweep covers five claims and five watches ( 📝 Suggested plan wording
Committable suggestion
|
||||||||||||||||
|
|
||||||||||||||||
| Decided 2026-11-12 (maintainer, /quest-plan on the quests still written for | ||||||||||||||||
| Babel): the traces come from the path router | ||||||||||||||||
| ([routes epic](/quest/m2/cluster-routing/routes/README.md) Plan item 27). | ||||||||||||||||
| Once the model has the path rule, a trace of Babel's router is no behaviour | ||||||||||||||||
| of it, so this waits for the router too. | ||||||||||||||||
|
|
||||||||||||||||
| Run it on the sweeps' existing seeds in CI only if it stays fast; otherwise in | ||||||||||||||||
| Nightly with the sweeps' fresh seeds. | ||||||||||||||||
|
|
@@ -41,3 +47,4 @@ Public API: none. Wire: none. | |||||||||||||||
| ## Required | ||||||||||||||||
|
|
||||||||||||||||
| - [The route model has a route per scope](/quest/m2/cluster-routing/routes/scope-model.md) - replaces who a relay believes and adds two prefixes and a scoped relay, so traces are validated against the rule that stays | ||||||||||||||||
| - [The router runs the path rule with a route per scope](/quest/m2/cluster-routing/routes/scope.md) - the router `Sim` records, running the rule the model has | ||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Carry the no-loop part of
Reachesinto the inductive Goal.The scope model lists
Reachesamong the rules it must prove. Its no-loop rule for request forwarding is still unsolved. The bound on selected next hops does not cover that rule. The Goal does not listReaches, so this quest does not require its inductive invariant to imply it.Apalache checks safety only. The "every hold ends" part of
Reachesis liveness, and the plan leaves that part to TLC. Limit the Goal to the no-loop safety part.Suggested fix
Committable suggestion