Repository navigation
fix(airc): stop dialing ghost peers — prune stale enrolled records (#10) - #1272
Merged
Merged
Conversation
joelteply
added a commit
that referenced
this pull request
Jun 20, 2026
…ho) + fmt (#1274) fix(build): repair canary — #1271 added EventFilter.self_echo but missed examples + fmt #1271 (suppress own broadcasts from the join feed) added a required field `self_echo: Option<SelfEcho>` to EventFilter, but only updated the airc-cli construction sites — the example crates (consumer_shapes, embedded_consumer_smoke) still construct EventFilter without it, so the whole workspace failed to compile (E0063), reddening clippy + `cargo test --workspace` on every platform. It also left stream.rs fmt-dirty. Canary merged red, so EVERY downstream PR inherited a broken gate (hit live on #1272). Fix: add `self_echo: None` to every example EventFilter (None = no self-echo suppression — consumers/RAG/Continuum must keep seeing everything, per the design note in stream.rs) and run rustfmt. Verified: `cargo build --workspace` clean, `cargo fmt --check` clean, production no-silent-fallback gate green. (Process note: this is the 2nd red-canary inheritance this cycle after #1264 — canary protection isn't enforcing green CI before merge.) Co-authored-by: Claude Opus 4.8 <[email protected]>
Route discovery dialed EVERY enrolled peer with a stored endpoint every tick, including ~30 dead Docker containers (172.x) and abandoned self-scopes whose endpoints linger in the trust store forever. Each burned a PEER_DIAL_TIMEOUT (3s) and buried the live peers under a wall of PeerDialFailed noise — it's what made the real connection state illegible while debugging cross-machine LAN. Fix: skip GHOSTS in the dial merge — enrolled peers with no fresh contact (last_seen_ms older than the registry freshness TTL, the one source of truth). A live peer's registry beacon refreshes last_seen every cycle, so this never skips a reachable peer; a connected peer is already skipped; a freshly-enrolled peer has last_seen floored to added_at, so fresh adds dial normally. The count is surfaced on RouteDiscoverySnapshot.ghost_peers_skipped (queryable, not a per-ghost log line — anti-spam). Test: is_ghost_peer respects the TTL boundary (strictly-greater) and a future/skewed last_seen reads fresh (saturating, no underflow). Co-Authored-By: Claude Opus 4.8 <[email protected]>
joelteply
force-pushed
the
fix/airc-prune-ghost-dials
branch
from
June 20, 2026 23:14
3899229 to
6a41066
Compare
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.
The noise we hit debugging cross-machine LAN
Route discovery dialed every enrolled peer with a stored endpoint every tick — including ~30 dead Docker containers (
172.x) and abandoned self-scopes whose endpoints linger in the trust store forever. Each burned a 3sPEER_DIAL_TIMEOUTand buried the live peers under a wall ofPeerDialFailedwarnings — that's a big part of what made the real connection state illegible.Fix
Skip ghosts in the dial merge: enrolled peers with no fresh contact (
last_seen_msolder than the registry freshness TTL — the one source of truth).last_seenevery cycle → never skips a reachable peer.last_seenfloored toadded_at→ fresh adds dial normally.RouteDiscoverySnapshot.ghost_peers_skipped(queryable, not a per-ghost log line — anti-spam, the whole point is reducing noise).Test
is_ghost_peerrespects the TTL boundary (strictly-greater) and a future/skewedlast_seenreads fresh (saturating, no underflow).Completes the recover/heal/route-around series alongside #8 (stable port, merged) and #1257 (self-heal, merged). #9 (learn-live-address) deferred — #8 + this already resolve the core auto-connect case; #9 becomes a robustness layer for genuinely-moved peers.
🤖 Generated with Claude Code