Skip to content

feat(cli): claim fairness — addressed seats always speak, race winners start from the back - #907

Merged
lilyshen0722 merged 1 commit into
mainfrom
feat/claim-fairness
Aug 12, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
feat/claim-fairness

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

What

The fairness pass on claim coordination, from Sam's review of the live run: each seat carries a distinct perspective, and pure first-CAS-wins had two failure shapes.

1. Addressed losses no longer silence. A claim loss on a direct address (chat.mention / thread.mention / dm.message) proceeds peer-aware — a frame names the holder and raises the posting bar to "materially different, else NO_REPLY" — instead of a silent stand-down. The sharp case this fixes: @a @b look at this previously got exactly one answer with the other seat silently acked, against the human's explicit intent. Broadcast wakes keep the zero-turn hard stand-down (that economics win is the point of claims).

2. Win-weighted claim delay — the cooldown, shaped for liveness: the winner of a pod's previous broadcast race enters the next one ~3-4s late (jittered). Everyone still claims — a hard cooldown risks all seats abstaining and a message going unhandled — recent winners just start from the back. A loss or 5 quiet minutes clears it.

Deliberately not built (named here per the review): the winner-declines-for-everyone case (claim winner returns NO_REPLY and the losers were already acked — one seat's judgment decides for the fleet). A second-opinion redelivery chain would multiply exactly the turn cost the cooldown addresses; a human mention remains the recourse. Revisit on the first observed wrong decline.

Tests

5 handicap/frame unit tests + 3 run-loop integration tests; both glue points mutation-verified. Two pre-existing assertions encoding the old addressed-loss stand-down updated to broadcast events citing this ruling (assertion change, not inversion — the stand-down contract is unchanged for the traffic it still governs). Full CLI suite 274 green. Also fixes a falsy-zero-timestamp bug in the handicap that the unit suite caught.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8

…s start from the back

Two behaviors from Sam's fairness review of the live run ("each agent comes
with an opinion that could affect, and the loser may never get a chance to
speak"):

- Being chosen outranks being beaten to a CAS. A claim loss on a DIRECT
  address (chat.mention / thread.mention / dm.message) no longer silences
  the seat: it proceeds peer-aware, with a frame naming the holder and
  raising the posting bar from "have something to say" to "have something
  materially different". Explicit multi-mentions previously serialized to
  ONE responder — a defect against the human's stated intent. Broadcast
  wakes (message.posted) keep the hard zero-turn stand-down.

- Win-weighted claim delay, not a hard cooldown: the winner of a pod's
  previous broadcast race enters the next one after a jittered ~3-4s.
  Everyone still claims — all seats abstaining at once would leave a message
  with no claimant, #887 self-inflicted — recent winners just start from the
  back. A loss (or 5 quiet minutes) clears the handicap.

The two run-loop assertions that encoded the old addressed-loss stand-down
are updated to broadcast events, citing this ruling — the stand-down
contract itself is unchanged for the traffic it still governs. Also fixes a
falsy-zero-timestamp bug in the handicap the new unit suite caught.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant