basquetWi + New ticket
llmmsg-srv MSG-266

Harden aro retire path to cascade-delete aro_config (no orphan dormancy ghosts)

Done normal clcoder-llmmsgsrv-cc

Elazar-approved 1a (2026-07-12). Retiring an aro (insert into retired_aros) currently removes 'aros' membership but NOT the 'aro_config' PM-seat row, leaving an orphan that the PM-succession sweep (stmtArosByPm = aro_config WHERE pm_agent=?, hub.mjs:1547, iterated ~2993) keeps re-processing -> emits successionNotify dormant announce (:2111) into an empty retired room. Found via aro:agent-maintainer (data-fixed live already). DURABLE fix: in the retire path, also DELETE FROM aro_config + aros (+ any other per-aro sidecars e.g. aro_fanout_allow) in the same txn, mirroring hardcoded cleanup at hub.mjs:551. Post-condition: SELECT c.aro FROM aro_config c JOIN retired_aros r ON r.aro=c.aro returns zero. Normal audit+bounce, sequenced AFTER the elazar-contact/MSG-264 stack (0fc97b4) bounce - do not disturb the frozen audit head. Ref mem:aro-retire-orphan-config.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 5w ago
  • wi-cli-venus commented · 5w ago
    Scope refined + approved (coder recon 2026-07-12). Discriminator: cascade sweepable state/config, leave inert history. CASCADE: aros, aro_config, aro_fanout_allow, pm_pending_queue (one txn, mirror hub.mjs:551). LEAVE: brainstorm_* (status-gated on open, orphans all closed/superseded, cannot emit), aro_kick_log, messages. Post-condition generalized to 4-table join vs retired_aros = 0 (aro_config-only would pass clean over 4 live aro_fanout_allow orphans). Data-fix existing aro_fanout_allow orphans (kpi-n-optimization/whey-status/venus-status/lezama-status) same window. Ref mem:aro-retire-orphan-config.
  • wi-cli-venus statusChanged · 5w ago
    Built as commits 7110b06 (cascade) + 7da2478 (busy-signal escalation mute). Head 7da2478, audit requested. Two-retire-paths fix: purgeRetiredAroState() shared by POST /aro_retire AND boot migration seed (:403, actual orphan source); one-txn tombstone+purge + idempotent boot reconcile (=data-fix). Copy-DB tested: 4 fanout_allow orphans->0, brainstorm_session=10 survives. Closes on PM bounce after audit-clear.
  • wi-cli-venus completed · 5w ago
    Deployed + verified green 2026-07-12 06:34 (hub v2.34.4, audited head 8f8bafd). Boot reconcile fired ONCE: '[migrate-retired-aro-state] purged 4 orphan state row(s) across 14 retired aro(s)' (the 4 aro_fanout_allow orphans kpi-n-optimization/lezama/venus/whey-status). Post-boot verified: orphan join=0 across aros/aro_config/aro_fanout_allow/pm_pending_queue; open-brainstorm-in-retired-room=0; brainstorm history preserved (10 rows, not deleted); NO survivor-WARNING line; escalation query carries hub-mute + busy-signal payload-mute (ltrim charset). Both retire paths (endpoint + boot seed :403) call shared purgeRetiredAroState; retire is now destructive (PM ruling a). Ref mem:aro-retire-orphan-config. Shipped commits 7110b06+7da2478+7ace0f4+8f8bafd.
task
5w ago by wi-cli-venus
5w ago
2026-07-12 06:35