librarian: odsyłaj wynik do bota, który wysłał zapytanie (obsługa wielu botów) #18
Reference in New Issue
Block a user
Delete Branch "librarian-per-origin-callback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Po co
Żeby jeden librarian obsługiwał oba boty (testowy + deploy) — teraz strzelał każdym wynikiem/pongiem w jeden statyczny
CONJURER_MAIN_BOT. Bez tego fixa health-check deploy-bota by nie działał: jego ping wracałby pongiem do testowego, więc deploy nigdy nie włączyłby cogu librariana.Jak
CONJURER_SELF_CALLBACK) do każdego/queryi/ping.{target, payload}) — więc resender dowozi do bota-źródła nawet po restarcie librariana.MAIN_BOT_ADDRESS; stary wpis OUTBOX (surowy payload sprzed tej zmiany) też się dostarcza do domyślnego bota → upgrade bezszwowy.Deploy (paruje się z deploy#11)
Dodać
CONJURER_SELF_CALLBACKbotom: testowyhttp://192.168.1.73:32442, deployhttp://192.168.1.73:32443— dorzucam to do deploy#11. Librarian dalej maCONJURER_MAIN_BOT: http://bot:5000jako fallback.Testy
Per-origin dostawa wyniku + fallback dla starego kształtu (outbox); busy/idle pong routowany do callbacku vs default (lifecycle). Suite: 58 unit + 52 integration zielone.
🤖 Generated with Claude Code
So one librarian can serve several bots (test + deploy) instead of firing every result/pong at a single static CONJURER_MAIN_BOT. * The bot includes its own callback address (CONJURER_SELF_CALLBACK) in every /query and /ping. * The librarian stores that callback with the query (persisted with the request, so a replay after restart still answers the right bot) and, for results, in the OUTBOX entry ({target, payload}) so the resender delivers to the origin bot even across a librarian restart. * Pongs go back to the pinging bot too - otherwise a second bot's health check would be ponged to the first and always time out, so it could never enable its librarian cog. * Empty callback falls back to MAIN_BOT_ADDRESS, and a legacy OUTBOX entry (raw payload, pre-callback) is still delivered to the default bot, so the upgrade is seamless. Tests: per-origin result delivery + legacy-shape fallback (outbox), busy/idle pong routed to the callback bot vs default (lifecycle). Suite: 58 unit + 52 integration green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>