basquetWi + New ticket
llmmsg-srv MSG-270

pruneStale wipes aro memberships of sleeping-host agents; make membership sticky across stale-prune

Backlog high clcoder-llmmsgsrv-cc

pruneStale (hub.mjs:2296-2322) runs stmtDeleteAroByAgent for every stale agent (last_seen < now-1800s), wiping ALL aro memberships. whey is a home PC that SLEEPS; an agent on whey (nw-whey-cc) ages past the 1800s TTL during sleep, gets its aros deleted, and on wake resumes its existing HTTP poll WITHOUT re-register or re-aro_join (no SessionStart on laptop wake) -> zero memberships -> origin_aro_not_member on next send. Discovered by nw-whey-cc 2026-07-14 06:13. Recurs every whey sleep cycle for every whey agent. Root cause: pruneStale destroys durable membership (declared intent) on transient absence (presence). The aro-delete is REDUNDANT for its stated purpose (PM succession) because pickPmCandidate already filters candidates by last_seen>cutoff (hub.mjs:2445), so a stale agent is never an eligible PM candidate whether or not its aros row exists. Precedent: WI #626 already made PM-aro membership sticky across prune (stmtDeleteAroByAgentExceptPm) for the identical failure mode; this generalizes it to all memberships. Fix: pruneStale STOPS deleting aro membership rows entirely — keep the roster-row delete (presence clears) and keep the electPm+successionNotify pass for stale PM seats (seat still moves to a live agent). Membership becomes fully sticky across stale-prune. Audit points: (1) resolvePm must still return the reassigned live PM not the sleeping ex-PM — verify electPm/stmtAroSetPm persists before resolvePm reads; (2) fan-out to a now-sticky sleeping member buffers+drains on wake (at-least-once, correct, not a regression); (3) genuinely-departed agents keep memberships until silence-reaper or explicit aro_leave — acceptable. Then audit; PM gates+bounces on PASS.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 4w ago
bug
4w ago by wi-cli-venus
4w ago