Give the drift alarm an inbox — assign a failure issue to mmcky - #29
Merged
Conversation
The strict build is this repo's early warning for data references landing in 8 upstream lecture repos, and it works: it went red on the 2026-07-27 schedule the day after lecture-python.myst#1001 added the phillips suite. Then it sat there for a week, because a red scheduled run notifies nobody in practice. It only surfaced when it blocked an unrelated PR (#27), by which point two more repos had drifted and the Pages deploy had been skipped since Jul 17. So on any non-PR failure, open one issue assigned to mmcky, or comment on it if it is already open. PRs are excluded — that failure is already in front of the author. Dedup is by the audit-drift label, created in-band with `gh label create --force` so there is no manual setup step. The issue carries the actual warning lines, not just a run link: the fix for a drift failure is almost always one entry in audit_annotations.yml, and the warning names the reference. Capturing them means teeing the build step, hence `set -o pipefail` — without it tee's exit code would mask the strict failure and nothing would fire at all. Verified locally against clones of all 8 repos, by dropping one annotation to induce drift: the teed step still exits 1, the collection step emits well-formed $GITHUB_OUTPUT, and the body renders with the warnings fenced and the links absolute. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds an “inbox” for audit-dashboard drift failures by having the workflow automatically open (or update) a single tracking issue on non-PR failures, ensuring scheduled/push-to-main regressions don’t go unnoticed and block unrelated work.
Changes:
- Tee the strict audit build output into
audit.logwhile preserving failure exit codes (pipefail) so downstream failure handling still triggers. - Collect
warning:lines from the audit output and expose them as a job output for reuse. - Add a
notifyjob that, on non-PR workflow failures, creates/updates a singleaudit-drift-labeled issue assigned tommcky, including actionable warning lines and run links.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #28. The strict build is this repo's early warning for data references landing in 8 upstream lecture repos, and it works — it went red on the 2026-07-27 schedule the day after QuantEcon/lecture-python.myst#1001 added the phillips suite. Then it sat there for a week, because in practice a red scheduled run notifies nobody. It only surfaced when it blocked an unrelated PR (#27), by which point two more repos had drifted and the Pages deploy had been skipped since Jul 17.
What it does
On any non-PR failure of
build, the newnotifyjob opens one issue assigned to @mmcky — or comments on it if it is already open. Dedup is by anaudit-driftlabel, created in-band withgh label create --force, so there is no manual setup step before this works.mainincluded, not justscheduleaudit_annotations.yml, and the warning names the reference — no reason to make someone open the run log firstCarrying the warnings is why the build step is now teed, and why it needs
set -o pipefail: without ittee's exit code masks the strict failure and nothing fires at all.Verification
Run locally against fresh clones of all 8 lecture repos, inducing drift by dropping one annotation. The teed step still exits 1 (so
failure()fires), the collection step emits well-formed$GITHUB_OUTPUT, and the rendered body has the warnings fenced and the links absolute — relative links do not resolve reliably in issue bodies, so both are built fromgithub.server_url.I also confirmed the post-#28 push to
maindeployed successfully, so the dashboard is live again and this notifier is guarding a green baseline rather than papering over a red one.Two notes
mmckyis hardcoded as the assignee. That is the smallest thing that answers the actual need; if this should route to a team or a rotation later, the assignee line is the only thing to change.consumed-file-check.ymlhas the same silent-failure gap on push tomain— it is the go-live guardrail, so a failure there matters more than a stale dashboard, though itspull_requesttrigger means it almost always catches problems pre-merge. I did not extend this to it, because copying ~40 lines of shell into a second workflow is the wrong shape — if you want it covered, the notifier should become a composite action first. Happy to do that as a follow-up.🤖 Generated with Claude Code