Repository navigation
fix(ci): preserve labeler work on ignored PR edits - #150728
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 17, 2026, 3:49 AM ET / 07:49 UTC. ClawSweeper reviewWhat this changesThe PR isolates ignored pull-request edits from useful Labeler runs and adds scheduling regression coverage and documentation. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main and the latest release retain the cancellation problem. No introduced correctness or security defect was found, and this maintainer-authored PR is protected from cleanup closure. Priority: P2 Review scores
Verification
How this fits togetherLabeler processes GitHub events and applies repository labels used for triage. Workflow concurrency decides which runs survive before individual labeling jobs evaluate whether the event interests them. flowchart TD
A[GitHub event] --> B{Ignored PR edit?}
B -->|Yes| C[Unique run group]
C --> D[Labeling jobs skipped]
B -->|No| E[Existing PR or ref group]
E --> F[Evaluate labeling jobs]
F --> G[Update repository labels]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +116, Docs +2, Config +9. Total +127 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep ignored events outside the useful-work concurrency group while preserving existing labeling eligibility and useful-event replacement. Do we have a high-confidence way to reproduce the issue? Yes, from source: admit useful labeling, then a body-only edit into the same cancelling group before job eligibility is evaluated; the pending-run variant also replaces useful work. No live reproduction was executed during this review. Is this the best way to solve the issue? Yes. Changing the ignored event's group addresses both active cancellation and pending replacement; disabling cancellation alone would leave the pending-work failure intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a3a2d39a8e81. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
A PR description edit can cancel useful Labeler work and then skip its own label job. Workflow concurrency is admitted before the job's title/base-change condition, so the skipped event currently shares the useful PR run's cancelling group.
User Impact
Description-only edits preserve running and pending labeling. Useful PR events retain their existing per-PR cancellation behavior; issue labeling and manual backfills retain their existing sequencing.
Why This Change Was Made
Give only ignored PR edits a unique per-run concurrency group. Changing cancellation alone would still let an ignored edit replace useful pending work. Job and step conditions, permissions, token scopes, label rules, runners, queue mode, caps, and timeouts remain unchanged.
Evidence
The existing synthetic Admission model reproduces both running cancellation and pending replacement on the original workflow. Three ignored-edit controls fail before the fix while eight normal-event controls pass; all 188 admission and label-policy cases pass after. The existing edited-field guard also passes.
Parsed workflow objects are identical except for
concurrency.group. Canonical workflow validation passes, including actionlint, zizmor, and repository guards. Fresh isolated P0–P2 review is scoped-clean. These are local scheduling-model checks, not a new live cancellation probe.The observed incident was Labeler run 35182266834 on #150565, cancelled during checkout while a body-only edited run skipped labeling. Its cancellation log, qualified base, and inspected main use the same workflow source. The retained log records the cancellation but does not independently name its initiating run; the event pairing comes from the maintainer's retained observations.
The selected changed-file checks pass, including test-root types, all three dead-export scans, and lint. Documentation sanity, formatting, and
git diff --checkpass. No live workflow probing or extra dispatch was performed.