Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 6f951d73580e474faee387e413bbfcdc
Branch: dev/2-retired-review-gate
Base: 92a4cf2
At: 2026-10-30T05:12:18Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
What a person sees
After archive_bot retires a Bot, that Bot still gets a memory review: another member's turn ends, the review queue picks the retired Bot up, a model call is billed to it, and its already-archived MEMORY.md is rewritten. In the UI this shows as a retired Bot that still spends on the usage page, and a memory panel whose text changes on its own.
Where (live main 92a4cf262cb8f2469f800f12e5cfe006abb4d538)
core/src/host/memory.js:1366-1371queueLaggingMembers()walksroom.membersand queues every member that isREVIEW_GROUP_LAG(30) lines behind — no retired filter.core/src/host/memory.js:1285-1291reviewSession()refuses only a Bot that is gone (rt.botOf(...) === undefined); a retired Bot is still instate.bots, so it passes.- The host's own rule says otherwise:
core/src/host/store.js:27-30— "no host path may resolve it into a turn, a capability, a memory write or a timer (core: a retired Bot is still addressable by every team tool (message_bot wakes it) #1700, core: retirement is final only for findTeamBot — five host paths still wake, extend or edit a retired Bot, and its timers stay armed #1709)".retiredBotappears inmemory.jsonly at the import (:32) and inparseScope(:518); the review gate was never covered, and fix(host): stop a retired Bot taking cards, timers and sends #1727 did not touch it.
Reproduction
Real host, three steps: a room r1 with members b2/b3 and sessions: {b2: 'g2', b3: 'g3'}, 40 user lines at seq 40; archive_bot b2 (it persists retired: true); then send one agent/status idle for g3 — another member finishing a turn is the review trigger.
Observed at 92a4cf26: b2 retired flag: true, model calls: ["b2","b3"], and b2's MEMORY.md exists and was rewritten with a new line. Expected: no model call for b2 and no b2 memory file, while b3's review still runs.
Expected
A retired Bot enters no review queue: queueLaggingMembers() skips retiredBot(rt.botOf(member)), and reviewSession() returns early once it has the Bot. Live members keep reviewing exactly as today.
Scope
Two guards in core/src/host/memory.js, one case added to core/test/retired-bot-paths.test.js (retired Bot + 40-line lag + another member's turn ends → zero model calls for it, no memory file; the live member still reviewed), plus the regenerated patches/ds-bot/0001/0002. About 40 real lines, well under 150. This one is on the patch chain (no whole-file mirror for memory.js), so it needs build + generate + the two-pass check.
Dedupe (searched 2026-10-30, open + closed)
- open:
retired memory review0,retired bot memory0,archive_bot0. - closed:
retired memory→ fix(host): stop a retired Bot taking cards, timers and sends #1727, core: retirement is final only for findTeamBot — five host paths still wake, extend or edit a retired Bot, and its timers stay armed #1709, fix(host): a retired Bot is unreachable by the tools that resolve a name #1707, Add a Main-Bot-only archive_bot tool that retires a Bot (#638) #1674, Main Bot can create and change Bots but has no tool to remove or retire one #638, fix(host): refuse the team tools to a deleted Bot's Sessions #1499, docs/self-test.md lands behind the live catalog: 17 cases, the U family and every guard are missing #782 — none about the review queue;"memory review" retired0.
This is a gate core: retirement is final only for findTeamBot — five host paths still wake, extend or edit a retired Bot, and its timers stay armed #1709 left behind, not a repeat of it.
Activity
test(retired-bot-paths): wait for both reviews instead of fixed settl…