From 5b6040c60d88350826109eb315e3053f664dba8f Mon Sep 17 00:00:00 2001 From: migatu Date: Mon, 3 Aug 2026 18:38:45 +0200 Subject: [PATCH] conjurer: add CONJURER_SELF_CALLBACK to both bots (per-origin librarian answers) Pairs with conjurer#18: each bot advertises its own callback so the shared librarian answers results/pongs back to the bot that asked - test bot http://192.168.1.73:32442, deploy bot :32443. No CONJURER_MAIN_BOT repointing needed for the librarian anymore; DEPLOY-BOT.md updated (only the musician stays single-target). Co-Authored-By: Claude Opus 4.8 --- conjurer/DEPLOY-BOT.md | 16 +++++++++++----- conjurer/bot.yaml | 3 +++ conjurer/deploy-bot.yaml | 4 ++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/conjurer/DEPLOY-BOT.md b/conjurer/DEPLOY-BOT.md index ee1269e..026ae7a 100644 --- a/conjurer/DEPLOY-BOT.md +++ b/conjurer/DEPLOY-BOT.md @@ -68,8 +68,14 @@ tar xzf snapshots/deploy-state-2026-08-03-0417.tgz -C /mnt/.../deploy-bot/data/ ## Routing librarian / musician callbacks -The librarian (`CONJURER_MAIN_BOT`) and musician push search results and -"now playing" events to **one** bot address — currently the test bot's -`192.168.1.73:32442`. To make **this** bot receive them, repoint those services' -`CONJURER_MAIN_BOT` to `192.168.1.73:32443` (this bot's NodePort). Only one bot -can receive them at a time. +**Librarian — handled automatically.** Each bot advertises its own +`CONJURER_SELF_CALLBACK` (test `…:32442`, this bot `…:32443`) on every query and +ping, and the librarian answers each result/pong back to the bot that asked. One +librarian serves both bots — no `CONJURER_MAIN_BOT` repointing needed. (The +librarian keeps `CONJURER_MAIN_BOT: http://bot:5000` only as a fallback for a bot +that doesn't send a callback.) + +**Musician — still single-target.** The musician pushes "now playing" events to +its one `CONJURER_MAIN_BOT` (currently the test bot, `192.168.1.73:32442`). Only +one bot gets radio events; repoint the musician's `CONJURER_MAIN_BOT` to +`192.168.1.73:32443` if the production bot should show them instead. diff --git a/conjurer/bot.yaml b/conjurer/bot.yaml index 4ac4645..98246e6 100644 --- a/conjurer/bot.yaml +++ b/conjurer/bot.yaml @@ -28,6 +28,9 @@ spec: - { name: CONJURER_FILE_SERVICE, value: "http://192.168.1.89:5000" } - { name: CONJURER_RADIO_HARBOR, value: "http://192.168.1.79:54321" } + # Where the librarian sends THIS bot's results/pongs back to (its own + # NodePort). Lets one librarian serve both bots - see deploy-bot.yaml. + - { name: CONJURER_SELF_CALLBACK, value: "http://192.168.1.73:32442" } volumeMounts: - { name: data, mountPath: /data } - { name: netrc, mountPath: /secrets, readOnly: true } diff --git a/conjurer/deploy-bot.yaml b/conjurer/deploy-bot.yaml index 66a9259..ed87bb6 100644 --- a/conjurer/deploy-bot.yaml +++ b/conjurer/deploy-bot.yaml @@ -43,6 +43,10 @@ spec: - { name: CONJURER_RADIO_SERVICE, value: "http://192.168.1.79:5005" } - { name: CONJURER_FILE_SERVICE, value: "http://192.168.1.89:5000" } - { name: CONJURER_RADIO_HARBOR, value: "http://192.168.1.79:54321" } + # This bot's own callback (its NodePort). The librarian records it per + # query and answers results/pongs HERE - so it serves this bot AND the + # test bot from one instance, no CONJURER_MAIN_BOT repointing needed. + - { name: CONJURER_SELF_CALLBACK, value: "http://192.168.1.73:32443" } volumeMounts: - { name: data, mountPath: /data } - { name: netrc, mountPath: /secrets, readOnly: true }