feat(notifications): a webhook channel, for agents and automations (#81) #86
No reviewers
Labels
No labels
bug
docs
duplicate
enhancement
help wanted
invalid
nice-to-have
pre-1.0
question
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/lamplighter!86
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/81-webhook"
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?
What changed
PR #86 adds a Webhook notification channel that POSTs JSON (event, message, report with page and API links) with an optional HMAC-SHA256 signature; 5 new tests fail on main and pass here, mix precommit passes (1254 tests), CI is green, and Send a test from the dev settings page reached a local receiver that verified the signature.
Fixes #81
Red, then green
bash -c 'source ~/.rmenv; export PATH=$HOME/.local/bin:$PATH; eval "$(mise activate bash --shims)"; unset ${!FORGEJO_@} ${!GITHUB_ISSUES_@}; MIX_TEST_PARTITION=_81p mix test test/lamplighter/notifications_test.exs'9e21ee0): exit 12965097): exit 0Checks
bash -c 'source ~/.rmenv; export PATH=$HOME/.local/bin:$PATH; eval "$(mise activate bash --shims)"; unset ${!FORGEJO_@} ${!GITHUB_ISSUES_@}; cd ~/work/lamplighter-v1-4/wt-81 && MIX_TEST_PARTITION=_81r mix test test/lamplighter/notifications_test.exs', exit 0Shipping it
Prover
Passed (Sonnet): I read the diff (the new Webhook channel, its registration, and the now-public Api.report_json). I ran the full suite on the branch: 1254 tests pass. The signature is a lowercase-hex HMAC-SHA256 of the raw body, sent only when a secret is set. Non-2xx answers and network errors come back as error strings, and retry is off. Not tried: a real receiver, and redirects or very large report bodies.
Every command above was run by Fortysix's Basecamp itself, on the branch named.
Settings → Notifications with the Webhook channel; Send a test went to a local receiver that checked the signature (dev):
desktop-webhook.png
desktop-webhook-sent.png
390-webhook.png