Repository navigation
fix(ci): report nothing for a cancelled run instead of every package as failed - #271
clubanderson wants to merge 4 commits into
Conversation
|
Verification & Status:
Next action: Author (@clubanderson) must rebase onto |
…as failed Run 36205360031 was cancelled by hand one minute into rebuild0. No wave had uploaded an rpm-s<stage>-<package> artifact yet, and the report job ran on always(), so it read that silence as 215 failed packages and filed the "Factory: packages failing on main" tracking issue naming the whole build list (projectbluefin#267). A cancelled run has no verdict. Gate report on !cancelled(), the same shape publish already uses: a failed wave or a failed publish gate still reports and still drives the tracking issue, a cancellation reports nothing. assert_gate_enforced now rejects always() on the report job and requires it to wait for prepare, precedence, publish and every wave, and the workflow test covers both. Skill write-back: repeated-mistakes gains entry 21 (this is the second time the tracking issue spoke for a run that decided nothing, after the canary-on-main case in b858eee), and package-build-cache no longer claims runs are never cancelled -- a merge never cancels one, a human can. Fixes projectbluefin#267 Hive-Run: projectbluefin#267 Hive-Plan: factory-report-cancelled-run Hive-Spec: factory-report#cancelled-run-no-verdict Assisted-by: Claude Fable 5.1 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Andrew Anderson <andy@clubanderson.com>
fa55624 to
e74a1a8
Compare
|
Rebased onto
|
There was a problem hiding this comment.
Looks correct to me. Verified on head e74a1a8:
.github/workflows/rebuild-rpms.yml:931-936— thepublishjob already gates on!cancelled() && needs.prepare.result == 'success' && ..., so the newreportgate at:961is the same shape as the job it depends on, as the comment claims. The failed-wave path is preserved: a wave that fails leavespublishskipped, not cancelled, and!cancelled()is true for skipped upstream jobs, so the report still runs and still reads the artifact list.tools/publish_gate.py:_assert_report_has_a_verdictrejectsalways(), requires!cancelled(), and requiresneedsto includeprepare,publish, and every stage — and it is wired intoassert_gate_enforced(:416), so the CLI no-arg mode enforces it too, not just pytest.python3 -m pytest tests/on this head: 655 passed (the two new negative tests included).
Docs in package-build-cache.md and repeated-mistakes.md §21 match the behaviour. Nothing else in the diff.
Confidence: 5/5 (safe)
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
castrojo
left a comment
There was a problem hiding this comment.
Reviewed at e74a1a8. Gates the rebuild report job on !cancelled() instead of always(), preventing cancelled runs from reporting all unbuilt packages as failed in the tracking issue. Tests in tests/test_incremental_publish.py pass and assert_gate_enforced verifies the rule. Awaiting second independent review and Canary run on a repo-owned branch to hit merge threshold.
There was a problem hiding this comment.
docs-currency
- (low) PR body says the new gate "requires it to wait for
prepare,precedence,publishand every wave", buttools/publish_gate.py:467checks only("prepare", "publish", *STAGES)and the comment at:465-466deliberately excludesprecedence(it runs insidepublish-repository.yml). Code is right; the PR description overstates it — worth correcting the body so the next reader doesn't hunt for a missing check.
No findings from: correctness, security, intent-alignment, style.
Confidence: 5/5 (safe)
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thanks — fixed the PR body: the |
There was a problem hiding this comment.
correctness
- (low, in-scope) The
reportif:change (.github/workflows/rebuild-rpms.yml:969) has no run proving it: the Canary check on this PR exits in 3s with "a fork pull request cannot publish the canary image; a maintainer must push this branch to the repository" (run 36324155550). Your own quick-check (docs/skills/repeated-mistakes.md:497"Is there a run, on this head, that reached the gate") is unmet. Low risk — the same!cancelled()shape already gatesrebuild1..13andpublish*at rebuild-rpms.yml:587–909 — but a maintainer push of the branch would close the gap.
docs-currency
- (info, in-scope) PR body says the write-back is "entry 21"; the diff adds
## 22(docs/skills/repeated-mistakes.md:464, following existing## 21at :445). The file is right; the body is off by one.
No findings from: security, intent-alignment, style.
Confidence: 5/5 (safe)
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Danathar
left a comment
There was a problem hiding this comment.
Read the full diff at 11380ea against main. The report job now runs on !cancelled() instead of always(), the same shape as publish, so a failed wave or failed publish gate still reports and a cancelled run does not. tools/publish_gate.py rejects always() on report and requires it to wait for prepare, publish and every wave.
Ran on 11380ea: python3 -m unittest discover -s tests (694 tests, OK, 1 skipped) and python3 tools/publish_gate.py (exit 0). Also merged onto current main 896ad14 (clean) and reran both: OK. Put always() back on the report job in a scratch copy and assert_gate_enforced rejects it.
CI on 11380ea: Tests run 36324155138 passed (unit tests, factory config, onboarding, runtime contract, quoting). Canary in run 36324155550 failed after 3s with "a fork pull request cannot publish the canary image; a maintainer must push this branch to the repository". That is the fork guard, not the change, but it means no canary has run on this head.
…ncelled-run fix(ci): report nothing for a cancelled run instead of every package as failed (carries #271)
Why
Run https://github.com/projectbluefin/utah-packages/actions/runs/36205360031 was cancelled by hand (actor
hanthor) one minute intorebuild0. No wave had uploaded anrpm-s<stage>-<package>artifact yet, and thereportjob ran onalways(), so it read that silence as 215 failed packages and filed #267 naming the whole build list. Nothing actually failed: 39 jobscancelled, 13skipped, 0failure.What
.github/workflows/rebuild-rpms.yml—reportruns on!cancelled()instead ofalways(), the same shapepublishuses. A failed wave or a failed publish gate still reports and still drives the tracking issue; a cancelled run has no verdict and reports nothing.tools/publish_gate.py—assert_gate_enforcednow also checks the report job: rejectsalways(), requires!cancelled(), and requires it to wait forprepare,publishand every wave (precedenceruns insidepublish-repository.yml, so waiting on the finalpublishalready covers it — the check deliberately does not list it).tests/test_incremental_publish.py— updated the report-job test and added two negative cases (always()rejected; a report that does not wait forpublishrejected).docs/skills/repeated-mistakes.md— entry 21: this is the second time the tracking issue spoke for a run that decided nothing (after the canary-on-main case,b858eee/ fix(ci): keep a canary dispatched on main away from the tracking issue #261). Quick-check item added.docs/skills/package-build-cache.md— no longer claims runs are "never cancelled"; a merge never cancels one, a human can, and says what the report does then.Validation
just check— factory contract, validate, workflow quoting, runtime contract all pass.pytest tests: 618 passed; the 1 failure (test_check_retry) is a pre-existing BSD-sedincompatibility on macOS, identical onmain.pre-commit runon the touched files — passes except a pre-existing actionlint SC2153 info in the untouchedpublishjob.The tracking issue #267 itself will be closed by the next healthy production run (the workflow already does that), or by this PR's
Fixes #267on merge.Fixes #267
— hive: backend=copilot model=claude-fable-5.1