You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
subscriptions: a stale round can clear parameterized sharing under newer rules #276
Follow-up from #254 (review finding stale-recursion-stop-ungated, accepted as-is).
In src/protocol/subscription/parameterized.rs, Family::evaluate runs self.sharing.store(false) unconditionally whenever binds_recursion(&snapshot) is true. For a snapshot older than the judged rule revision, binds_recursion returns the verdict under that older snapshot's rules. So a stale round can clear sharing under the current rules.
Sequence:
Rules R1 make a parameter bind a recursive relation.
A rule change to R2 removes the recursion. The family is judged and starts sharing under R2.
A view that last validated under R1 reads with an R1 snapshot before any newer round exists.
round_for creates an R1 round, and evaluate sees binds_recursion=true under R1.
Sharing is cleared under R2 without resetting costs or counting a stop.
Effect: wasted probe CPU and per-view evaluations until the family re-probes. Results stay correct, and latency does not regress because views fall back to their own evaluation. It does break the invariant that snapshots older than the judged revision never update family state.
Fix: only store false when self.judges(snapshot.persistent_rules()), or return the Err without writing when the snapshot's rules are not the judged ones. Add a test for the sequence above.
Activity
jsam commentedon Oct 5, 2026
Superseded by #318 (V11) in the incremental-views plan, epic #305.