feat(bot,webapp): drop the instance Discord fallbacks (D67) and add a real bot identity check (lane 9 B1) #849
Loading…
Reference in a new issue
No description provided.
Delete branch "build/lane9-b1-d67-identity"
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?
Part of lane 9 (#735), server slice B1. Nothing here waits on A1–A11: the Admin token field and the setup wizard's Discord step are left alone until A2 is answered.
D67: instance-wide Discord never posts
session_service._effective_webhookandvote_service.notify_vote_castno longer fall back to the stored instance webhook or theDEFAULT_DISCORD_WEBHOOK_URLenv var. A campaign without its own webhook gets nothing.reminder_taskshad two further callers of_effective_webhook; both are updated.config.default_discord_webhook_urlsettings_service.get_discord_webhook_fallbackKEY_DISCORD_WEBHOOKdiscord_webhook_urlon the notification settings request and response. A PUT that still sends it is ignored, with a test.POST /admin/settings/bot/test-notifysendTestNotify/test-channel, the bot's"test"event).c4e6a8b0d2f1(data only) deletes the storeddefault_discord_webhookrow. Its downgrade is a no-op.DEFAULT_DISCORD_WEBHOOK_URLloses those posts. The CHANGELOG says so.The bot identity check (IS-394, lane 9 headline 3)
"Connected" used to call the bot's unauthenticated
/health, so a bot with a rotated-out key still showed as connected.GET /identity, authenticated like/notify(X-Bot-Key+compare_digest, 401 otherwise). It returns one of three shapes:readywith the bot's name, id and guild count;disabledwith the reason,no tokenortoken refused;starting.GET /api/admin/settings/bot/identity(admin, 5 s timeout) returns{reachable, key_ok, discord, user, guild_count, detail}:detail;getBotIdentityis added. Lane 9 page 4c draws it./identity./api/bot/*is untouched, soBOT_CONTRACT_VERSIONstays 2.check_version_sync.pypasses.Tests
bot/was checked withruff check, not formatted.Merge note: #848 also adds a migration on
e5f7a9b1c3d4. Whichever merges second gets re-chained, and its one-head pin moved.🤖 Generated with Claude Code