Skip to content

fix(ci_timing): treat concurrency-superseded cancels on main as benign - #313

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/ci-timing-superseded-main-cancels
Oct 21, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/ci-timing-superseded-main-cancels

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

heart/checks/ci_timing.py::classify_cancelled treated every cancelled main run as a kill-timer/hang suspect, so ordinary concurrency-group cancellations during a merge burst became red suspect_cancelled events (e.g. PyAutoFit Tests 39064925733 / 39064933625, cancelled when the next push's run 39064940041 arrived seconds later). Eight such rows held the monitoring inventory red for weeks.

A cancelled run of any event is now superseded when a newer run of the same workflow on the same branch was created no later than the cancelled run's end (updated_at + SUPERSEDE_SLACK_S = 60 s) — the arrival that caused the cancel. No successor, or one created long after the run ended, stays a suspect. PR runs keep their original "any newer run on the PR branch" rule. Supersession is judged against every run of the workflow (the cancelling run is often still in flight). No threshold, factor or weight changes.

Closes #311

Validation

  • tests/test_ci_timing.py: 43 passed (4 new: real 10-17 main-push burst → 0 events; in-flight successor; slack edge vs 4-min-later successor; lone main cancel → suspect; renamed long-after-end case still suspect). Full suite: 1281 passed.
  • Collector against a scratch state dir, before → after: 8 → 2 hang events. Cleared: PyAutoArray 37002625195/37002707936, PyAutoFit 39064925733/39064933625/38734091128, autofit_workspace_test 34260011683 (each had a successor created 1–2 s before its recorded end). Kept: autogalaxy/autolens_workspace_test 35438870386/35438871780 — PR runs cancelled ~20 s after PR feat: PyAutoCTI joins the release gate #323 closed with no successor run; not the supersession signature, left for a separate decision.
  • Events are re-judged from fresh API runs each collection (not carried from the previous board), so the cleared rows drop on the next real collection; no expiry rule needed.
  • In-session diff review.

Heart

Heart RED override (development only), authorized live by the human 2026-10-21 ("Override and proceed"); exact RED reasons verbatim on #311. Merge needs a separate /prm with all checks green; no release.

🤖 Generated with Claude Code

classify_cancelled flagged every cancelled main run as a kill-timer
suspect, so main pushes cancelled by the workflow's concurrency group
(e.g. PyAutoFit Tests 2026-10-17 20:01) held the board red.

A cancelled run of any event is now superseded when a newer run of the
same workflow on the same head_branch was created no later than its end
(updated_at + SUPERSEDE_SLACK_S = 60 s). PR runs keep the original
"any newer run on the PR branch" rule. Supersession is judged against
all runs of the workflow, including an in-flight successor.

Refs #311

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 9619fbe into main Oct 21, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/ci-timing-superseded-main-cancels branch October 21, 2026 10:19
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.

fix: ci_timing treats concurrency-superseded main cancels as kill events

1 participant