Repository navigation
fix(homeboy): give the daemon the bridge session sender so cook notifications deliver - #717
Merged
Merged
Conversation
…ications deliver homeboy-daemon.service drains the notification outbox but had neither a session sender nor Discord REST credentials, so every cook notification dead-lettered with 'Configure exactly one auth mode'. Bridges now expose an optional bridge_session_sender_command (and bridge_session_sender_env) hook. The daemon unit renders HOMEBOY_SESSION_SEND_COMMAND and the sender's env only when the hook yields a value, puts the sender on PATH, and restarts the daemon on a changed unit only when idle. services/homeboy-daemon.sh names no bridge. Closes #715
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
homeboy-daemon.servicedrains Homeboy's notification outbox, but it had neither a session sender nor Discord REST credentials. Every cook notification failed withConfigure exactly one auth mode, and 366 are sitting in the dead-letter outbox on extrachill.com. Closes #715.Changes
bridges/_dispatch.sh: documents the optionalbridge_session_sender_commandhook.bridges/roadie.sh: Roadie implementsbridge_session_sender_commandas<roadie_bin> send. It also addsbridge_session_sender_env, which providesROADIE_SERVICE_TOKEN_FILEandROADIE_LOCK_PORTwhen it is set.services/homeboy-daemon.sh: the unit rendersHOMEBOY_SESSION_SEND_COMMANDplus the sender env only when a bridge provides the hook, and adds the sender's directory toPATH. Reconcile restarts the daemon on a changed unit only when it is idle; otherwise it warns. The file names no bridge, and the gate greps for that.tests/homeboy-daemon-service.sh: covers rendering with the Roadie bridge (sender, token file, PATH) and without any bridge (no sender).Evidence
I dry-ran the Discord transport with the daemon's exact environment:
failed: Configure exactly one auth modeHOMEBOY_SESSION_SEND_COMMAND=".../roadie send":{"status":"dry_run","delivery":{"mode":"session","destination":"session_thread"}}Tests
tests/homeboy-daemon-service.sh,tests/bridge-render.shandtests/bridge-service-adapters.shpass, andservices/homeboy-daemon.shcontains noroadieliteral.AI assistance