llmmsg-srv
MSG-219
PM seat lost on compact: pruneStale strips recorded-PM ARO membership
Done high
hlhub-llmmsgsrv-cc
Questions
No questions.
Activity
-
wi cli
-
Root cause: hub.mjs pruneStale (L541, fires on /register + /send) deletes a stale agent's roster row AND all its aros rows once last_seen > STALE_TTL_S (600s). A PM that compacts/goes offline long enough loses its aros membership -> resolvePm (L601) sees recorded pm_agent is no longer a member -> returns pickPmCandidate -> seat silently moves to next candidate. Repro: pmassistant-mba-l-cc (mba2-l PM) compacted 2026-06-03, seat appeared to move to db2-mba-l-cc; reclaim took many turns + an aro_config handoff dance. Fix: recorded PM is sticky across prune - in pruneStale, do NOT delete aros rows where the stale agent == that aro's pm_agent (skip those memberships; roster row may still prune). Net: a compacted PM keeps its seat, zero reclaim turns, no aro_config write. Safeguard (forge-proof aro_config guard) stays untouched. Verify: set pmassistant last_seen 700s ago, fire a /send, assert mba2-l still has pmassistant in aros + aro_config.pm_agent unchanged.
-
Shipped hub 2.9.18 (commits 5a7c68a code + d708e60 VERSION). pruneStale now PM-sticky via new stmtDeleteAroByAgentExceptPm: drops a stale agent's aros rows EXCEPT AROs where it's recorded pm_agent; roster row still prunes (resolvePm reads aros membership, not roster, so seat resolves correctly). Verified synthetic: test-pm-626 + test-nonpm-626 seeded last_seen=now-700 in aro:test-626 (pm_agent=test-pm-626), /send fired prune -> PM membership survived, non-PM pruned (control), pm_agent unchanged. Restart gated behind ARO announce + cold-start confirmed. aro_config forge-guard untouched.
bug
2026-06-03
6w ago
2026-06-03 21:18