Skip to content

Feat/room coordination hardening#207

Merged
cukas merged 5 commits into
mainfrom
feat/room-coordination-hardening
Jun 11, 2026
Merged

Feat/room coordination hardening#207
cukas merged 5 commits into
mainfrom
feat/room-coordination-hardening

Conversation

@cukas

@cukas cukas commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

… + machine output

Field-driven hardening from a two-day live two-agent build:

- Read cursors: room read --unread --as X returns only unseen events and
  advances the member's cursor (--peek to browse without advancing);
  recordPresence is now clamp-max so a re-join can never rewind a cursor.
  room who shows per-member unread/mention counts — "who is behind?" is
  one command, killing the stale-board failure mode.
- First-class locks: lock/release/lock-steal are ordinary ledger events
  folded into a lock table (no separate state file). TTL leases, steal
  only after expiry with an audited event that @mentions the stale
  holder, claims serialized through the room seq lock, and warn-on-post
  when the poster still holds an expired lock (the forgot-RELEASE catch).
- Machine output: --json on read/tail (JSON lines) and who (one object);
  room post accepts a positional message (-m now optional).
- MCP parity: RoomRead gains callsign/unreadOnly/markRead (+ unread
  state in the response), RoomWho returns unread + locks, new RoomLock /
  RoomRelease tools.

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
Kills silent panel erosion ("dispatch 6 engines, quietly complete as 3/4"):

- New shared dispatchSeatWithRetry: classifies a seat failure as
  timeout/empty/error and retries ONCE at ~half the timeout. Never
  retries a user abort. Modes keep their own text extraction (tribunal's
  <think> salvage) via the extract hook — an extract throw counts as an
  empty attempt.
- buildPanelHealth folds seat outcomes into {requested, responded,
  degraded, notes, banner}; the banner ("panel degraded: codex timeout →
  retried OK; zai empty → dropped (5/6 responded)") rides on
  BrainstormResult/TribunalResult and is rendered by the CLI commands
  AND the REPL handlers — degradation is part of the result, not
  mid-run console noise.
- Council's dispatchText gains the same retry; its existing warnings[]
  now records recoveries too.

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
- resolveReviewTarget gains range:BASE...TARGET (or BASE..TARGET) — a
  fully explicit, checkout-independent scope — and a base param:
  --base main with branch:feat-x reviews main...feat-x no matter what
  is checked out; with uncommitted it spans base..working-tree. Review
  scope is now deliberate, never inherited from the current checkout.
- agon review retries a reviewer seat once at half the wall clock on
  timeout/hard error (parse failures keep their in-band repair pass),
  and the recovery/failure is named in the per-engine detail line.

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
…ps, diagnostics

Fixes from the 3×3-engine agon review pass (claude/codex/kimi per commit):

- BLOCKING (codex 0.99 + claude 0.85): an identity-bearing room read with a
  tail limit advanced the cursor to head, silently marking a >limit backlog
  as read — the exact stale-board failure the cursor exists to kill. The
  cursor now advances ONLY when the read was gap-free from the member's
  cursor (seqs are dense); CLI hints at --unread, MCP returns
  cursorAdvanced + a catch-up note.
- claimRoomLock sanitizes ttlMs (NaN/Infinity → 1m floor, 1y cap) so a bad
  TTL yields a lease, never a RangeError escaping the room lock (kimi 0.85).
- listUnreadStates reads the ledger once and folds per member instead of
  O(members × events) re-reads (codex 0.93).
- Retry timeout is capped at the original wall clock in seat-dispatch,
  council, and agon review — a sub-60s caller must not get a LONGER retry
  (codex 0.98/0.97).
- SeatOutcome carries the underlying stderr/message detail; tribunal's
  engine:failed events and warn lines stay diagnosable instead of
  collapsing to a bare category (codex 0.95, kimi 0.80, claude 0.70).
- agon review reports the wall clock that actually fired on a retry
  timeout, and every terminal path carries the retry note (codex 0.99/0.98,
  kimi 0.95). Pre-dispatch abort check skips the seat entirely (kimi 0.85).
- agent-guide (JSON + text) teaches external CLIs the --unread turn-start
  read, lock/release discipline, and --json flags.

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
@cukas cukas merged commit 5deb795 into main Jun 11, 2026
1 check passed
@cukas cukas deleted the feat/room-coordination-hardening branch June 11, 2026 17:09
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.

2 participants