Repository navigation
Description
Overview
Two red ci_timing suspect_cancelled rows remain after #313: workspace_test Smoke Tests PR runs cancelled ~20 s after their PRs closed unmerged, with no successor. Closing a PR is a benign reason to cancel; the collector can't see it because GitHub empties pull_requests on closed PRs.
Plan
- Cancelled
pull_requestrun, no successor, PR closed ≤ run end + 60 s (existingSUPERSEDE_SLACK_S) → abandoned (benign, counted, not an event). - Everything else unchanged: main/push cancels and PR cancels with an open or much-later-closed PR stay suspects; no threshold/weight/slack change.
- Collector fetches one
pulls?state=closed&per_page=50page per polled repo, matched on head branch; failure degrades to today's behaviour. - Tests on the two real 09-19 runs plus open-PR, late-close and missing-feed cases; full suite + tenant firewall locally; scratch collector 2 → 0.
Tier: judge (undeclared Consequence) — merge mode: human /prm
Detailed implementation plan
Affected Repositories
- PyAutoHeart (primary)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| organs/PyAutoHeart | main | clean |
Suggested branch: feature/ci-timing-abandoned-pr-cancels
Implementation Steps
heart/checks/ci_timing.sh: per polled repo, also fetchrepos/<repo>/pulls?state=closed&per_page=50(head ref + closed_at) and pass it to the Python step; on failure pass nothing.heart/checks/ci_timing.py: accept the closed-PR list; inclassify_cancelled(or beside it) return"abandoned"for a PR-event cancel with no successor whose head branch has a PR closed_at ≤ updated_at + SUPERSEDE_SLACK_S; count it like superseded (separate counter if the schema allows without breaking readers). Update docstrings.- Tests in
tests/test_ci_timing.pyfor the cases above. - Run the full suite and
repos_sync.py --check --only "tenant firewall (organ code)"; scratch-dir collector before/after.
Heart at the door: YELLOW (workspace validation reason pending ingest of the passing euclid run) — no override.
Original Prompt
Click to expand starting prompt
Heart ci_timing: PR runs cancelled when their PR closes are flagged as kill suspects
Type: bug
Target: health_fixes
Themes:
- heart
- ci
Difficulty: small
Autonomy: supervised
Priority: low
Status: formalised
Filed: 2026-10-21
Context
After PyAutoHeart#313 (superseded cancels), two red suspect_cancelled ci_timing
rows remain: autolens_workspace_test Smoke Tests 35438871780 and
autogalaxy_workspace_test Smoke Tests 35438870386 (branch
feature/workspace-organs-regroup, 2026-09-19). Both are pull_request runs
cancelled ~20 s after their PRs closed unmerged (autolens_workspace_test#323
closed 11:05:51, run ended 11:06:13; autogalaxy_workspace_test#124 closed
11:05:47, run ended 11:06:08), with no successor run. GitHub empties a run's
pull_requests once its PR closes, so the collector cannot see the closure.
Primary repository: @PyAutoHeart (heart/checks/ci_timing.py, ci_timing.sh).
Ask
Classify a cancelled pull_request run with no successor as abandoned (benign,
counted, not an event) when its PR closed no later than the run's end +
SUPERSEDE_SLACK_S. Feed closures from one pulls?state=closed&per_page=50
fetch per polled repo, matched on head branch; a failed fetch degrades to
today's behaviour. No threshold/weight/slack changes; main/push cancels and PR
cancels with an open or much-later-closed PR stay suspects.
User request (verbatim): "do 1 yes bug fix"
Activity
Jammy2211 commentedon Oct 21, 2026
PR opened: #315 (57 targeted tests, full suite 1295 passed, tenant firewall OK, scratch collector 2 → 0 events). 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".
Jammy2211 commentedon Oct 21, 2026
Shipped: #315 merged 2026-10-21. PR runs cancelled within the slack of their PR closing are now 'abandoned' (benign, counted); the last two suspect_cancelled rows clear on the next ci_timing collection.