Skip to content

fix(serving): the return gate needs SERVICE evidence, not a fresh beacon — no rescued citizen sent back to a never-serving peer (ad96f5d1) - #4176

Merged
joelteply merged 1 commit into
canaryfrom
fix/return-gate-served-evidence
Sep 17, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/return-gate-served-evidence

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The return gate trusted a beacon over service

The placement return gate (decide(), Seat::Home arm) was fresh && !lane_cold && cooled, where fresh is beacon age — liveness, not service. Measured on the Intel tier 2026-09-17 (Cormac, card ad96f5d1): the peer-keyed breaker (#4173) fell Saoirse home, then five minutes later — the moment COLD_WINDOW lapsed and the beacon was still fresh — she was returned to e85a5bb3, a peer that has never answered a single request in this node's entire history (remote_lane.answered = 0 all-time). Six misses and fifty minutes bought a five-minute reprieve.

A fresh beacon proves the peer is alive, not that it will answer — and a node that beacons perfectly and serves nothing is the most attractive dead seat on the grid. #1560 already won this argument one layer down (has_observed_success makes health_check admit "no signal" until traffic proves a peer reachable, so the selector won't route to an unproven peer). The placement gate made the identical mistake for seat selection.

The fix (composes with #4173)

Service, like the fault, is a fact about the peer, so it moves onto PeerBreaker (ever_served / ever_observed, set in observe_answer/observe_timeout) as served_ok(). The Seat::Home arm becomes fresh && !lane_cold && cooled && peer_served_ok. Same registry, same keying, opposite polarity: the breaker decides when to leave on summed failure, served_ok decides when it's safe to go back on summed success.

Self-sealing wrinkle resolved (Cormac handed me the call): served_ok = ever_served || never-observed. A proven-bad peer (tried, only timeouts) is blocked; a brand-new untried peer reads optimistic and gets its first chance. #1560's strict reading was about not routing to an unproven peer; refusing to ever try one is the worse, self-sealing failure. breaker_for returns a pristine (served_ok = true) entry for a peer never seen, so follow_the_fleet never self-seals a new seat.

Also folds in Cormac's #4173 re-review test (same file): a miss while the peer is already cold does not re-trip (the CAS warm-guard refusal branch).

NOT the root

The root — that cross-grid inference was never addressable (the receiver refuses every ai/generate with request_not_for_me, card c34034b9) — is a separate transport fix in BigMama + Cormac's lane. This PR closes the placement flap that root produced.

Tests

served_ok_is_optimistic_for_untried_and_strict_for_proven_bad, a_fresh_but_never_serving_seat_is_not_returned, a_miss_while_already_cold_does_not_re_trip. peer_breaker 4/4, placement_switch 5/5.

acceptance: read-and-confirm a rescued citizen is held home from a proven-never-serving peer while a new peer still receives its first placement.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

@joelteply
joelteply enabled auto-merge (squash) September 17, 2026 18:50
…con — stop sending a rescued citizen back to a never-serving peer (ad96f5d1)

The placement return gate (`decide()`, Seat::Home arm) was `fresh && !lane_cold &&
cooled`, where `fresh` is BEACON age — liveness, not service. Measured on the Intel
tier 2026-09-17 (Cormac, card ad96f5d1): the peer-keyed breaker fell Saoirse home,
then five minutes later — the moment COLD_WINDOW lapsed and the beacon was still
fresh — she was returned to e85a5bb3, a peer that has never answered a single request
in this node's entire history (`remote_lane.answered` = 0 all-time).

A beacon proves the peer is ALIVE; it does not prove it will ANSWER, and a node that
beacons perfectly and serves nothing is the most attractive dead seat on the grid.
#1560 already won this argument one layer down — `has_observed_success` makes
`health_check` admit "no signal" until traffic proves a peer reachable, so the
SELECTOR does not route to an unproven peer. The placement gate made the identical
mistake for SEAT selection and never asked.

The fix, composing with the peer-keyed breaker (#4173): the service signal, like the
fault, is a fact about the PEER not who asked, so it moves onto `PeerBreaker`
(`ever_served` / `ever_observed`, set in `observe_answer`/`observe_timeout`) exposed
as `served_ok()`. The Seat::Home arm becomes
`fresh && !lane_cold && cooled && peer_served_ok`. Same registry, same keying,
opposite polarity: the breaker decides when to LEAVE on summed FAILURE, `served_ok`
decides when it is safe to GO BACK on summed SUCCESS.

The self-sealing wrinkle — a never-served peer would never receive a first placement —
is resolved by `served_ok = ever_served || never-observed`: a proven-bad peer (tried,
only timeouts, e85a5bb3) is blocked; a brand-new UNTRIED peer reads optimistic and
gets its first chance. #1560's strict reading was about not ROUTING to an unproven
peer; refusing to ever TRY one is the worse, self-sealing failure. `breaker_for`
returns a pristine (served_ok = true) entry for a peer never seen, so
`follow_the_fleet` never self-seals a new seat.

Also folds in Cormac's #4173 re-review test (same file): a miss while the peer is
ALREADY cold does not re-trip — exercises the CAS warm-guard refusal branch, distinct
from the count-reset path.

On this tier e85a5bb3 is proven-bad, so the flap cannot form. NOT the root: the root
is that cross-grid inference was never addressable (the receiving node refuses every
`ai/generate` with request_not_for_me — card c34034b9), a separate transport fix. This
closes the placement flap that root produced.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply force-pushed the fix/return-gate-served-evidence branch from a4eaf37 to 141a288 Compare September 17, 2026 19:07
@joelteply
joelteply merged commit 2d4f937 into canary Sep 17, 2026
6 checks passed
@joelteply
joelteply deleted the fix/return-gate-served-evidence branch September 17, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant