updated plan

This commit is contained in:
2026-08-09 17:10:31 +02:00
parent 18dd3b7e07
commit 9268de2371
+20 -13
View File
@@ -325,18 +325,24 @@ responder's own `(runtime_session_id, library_revision, call_to_play_revision)`.
The initiator compares them against what it has cached for that endpoint The initiator compares them against what it has cached for that endpoint
generation and, on any mismatch or a new session ID, schedules exactly the generation and, on any mismatch or a new session ID, schedules exactly the
coalesced pinned pull a hint would have scheduled. A hint that was dropped, coalesced pinned pull a hint would have scheduled. A hint that was dropped,
never sent, or discarded by rate limiting therefore converges within one ping never sent, or discarded by rate limiting therefore converges within
interval, with no new timer, no mDNS payload growth, and no periodic full-state `PEER_PING_IDLE_SECS + PEER_PING_INTERVAL_SECS`, because the idle threshold is
polling. only evaluated on interval ticks; that is 50s at the current 30s/20s settings,
not one interval. Assert against the constants rather than a literal bound.
Reconciliation still adds no new timer, no mDNS payload growth, and no periodic
full-state polling, and 50s is acceptable for the rare lost-hint case.
Freshness for that check must be measured from the local peer's own last pinned Freshness is tracked per peer as `last_revision_check`, stamped only by an
exchange with the remote peer, never from inbound activity. The current exchange that actually returned that peer's current revisions: a `Pong` or a
`ping_idle_peers` skips any peer whose `last_seen` was refreshed by traffic completed pull. Content transfers must not stamp it. A large download is a long
arriving from it (`update_last_seen_by_addr`), so a peer that keeps talking to run of outbound pinned exchanges that carry no revisions, and it is exactly when
us would suppress the very check that detects our staleness about it. Track the reconciliation must not be postponed. Inbound activity must not stamp it either:
last completed outbound pinned exchange separately from `last_seen`, which `ping_idle_peers` currently gates on `last_seen`, which
continues to serve stale-peer pruning. Inbound traffic is not evidence of `update_last_seen_by_addr` refreshes from traffic arriving from that peer, so a
freshness, for the same reason it is not evidence of identity. peer that keeps talking to us would suppress the very check that detects our
staleness about it. `last_seen` keeps its existing stale-peer pruning role and
is not reused here. Inbound traffic is not evidence of freshness, for the same
reason it is not evidence of identity.
Revisions on `Pong` are a staleness signal, not content authority; the pull Revisions on `Pong` are a staleness signal, not content authority; the pull
remains the authoritative step. A responder that inflates its revision only remains the authoritative step. A responder that inflates its revision only
@@ -557,8 +563,9 @@ This phase is not complete until:
- a forged mDNS record or inbound hint cannot create/rebind/remove peer state, - a forged mDNS record or inbound hint cannot create/rebind/remove peer state,
inject a library/Call-to-Play update, or bypass a pinned pull; inject a library/Call-to-Play update, or bypass a pinned pull;
- a change hint that is dropped, never sent, or rate-limited away still - a change hint that is dropped, never sent, or rate-limited away still
converges within one ping interval, and inbound traffic from a peer does not converges within `PEER_PING_IDLE_SECS + PEER_PING_INTERVAL_SECS`, and neither
defer that peer's revision check; inbound traffic nor an in-flight content transfer defers that peer's revision
check;
- an honest multi-source download swarms automatically and commits only the - an honest multi-source download swarms automatically and commits only the
catalog bytes; catalog bytes;
- one bad source is quarantined and another source completes the chunk; - one bad source is quarantined and another source completes the chunk;