Repository navigation
fix(ci): open a new coreutils drift PR when the previous one was closed - #2745
Conversation
`gh pr view <branch>` resolves a pull request for that branch in any state. Once the drift PR was closed unmerged it kept matching, so every later weekly run force-pushed the branch and edited that closed PR instead of opening a new one: the run went green and the drift never surfaced. #2161 was closed in July 2026 and silently absorbed every run after it, including today's, which regenerated 20 generated files. Look up open PRs only (`gh pr list --head <branch> --state open`) and create one otherwise. Regression test executes the workflow step with stubbed `gh`/`git`: with only a closed PR matching, the step must call `pr create`, not `pr edit`. Claude-Session: https://claude.ai/code/session_01XD2n4RyeStFm5WagYgg4ch
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 1ce7cb3 | Commit Preview URL Branch Preview URL |
Oct 17 2026, 09:42 AM |
|
All 2438 integration tests passed. The job then crashed in tarpaulin's profraw merge: Why it isn't this PR's:
Root cause is upstream: Re-running the failed job once to confirm. If it recurs here and on Generated by Claude Code |
What changed
The weekly coreutils drift run now opens a new pull request when the previous
drift PR was closed unmerged, instead of silently editing that closed PR.
The PR lookup matches open PRs only (
gh pr list --head <branch> --state open)and creates one otherwise.
Why
gh pr view <branch>resolves a pull request for that branch in any state.Once a drift PR was closed unmerged it kept matching forever, so every later run
force-pushed
chore/coreutils-args-drift, edited the closed PR, and reportedsuccess — the drift never surfaced and no reviewer ever saw it.
PR #2161 was closed unmerged in July 2026 and has silently absorbed every drift
run since. This is not theoretical: the
workflow_dispatchrun today(39019907688)
detected real drift across 20 generated files (uutils
6579cc2→8613dffab,including a new
EscapeSetargument toparse_escape_onlyand%qmoving tolocale_aware_shell_escape), force-pushed it, went green — and opened nothing.The weekly run had also been failing outright since the uucore quoting-style
rename (fixed separately in #2738), so the broken PR path was masked.
Before / After
Workflow step executed with stubbed
gh/git, with only a closed PRmatching the branch:
Before — edits the closed PR; drift stays invisible:
After — opens a reviewable PR:
When a drift PR is open, the run still updates it in place rather than opening
a duplicate (covered by a second test).
Validation:
python3 -m unittest discover -s scripts/tests -p 'test_*.py'→ 177 passed(174 before, +3 here). The two behavioral tests fail against the old step and
pass against the new one.
just check-okf→ conformant.Risk
regeneration, the generated-only diff guardrail, or the read-only/write-scoped
job split. Worst case is one duplicate drift PR, versus the current silent
suppression.
separately so its printf/format changes get their own CI signal and review.
Checklist