Skip to content

Restore Mattermost alerts on nightly build failures - #155

Open
loganlipscomb wants to merge 2 commits into
mainfrom
fix/reenable-drift-alert
Open

loganlipscomb wants to merge 2 commits into
mainfrom
fix/reenable-drift-alert

Conversation

@loganlipscomb

@loganlipscomb loganlipscomb commented Sep 21, 2026

Copy link
Copy Markdown

What's broken

Nightly build failures produce no Mattermost alert at all.

When a build fails because a page was removed without a redirect, the drift check flags the failure as drift-related. The generic failure alert deliberately excludes drift-related failures, on the assumption that a dedicated drift alert covers them. That dedicated alert was commented out months ago, blamed on a crash in the third-party Mattermost action. With one path excluded and the other disabled, nothing is sent.

The blame was misplaced. That crash only ever affected push-triggered runs, and a guard restricting the step to scheduled runs had already eliminated it. When the step was commented out, the guard was dropped from the commented text — so re-enabling it as written would have reproduced the original crash.

What's changed

The drift alert step is re-enabled with the schedule guard restored, on the existing action pin. This is the only change; has_drift is untouched.

Upgrading to the newer upstream version of that action was evaluated and rejected for this step: the newer code discards the custom drift message — the list of paths missing redirects — in favor of a generic failure line. Staying on the current pin is deliberate.

Verified

A local simulation chains the repo's own drift script and the real pinned action to render actual message text with the network stubbed out. Every failure mode on a scheduled run produces exactly one alert, and a successful build produces none.

Known gap, not addressed here

Alerts fire on scheduled runs only. A publish failure from a push to main or a manual dispatch still notifies nobody, and neither message names the workflow or the failed job. Worth handling as a separate change.

What still needs testing

The workflow conditions were re-implemented in the simulation rather than evaluated by GitHub's own expression engine. Delivery over Ziti to Mattermost is unproven locally, and requires either waiting for a real nightly failure or deliberately forcing a single test message.

🤖 Generated with Claude Code

The drift alert step was disabled months ago, blamed on a crash in the
Mattermost action. That crash only ever affected push-triggered runs, and
the schedule guard that already fixed it was dropped when the step was
commented out, so re-enabling it as written would have brought the crash
back.

Re-enable the step with the guard restored, and key the generic alert on
whether the drift alert was actually sent rather than on whether the
failure was drift-related, so a broken alert step no longer leaves a
nightly failure silent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@docpreview-dovholuknf-test

docpreview-dovholuknf-test Bot commented Sep 21, 2026

Copy link
Copy Markdown

Documentation preview

Project Status Preview Commit Updated (UTC)
netfoundry/docusaurus-shared ⏭️ Skipped da504f7 Sep 22, 2026 3:35pm

None of the 1 changed files matched a documentation path.

@vercel

vercel Bot commented Sep 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
nf-theme-sandbox Ignored Ignored Preview Sep 22, 2026 3:36pm UTC
unified-doc-preview Ignored Ignored Preview Sep 22, 2026 3:36pm UTC

Request Review

Keeps the drift alert re-enablement as the only change under review.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant