{"key":"haip_irc_cutover_and_gateway_fixes_2026_04_05","title":"HAIP IRC Cutover And Gateway Fixes","content":"Concise handoff for the HAIP IRC cutover and the follow-up gateway fixes completed on 2026-04-05.\n\nWhat changed\n- The live IRC bridge on `svc-ai` was cut over from `irc-openclaw-bridge.service` to `haip-irc.service`.\n- `irc-openclaw-bridge.service` was stopped and disabled.\n- `haip-irc.service` was started and enabled.\n- HAIP is now the active production IRC bridge.\n\nImportant operational state\n- Ergo IRC server is still the same active IRC server on `svc-ai`.\n- Hostname path `irc.accursedbinkie.com` is working again through NPM on `svc-dns-01`.\n- NPM fix required publishing `6667` and `6697` in `/home/svc-admin/docker/nginx-proxy-manager/docker-compose.yml` on `svc-dns-01`.\n- `svc-dns-01` root filesystem was also extended to use the full resized disk; `/` now has ample free space.\n\nHAIP IRC presence behavior change\n- Original HAIP gateway behavior joined every agent nick to every IRC room.\n- This was changed so presence is now roster-driven:\n  - `opsbot` joins all managed IRC rooms\n  - each agent nick joins only rooms where it has an active `room_roster_membership`\n  - `!bring` and `!remove` trigger immediate reconcile\n  - Web UI roster changes are picked up by a periodic reconcile loop\n\nFiles changed for roster-driven IRC presence\n- `/home/svc-admin/ai-projects/projects/homelab_ai_platform/haip/irc/client.py`\n  - added `PART` support\n- `/home/svc-admin/ai-projects/projects/homelab_ai_platform/haip/irc/gateway.py`\n  - replaced global join-all behavior with DB-driven presence reconciliation\n  - added periodic presence reconcile loop\n  - updated `!bring` / `!remove` to reconcile immediately\n\nTwo gateway bugs fixed after cutover\n1. Message routing bug\n- In multi-nick mode, opsbot was still the only listener parsing channel traffic.\n- But the gateway only routed normal channel traffic when `single_nick_mode` was enabled.\n- Fix: route all non-DM, non-command channel traffic through the orchestrator from opsbot in both modes.\n\n2. Database write bug\n- IRC turns were passed into the orchestrator with `trigger_message_ref=None`.\n- `turn_decisions.trigger_message_ref` is `NOT NULL` in the live DB.\n- This caused orchestration failures and no replies.\n- Fix: synthesize a stable non-empty IRC message reference in the gateway using channel, sender nick, and timestamp before calling the orchestrator.\n\nFiles changed for response restoration\n- `/home/svc-admin/ai-projects/projects/homelab_ai_platform/haip/irc/gateway.py`\n  - removed the bad `single_nick_mode` routing gate\n  - now generates a synthetic `trigger_message_ref` for IRC turns\n\nVerification performed\n- `haip-irc.service` is active and enabled\n- `irc-openclaw-bridge.service` is inactive and disabled\n- HAIP agent nicks register successfully on IRC\n- end-to-end message probe to `#arena` succeeded with a live reply from `arenasynth`\n- response example observed:\n  - `:arenasynth ... PRIVMSG #arena :READY.`\n\nCurrent intended behavior\n- HAIP agents should now both appear and respond in IRC according to room roster membership\n- creating a new agent in HAIP should not make it appear in IRC until explicitly added to a room roster\n- Arena rooms should show Arena agents only, and `#arena-impl` should contain `opencode` because that room roster includes it\n\nIf follow-up debugging is needed\n- first check `journalctl --user -u haip-irc.service -n 200 --no-pager`\n- then inspect `/home/svc-admin/ai-projects/projects/homelab_ai_platform/haip/irc/gateway.py`\n- confirm live roster membership in PostgreSQL before assuming IRC presence bugs","summary":"Concise handoff for the HAIP IRC cutover and the follow-up gateway fixes completed on 2026-04-05.\n\nWhat changed\n- The live IRC bridge on `svc-ai` was cut over from `irc-openclaw-bridge.service` to `haip-irc.service`.\n- `irc-openclaw-bridge.service` was stopped and disabled.\n- `haip-irc.service` was started and enabled.\n- HAIP is now the active production IRC bridge.\n\nImportant operational state\n- Ergo IRC server is still the same active IRC server on `svc-ai`.\n- Hostname path `irc.accursedbinkie.com` is working again through NPM on `svc-dns-01`.\n- NPM fix required publishing `6667` and `6697` in `/home/svc-admin/docker/nginx-proxy-manager/docker-compose.yml` on `svc-dns-01`.\n- `svc-dns-01` root filesystem was also extended to use the full resized disk; `/` now has ample free space.\n\nHAIP IRC presence behavior change\n- Original HAIP gateway behavior joined every agent nick to every IRC room.\n- This was changed so presence is now roster-driven:\n  - `opsbot` joins all managed IRC rooms\n  - each agent nick joins only rooms where it has an active `room_roster_membership`\n  - `!bring` and `!remove` trigger immediate reconcile\n  - Web UI roster changes are picked up by a periodic reconcile loop\n\nFiles changed for roster-driven IRC presence\n- `/home/svc-admin/ai-projects/projects/homelab_ai_platform/haip/irc/client.py`\n  - added `PART` support\n- `/home/svc-admin/ai-projects/projects/homelab_ai_platform/haip/irc/gateway.py`\n  - replaced global join-all behavior with DB-driven presence reconciliation\n  - added periodic presence reconcile loop\n  - updated `!bring` / `!remove` to reconcile immediately\n\nTwo gateway bugs fixed after cutover\n1. Message routing bug\n- In multi-nick mode, opsbot was still the only listener parsing channel traffic.\n- But the gateway only routed normal channel traffic when `single_nick_mode` was enabled.\n- Fix: route all non-DM, non-command channel traffic through the orchestrator from opsbot in both modes.\n\n2. Database write bug\n- IRC turns were passed into the orchestrator with `trigger_message_ref=None`.\n- `turn_decisions.trigger_message_ref` is `NOT NULL` in the live DB.\n- This caused orchestration failures and no replies.\n- Fix: synthesize a stable non-empty IRC message reference in the gateway using channel, sender nick, and timestamp before calling the orchestrator.\n\nFiles changed for response restoration\n- `/home/svc-admin/ai-projects/projects/homelab_ai_platform/haip/irc/gateway.py`\n  - removed the bad `single_nick_mode` routing gate\n  - now generates a synthetic `trigger_message_ref` for IRC turns\n\nVerification performed\n- `haip-irc.service` is active and enabled\n- `irc-openclaw-bridge.service` is inactive and disabled\n- HAIP agent nicks register successfully on IRC\n- end-to-end message probe to `#arena` succeeded with a live reply from `arenasynth`\n- response example observed:\n  - `:arenasynth ... PRIVMSG #arena :READY.`\n\nCurrent intended behavior\n- HAIP agents should now both appear and respond in IRC according to room roster membership\n- creating a new agent in HAIP should not make it appear in IRC until explicitly added to a room roster\n- Arena rooms should show Arena agents only, and `#arena-impl` should contain `opencode` because that room roster includes it\n\nIf follow-up debugging is needed\n- first check `journalctl --user -u haip-irc.service -n 200 --no-pager`\n- then inspect `/home/svc-admin/ai-projects/projects/homelab_ai_platform/haip/irc/gateway.py`\n- confirm live roster membership in PostgreSQL before assuming IRC presence bugs","status":"active","namespace":"shared:platform","namespace_name":"shared","namespace_tier":"platform","tags":[]}