Repository navigation
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
Conversation
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
force-pushed
the
fix/return-gate-served-evidence
branch
from
September 17, 2026 19:07
a4eaf37 to
141a288
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 return gate trusted a beacon over service
The placement return gate (
decide(), Seat::Home arm) wasfresh && !lane_cold && cooled, wherefreshis 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 momentCOLD_WINDOWlapsed and the beacon was still fresh — she was returned toe85a5bb3, 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_successmakeshealth_checkadmit "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 inobserve_answer/observe_timeout) asserved_ok(). The Seat::Home arm becomesfresh && !lane_cold && cooled && peer_served_ok. Same registry, same keying, opposite polarity: the breaker decides when to leave on summed failure,served_okdecides 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_forreturns a pristine (served_ok = true) entry for a peer never seen, sofollow_the_fleetnever 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/generatewithrequest_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