fix(dor): scope the dor-stuck mark by ownership, not by the gate label - #1003
Merged
Conversation
The 💀 notice comments directly on the affected issue and must do so ONCE; the `dor-stuck` label is how it remembers. That mark was looked up with `--label dor-stuck --label "$LABEL"`. Since #1002 the walk follows board membership, so `stalled` can hold an issue carrying no gate label — and that query can never return such an issue. Its mark would be invisible, the dedupe would never fire, and the comment would repeat every hour on something already broken. 38 open Feature-board items have no gate label, so this was one dead build away from firing. Nothing is in Building on either board today, which is the only reason it has not. Scope the lookup by the same ownership rule the walk uses (`belongs_here`) instead. Equivalent for gate-labelled issues, and the "clear the mark once it recovers" loop now only touches issues this pipeline owns. The harness could not see this: its stub served the marked list regardless of the --label arguments, so both queries looked identical. It now models GitHub's AND-ing of repeated --label filters, which is what makes the two distinguishable. Two assertions added; the first fails against main. Also anchored three 💀 assertions on the comment's target rather than on "died mid-flight" — that phrase appears in the health digest too, so they could not tell a direct comment from a line in the report. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
A latent regression from #1002. Nothing is in
Buildingon either board today, which is the only reason it has not fired yet.The bug
The 💀 notice is the only signal a died build produces — the flow dies with the sidekick, so it never reaches its own error handling. It comments directly on the affected issue, and is meant to do so once; the
dor-stucklabel is how it remembers:Before #1002 the walk only ever saw gate-labelled issues, so
stalledandmarkedwere drawn from the same population. Since #1002 the walk follows board membership, sostalledcan hold an issue carrying no gate label — and--label dor-stuck --label "$LABEL"can never return that issue. Its mark is invisible, the dedupe never fires, and the comment repeats every hour, on an issue that is already broken.38 open Feature-board items have no gate label, so this was one dead build away from firing.
The fix
Scope the lookup by the same ownership rule the walk uses (
belongs_here:bug→ Bug Pipeline, otherwise → Feature Pipeline) rather than by the gate label. Equivalent for gate-labelled issues, and the "clear the mark once it recovers" loop now only touches issues this pipeline owns, instead of potentially clearing marks belonging to the other board.Why the harness missed it
The stub served the marked list regardless of the
--labelarguments, so the gate-labelled query and the ownership-scoped one looked identical to it. It now models GitHub's AND-ing of repeated--labelfilters, which is precisely what makes the two distinguishable.Two assertions added, 33 total. Against
main, exactly one fails:Also anchored three 💀 assertions on the comment's target (
COMMENT: issue comment 370) instead of the phrase "died mid-flight" — that phrase appears in the health digest as well, so they could not distinguish a direct comment from a line in the report. One of them was passing for the wrong reason.Not fixed here
Two other paths remain gated on the gate label, both deliberately:
§2) — the label is the opt-in that says "this issue belongs in the pipeline". Sweeping every open issue in the repo would drag in meta and docs issues that must never reach the board. The 38 unlabelled issues are therefore un-healable if they ever fall off the board, which is an argument for labelling them, not for changing the query.§3b, closed issues still holding a sidekick — pre-existing, unchanged by feat(dor): sweep the whole board, and notify only when findings change #1002. Narrowing it by ownership would mean dropping the label filter from a--limit 50window sorted by creation date, which risks missing older entries. Left alone rather than traded for a subtler gap.🤖 Generated with Claude Code