doctor notifications
holocron doctor notifications [--scope <scope>] [--provider <name>] [--built-only] [--deliver] [--post [channel]]Compares the layout a notifications provider declares in holocron.config.ts with what is actually on the server and in the secrets store, and prints one line per step. A plain run changes nothing except one labelled test message it leaves in the layout’s testChannel (see post-works); --built-only is fully read-only, so it is safe to run at any time. It exits non-zero while any step fails.
It is the end-to-end check for setup notifications, and it keeps working afterwards as a drift check: if someone renames a channel, deletes a webhook or removes a secret by hand, the next run says so.
✓ server reachable Holocron (as Holonet) ✓ categories exist 4 of 4 exist ✓ channels in their category, with topics 9 of 9 as declared ✓ webhooks on their channels 6 of 6 exist ✓ webhook names and avatars set 6 of 6 set ✓ roles exist and are mentionable 1 of 1 as declared ✓ role colour, hoist and permissions set 1 of 1 as declared ✓ channel and category access set 7 of 7 as declared ✓ server verification, notifications and community set 6 of 6 as declared ✓ welcome screen and onboarding set 2 of 2 as declared ✓ pinned messages in place 1 of 1 in place ✓ bot description, tags, install link and URLs set 1 of 1 as declared ✓ webhook URLs and role id stored as secrets 7 of 7 exist ✓ role assigned to team members 1 of 1 in sync ✓ test message delivered through a webhook delivered through #holonet (left there) ✓ server owned by a person, not the bot owned by member 709617107741966407
15 ok, 1 fail, 0 skippedWhat each step checks
Section titled “What each step checks”| Step | Passes when |
|---|---|
server |
the bot token is valid and the bot can see the configured server (a provider with no whoami passes if the server can be read) |
categories |
every declared category exists |
channels |
every declared channel exists under its declared category, with the declared topic; a forum is a forum (not a text channel) and has each declared tag with its emoji and moderated flag |
webhooks |
every channel that declares a webhook has one, by name; a channel whose webhooks could not be listed is reported on its own line |
webhook-appearance |
every webhook that should wear a picture (its own webhook.avatar, else the layout’s webhookAvatar) has one; a webhook with none declared is not checked, and the picture itself is not compared (the provider only holds a hash) |
roles |
every declared role exists, and its mentionable flag matches when the layout states one; roles are not read at all when the layout declares none |
role-appearance |
every declared role has the color, hoist and permissions the layout states (colour compared case-insensitively, permissions as a set); only fields the layout states are compared, and ``has the permissions aneveryone section allows and lacks those it denies |
access |
every category and channel with an access (its own, or its category’s) has the same view and post as the layout; roles are compared by name, ignoring case, order and repeats. A channel whose overwrites are not something an access can state (a role-specific deny, a member overwrite, only some of the posting permissions) is reported as such, and setup replaces them |
server-settings |
every field of the layout’s server section matches the server (channels compared by name, ignoring case); a field the layout leaves out is not compared |
welcome-onboarding |
the welcome screen (on or off, text, and its channels in order, with their texts and emoji) and onboarding (its switch, default channels and each question by title) match the layout; whatever the layout leaves out is not compared |
pinned |
each message the layout pins is in its channel, posted by the bot and still pinned, with exactly the layout’s text, or what its file says now (among the channel’s last hundred messages) |
app-settings |
every field of the layout’s application matches the bot’s application (tags and install permissions compared ignoring order and case), including whether the Server Members and Message Content Intents are on (when the layout declares them) and that each declared redirect URI is registered. When roles follow a team and no redirectUris is declared, it asks Sentinel’s /api/link and expects the redirect the link flow would use right now: Sentinel’s when it answers, http://localhost:<port>/callback when it does not. A field the layout leaves out is not compared |
role-members |
every role that declares a team is held by exactly the linked members of that team: nobody on the team lacks it, nobody linked who left the team still holds it, and every team member has linked their account. A role with no team is not checked, and neither are holders nobody has linked |
post-works |
A full run (no --built-only) posts one 🧪 test: message through the testChannel webhook, reads it back, and leaves it in that channel so you can see it. --deliver instead posts to every channel that has a webhook and removes each post again. --built-only posts nothing and prints a note. The webhook is found on the channel itself (a webhook this bot created reveals its token), so no stored secret is needed: it proves the webhook, the channel and the permissions work, not that the stored secret holds the same URL, which the manual check-notify workflow does. The channel must be the one under the declared category, the token only goes to Discord (a custom baseUrl is refused unless unsafeBotBaseUrl is also set), and a post whose response was lost is looked for and removed. A failure names the channel and the step: the post refused, not found in the channel (the last 100 messages are searched), or a post that should go could not be removed. A layout with no testChannel gets a note instead of a step |
server-owner |
the server is owned by a person, not by the bot. A bot that created the server owns it until it hands it over, so this fails (naming the command to finish the hand-over) while it still does. A provider that cannot say who owns the server leaves the step out |
secrets |
every secret the layout fills (webhook URLs, role ids) exists at the target scope (names compare case-insensitively) and no two entries collide, the rule setup refuses |
When the server cannot be read, the steps that depend on it are reported as “not checked” and the reason is printed once. One failing read (a channel’s webhook list, or the roles) is reported on that step and does not discard what was read elsewhere. A provider only needs to be able to read (inspect); it does not have to provision. An empty topic in the layout means “unspecified”, as it does for setup.
The Checkly feed and the Comlink relay
Section titled “The Checkly feed and the Comlink relay”Nine more steps check the two feeds that reach Discord from outside it. They appear only when the layout has them: the three monitoring-* steps when a channel declares feeds.monitoring, and the relay-* steps when the layout declares a relay and a channel declares feeds.errors (relay-integration and relay-rule only with relay.errors). The relay’s DNS record is holocron doctor dns’s and is not repeated here.
| Step | Passes when |
|---|---|
monitoring-feed-webhook |
each channel with feeds.monitoring has the feed’s webhook (default Checkly), with a picture when the layout or the provider gives one |
monitoring-alert-channel |
the monitoring provider’s alert channel (default Message to #<channel>) exists, is formatted for Discord, posts through that feed webhook and has each feeds.monitoring.alerts setting the layout states. The two are told apart by the webhook’s id; the alert channel’s URL is never read |
monitoring-subscriptions |
the alert channel is subscribed to every check routed to it (all of them, unless a check names its alertChannels) and has none switched off. Each check it lacks or has off, and each it is still subscribed to though routed elsewhere, is named, and so is a channel that alerts for check groups while a check is routed away from it |
relay-answers |
an unsigned POST to https://<relay.host>/<errors provider> (/sentry) gets 401. 404 means the Worker is not deployed or has no route. Any other status, a network error or no answer in 5 seconds fails. It is sent once, and nothing is read from the reply |
relay-worker |
the relay script (default comlink) is deployed and serves <relay.host>/* |
relay-bindings |
the Worker has COMLINK_<SOURCE>_WEBHOOK and COMLINK_<SOURCE>_SECRET bound. Only the names of its secrets are read, never a value |
relay-feed-webhook |
the error feed’s webhook (default the provider’s name, Sentry) is on its channel, with a picture when one is declared |
relay-integration |
the error tracker’s integration (default Comlink) exists, posts to the relay’s URL and is offered as an alert action. Its signing secret is not read |
relay-source:<id> |
for each source in relay.sources, the vendor’s webhook exists for https://<relay.host>/<id>, is on, and holds every events and scope entry the layout declares (extra ones are left alone). Read through the capability’s inspectRelaySource; the signing secret is never read. A missing provider, a missing token or a provider that cannot read its webhooks is a skip |
relay-rule |
the tracker’s alert rule (default Errors to Discord (Comlink)) is on each project in relay.errors.projects, enabled, and sends through the integration |
Each step reads from a different provider, and a provider that is missing is a skip with its reason, never a failure:
| Steps | Reads | Skipped when |
|---|---|---|
monitoring-alert-channel, monitoring-subscriptions |
the monitoring provider |
there is none, its token is missing, or it cannot read its alert channels |
relay-worker, relay-bindings |
the workers provider |
there is none, its token is missing, or it cannot read its Workers |
relay-integration, relay-rule |
the errors provider |
there is none, its token is missing, or it cannot read its relay |
relay-answers |
the Worker itself | there is no errors provider, which names the path |
relay-source:<id> |
the provider of its capability, or the plugin its provider names (found as setup finds it) |
there is none, it cannot be loaded, its token is missing, or it cannot read its webhooks |
monitoring-feed-webhook, relay-feed-webhook |
the notifications provider | the server could not be read |
With --built-only and doctor --all
Section titled “With --built-only and doctor --all”These steps run under --built-only, and so under holocron doctor --all, which runs notifications that way. They post nothing: the request to the Worker is unsigned and the Worker refuses it before it reads anything, and every other read is a listing. The delivery proofs that do post (a labelled message sent through a feed and read back) are probes, not part of doctor.
None of them reads a secret value. The Worker’s bindings are listed by name, the alert channel’s URL stays inside the Checkly plugin, and the integration’s signing secret is never requested.
Tokens
Section titled “Tokens”The steps use the tokens the providers already take, so nothing new is needed. They only read: the Checkly alert channels and checks, the Cloudflare Worker scripts, routes and secret names, and the Sentry integrations, projects and alert rules. For Sentry that is the Comlink token (sentry.comlink), as for setup notifications. See tokens. Whether a narrower, read-only token would do for each has not been tried against the providers, so the scopes listed there are the ones setup needs.
The Notifications workflow
Section titled “The Notifications workflow”Three more steps check the workflow that posts failed runs and deploys (platform.notifications.yml). They appear only when the layout fills the alerts or deploys webhook secret (HOLOCRON_NOTIFY_WEBHOOK_ALERTS, _DEPLOYS), and they read one file through the source provider without posting anything.
| Step | Passes when |
|---|---|
notifications-workflow |
.github/workflows/platform.notifications.yml is on the default branch. Without it a failed run or a release reaches no channel |
notifications-workflow-wiring |
every secrets.HOLOCRON_NOTIFY_* name the workflow reads is a secret the layout fills (so every channel it writes to is in the layout), and each of the three webhooks the layout fills is one the workflow posts through. Skipped when the file is missing or could not be read |
notifications-workflow-names |
every name under workflow_run: workflows: is a task id (test:unit, release) or the display name of a hand-written workflow (Sentinel Deploy). An old group name (Verification, Delivery) or an old dotted task name no run carries any more is a problem, because the failures of that workflow would never be posted. Skipped when the file is missing or could not be read |
A missing source provider, or one that cannot read a file, skips all three steps with the reason.
Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--scope <scope> |
the org | Where the layout’s secrets live: repo, env=<name>, or org=<name> |
--provider <name> |
— | Which notifications provider, when more than one can inspect |
--built-only |
false |
Post no test message (a routine drift check, fully read-only) |
--deliver |
false |
Post a test message through every channel’s webhook, read it back and remove it. Works with --built-only, which otherwise posts nothing |
--post [channel] |
off | After the run, post the result to a channel as the bot (alerts when no channel is named). A run with failures posts each failing step and its problems, with each #channel linked; a clean run posts only the heading and the counts. A post that cannot be made is reported and does not change the exit status |
--post is for sharing a drift check you ran yourself: the provider tokens it reads with stay on your machine, and the bot token is the only credential that posts. Every Monday a scheduled workflow (platform.doctorReminder.yml) posts a reminder to run holocron doctor notifications --built-only --post.
Terminal control characters in anything read from the server are stripped, and the structured log records only each step’s verdict, never what was found.