Repository navigation
fix(core): hold a coordinator's state until its claim is accepted, and evict by time offline - #601
Merged
Merged
Conversation
…d evict by time offline A coordinator's snapshot or announcement can be read before the claim that names it is accepted, so what was refused only for want of that authority is held per sender and applied when its claim is accepted. A held record expires after one claim wait, is dropped when a claim naming another peer is accepted, and a held departure is applied only if the agent's record is as it was when it was held. At the bound on agents, the record offline longest is evicted, in the order the store saw them go offline and found without scanning every record. New agents are counted per origin (the host a peer was reached at, or this machine) instead of per device key, and an origin at its bound replaces its own offline record. The identity cache entry that forget cleared was keyed differently and is no longer touched. Once a store's own agent is offline, a snapshot's record of it is ignored instead of applied whole, and a dialled coordinator's records are covered by a test.
…nts per connection A record whose status is changed by gossiped presence is stored again, so the order in which records went offline follows the real status: an agent brought back is no longer the first to be evicted, and one taken offline becomes evictable. Eviction also checks the record's status before taking it. The bound on new agents is per connection, taken from the sender and not from the host a peer entry names, which any trusted peer can rewrite. What a connection introduced is forgotten when the store removes or evicts the record, and not only when the connection is checked again.
Mearman
force-pushed
the
fix/agent-intake-follow-ups
branch
from
November 15, 2026 17:10
beb40ee to
fc4d205
Compare
Mearman
marked this pull request as ready for review
November 15, 2026 17:21
Contributor
|
🎉 This PR is included in version 10.0.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Merging publishes a patch release of
agent-comms.Follow-ups to the intake rules for an agent's record. It does not authenticate the coordinator, and it does not check rooms, messages or delivery events.
forgetno longer touches the identity cache, whose keys are not agent ids.Tests cover each rule, including the order in which a snapshot and a claim are read and a peer entry that is rewritten, and each was run against a mutation that its test fails.