Repository navigation
CLP-1093 Fix the dogfood Slack failure notification - #6250
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Code Review ✅ Approved🟡 Medium risk · Switches dogfood failure alerts to Slack's API using a retrieved bot token. Fixes two independent defects in the dogfood Slack failure notification step: updates the action from v1 inputs ( Review coverage🧪 Functional validation No results 📋 Rules No rules evaluated 🤖 Auto-approval Not enabled · Set up OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|





Part of CLP-910.
The "Notify failures on Slack" step in
dogfood.ymldoes not work, and has notfor a long time. It runs
if: failure(), so it only fires when a dogfood buildis already broken — which is exactly when nobody is watching the step itself.
Two independent defects, both fixed here.
1. The action is called with inputs it does not have
The action is pinned at v4.0.0, but is passed
channel-idandslack-message. Those are the v1.x inputs; v2 replaced them withmethod/token/payload. Neither is declared in v4, so the actionreceives no instruction at all and aborts:
That is from the real run on 2026-09-09 (34345432458) — the dogfood build failed
and the alert about it failed too.
This came from Renovate: #5744 bumped
v1.27.1→v3.0.3on 2026-07-09 andleft the inputs untouched, crossing the v2 breaking change. #5800/#5798/#5826
carried it on to v4.
2. The token it reads is never fetched
Independently of the version bump, the step read
fromJSON(steps.secrets.outputs.vault).SLACK_BOT_TOKEN, but theget secretsstep only ever requested:
There is no
SLACK_BOT_TOKENin that payload, so the expression resolved to anempty string. Conversely
SLACK_WEBHOOKwas fetched and never referenced. Thismismatch predates the version bumps — it is present as far back as
v1.26.0—so the notification never worked under v1 either. The one pre-bump failure run
I can still inspect (2026-06-24) also shows this step failing; its log has since
expired, so I cannot show the v1 error text.
Fixing only the inputs would have left the step broken, just failing later and
for a different reason.
The fix
Switched to the v4 API and to a credential that is actually retrieved. The
Slack bot token lives at
development/kv/data/slack token, which is theconvention used everywhere else in the estate — including
ToggleLockBranch.ymlin this repository, and
release-github-actions/notify-slack. The unusedwebhook line is replaced rather than added to.
The explicit
channelin the payload preserves the intended destination(
squad-corelang-notifs, set by CLP-85 in #5693). A webhook would have postedwherever the shared webhook is configured, which is not necessarily that channel.
About
errors: trueWorth calling out, because it is the difference between this working and only
appearing to work. In v4, config errors are thrown before the request, but
Slack API errors are swallowed by default (
errorsdefaults tofalse):So with the default, a wrong channel or a bad token produces a green step and no
message — the exact silent failure this PR is fixing.
errors: truemakes thosesurface. The step only runs when the job has already failed, so it cannot turn a
passing build red.
Verification
method/token/payloadare the declared inputs at the pinnedSHA, and that
payloadis parsed as YAML (load(input, {schema: JSON_SCHEMA}))in the bundled action, so the inline block is valid.
SLACK_TOKEN, notSLACK_BOT_TOKEN(
token: core.getInput("token") || process.env.SLACK_TOKEN || null), which iswhy the old
env:block could never have worked even with correct inputs. Thetoken is now passed as an input, so no env var is involved.
channel: squad-corelang-notifsand the expectedtext.What I cannot verify from CI: this path only executes when a dogfood build
fails, so a green build here proves nothing about it. The remaining unknown is
whether the bot is a member of
squad-corelang-notifs; if it is not,chat.postMessagereturnsnot_in_channel— which, thanks toerrors: true,will now be visible instead of silent. Worth a deliberate test if you want
certainty before the next real failure.
🤖 Generated with Claude Code