fix(ci-alert): cancelled main builds no longer slip past the failure alert #193
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 403 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.359
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #193"
general
weight: 0.35
Danathar
Summary: bluefin-bling has an automated guard that opens a GitHub issue whenever the main build fails, is cancelled, or runs out of time, so someone always notices a broken build. When a build is only cancelled because a newer build has already started, the guard is supposed to check for that and stay quiet instead of raising a stale alert. That "is this cancelled build already replaced?" check contained a broken command, so it gave up partway every time a build was cancelled and could miss the alert. This repair swaps the bad command for the correct one, so cancelled builds are handled correctly again without changing when or how alerts are raised.
What I need from you: Approve it.
---
Root cause
.github/workflows/ci-alert.ymlstarts an alert job when a CI run on main is cancelled. Its first step asks GitHub whether a newer main push has already superseded the cancelled run, using this call:gh apidoes not accept the-Gflag. Withset -euo pipefailin effect, an unknown flag makes the command exit non-zero, so the job stopped before it could decide whether the cancelled build had been superseded — exactly the cancelled-build path. Successful runs skip this step, which is why all current green runs never exercised the defect (issue #192).The change
One token, no behavior change:
The explicit
-X GETis the supported way to force a GET when field arguments are present. Pagination, thebranch/event/per_pagequery fields, and the jq filter that picks the newest newer run are all unchanged.Testing
Added
tests/test_ci_alert.py(standard-libraryunittest, no new dependencies):-Gshorthand and asserts an explicit-X GETis used.branch,event, andper_pagequery fields are present.The new tests fail against the pre-fix workflow and pass after the fix, so they catch a reintroduction of the flag.
Completion criteria (from issue #192)
Scope note
Workflow-only change plus its tests. No new credential, permission, or alert-policy decision.
Closes #192
-- hive: backend=pi model=lemonade/ornith-1.5-35b-a3b-gguf-q6_k
---
🐝 Hive Agent:
contributor| SHA:ba60a74