Skip to content

Check a held pull request again when the checks that held it change - #545

Merged
nambok merged 1 commit into
mainfrom
fix/recheck-stale-holds
Nov 10, 2026
Merged

nambok merged 1 commit into
mainfrom
fix/recheck-stale-holds

Conversation

@nambok

@nambok nambok commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

A finished run's pull request stayed a draft on an Open items line a wrong rule wrote ("the change makes the staging content its end-to-end tests read out of date"). The rule was fixed, but holds are text in the description and nothing checked them again, so the pull request stayed held until a person edited it. The same run also spent three fresh steps writing nothing while the run guard counted each return of the plan check's count (23 back to 37) as progress.

Changes

  • Every blocked line names the code version that wrote it (<!-- coderhelm:checked-by <version> -->). The version is a hash of the worker's and the common crate's sources, computed in worker/build.rs, so it is the same wherever the same code runs and changes whenever that code does. A line with no version counts as written by older code.
  • The ready decision checks such a hold again (ready::recheck_due, new passes/recheck.rs). When a pull request is held on a blocked line other code wrote, settle claims the re-check on the run record (recheck_version, one conditional write, never for a run the guard stopped, a pull request a person put back to draft, or a closed one) and queues a fresh step of the run that resumes at the checks on the open pull request (recheck_at_checks). The step message is rebuilt from the run record. The pull request waits for that step instead of staying held on the old line, and the run then finishes as any run does: settle marks it ready or records the holds that are still true. A security audit that passed is carried; one with open items runs again.
  • Results recorded under other code run again on an unchanged head (Ledger::for_checks_version) for the link, failing-test and new-feature checks, the ones whose failure is a hold. Their fix rounds still count. The proof check's result stands, because its gaps are never a check the change didn't pass.
  • The run guard can't be fooled by CoderHelm's own branch work. A fall in the plan check's count followed by its return counts as progress only when the run's coder wrote code in between. implement::run, the one place every round writes, reports this. The plan check at the start of a step now measures with the stacked base, like every other plan check. Measuring the branch's own diff there read 23 of 38 at each step's start, 37 after, and told the coder 14 tasks were missing that weren't.
  • Incident case w_stale_hold_recheck; u_stacked_plan_check updated so a recovery needs code written; docs/incidents.md row.

Verification

  • cargo fmt --all -- --check: clean.
  • cargo clippy -p common -p worker -p gateway --all-targets -- -D warnings: clean.
  • cargo test -q -p common -p gateway -p worker: common 1634 passed, gateway 798 passed, worker 1425 passed, 0 failed. This includes the incident suite (108 cases) and the new w_stale_hold_recheck tests:
    • a description held by an unversioned or older-version line is due a re-check and clears when the checks find nothing;
    • a line the running code wrote never starts another re-check, and neither does a person's draft or a closed pull request;
    • the claim is once per run and version;
    • the step is rebuilt from the run record at the next step number with the stacked base kept;
    • a self-caused dip and its return are not progress, and the guard stops the run.

A finished run's pull request stayed a draft on an Open items line a wrong
rule wrote. The rule was fixed, but the line was text in the description and
nothing checked it again, so the hold stayed until a person edited it.

- Every blocked line names the version of the code that wrote it: a hash of
  the worker's and the common crate's sources (worker/build.rs).
- When the ready decision finds a pull request held on a line other code
  wrote, the run checks it again on its head in a fresh step that resumes at
  the checks, once per run and code version (claimed on the run record), and
  the pull request waits for that instead of staying held on the old line.
  Results the link, failing-test and new-feature checks recorded under other
  code run again even on an unchanged head; their fix rounds still count.
- The run guard counts a fall in the plan check's count and its return as
  progress only when the run's coder wrote code in between, and the plan
  check at a step's start measures with the stacked base like every other.
- Incident case w_stale_hold_recheck.
@nambok
nambok merged commit 2279c72 into main Nov 10, 2026
10 checks passed
@nambok
nambok deleted the fix/recheck-stale-holds branch November 10, 2026 07:24
coderhelm Bot pushed a commit that referenced this pull request Dec 6, 2026
Moves dashboardRef to coderhelm main (e65ef06), which adds the Pull requests
page (#544), the follow-up on main (#545) and the pull requests overview
(#546). The API they read shipped in #985 and #988.
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.

1 participant