Repository navigation
fix(ci_timing): treat PR runs cancelled by their PR closing as abandoned - #315
Merged
Merged
Conversation
A cancelled pull_request run with no successor was a kill suspect even when its PR had just been closed unmerged: GitHub empties the run's pull_requests once the PR closes, so the collector could not see the closure. ci_timing.sh now also fetches one page of recently closed PRs per repo (head ref + closed_at) and passes it as --closed-prs; a failed or empty fetch degrades to the superseded-only behaviour. classify_cancelled returns "abandoned" for a non-superseded pull_request cancel (not on main) when a same-head-branch PR closed between the run's created_at and updated_at + SUPERSEDE_SLACK_S. Abandoned is benign: counted in a new per-gate "abandoned" key (sidecar + rollup), no event. Push/main cancels never use the rule; thresholds, weights and slack are unchanged. Fixes #314 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Heart YELLOW acknowledged by the human 2026-10-21 (after PR-open; ship-time ask was missed): "! manifest drift: workspace checkouts (manifest ↔ disk) — 1 mismatch(es) vs PyAutoMind/repos.yaml"; "? test run status unknown"; "? release validation incomplete: no rehearsal for current source". |
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.
Summary
After #313, two red
suspect_cancelledci_timing rows remained: workspace-test Smoke Testspull_requestruns (2026-09-19) cancelled ~20 s after their PRs closed unmerged, with no successor. GitHub empties a run'spull_requestson PR close, so the collector could not see why.ci_timing.shmakes one best-effortpulls?state=closed&per_page=50call per polled repo (head ref + closed_at) and passes it as--closed-prs <file>; any failure → no feed → today's behaviour.classify_cancelled: a non-superseded cancelledpull_requestrun (not onmain) is abandoned (benign, counted, no event) when a closed PR on its head branch hascreated_at ≤ closed_at ≤ updated_at + SUPERSEDE_SLACK_S. Main/push cancels, open PRs and late closures stay suspects; superseded wins over abandoned.abandonedcounter (readers checked: monitoring/dashboard/timings ignore unknown gate keys; older sidecars read as 0).Closes #314
Validation
tests/test_ci_timing.py+ newtests/test_ci_timing_script.py(stub-ghplumbing): 57 passed (re-run in-session); full suite 1295 passed.main→ branch: 2 → 0 hang events (both gates nowabandoned 1); every other gate'ssupersededcount unchanged; no fetch errors.🤖 Generated with Claude Code