Skip to content

pass: Let a closed round ledger take fix plans past its head - #4

Draft
jmarrero-bot wants to merge 1 commit into
mainfrom
bot/promoted-fix-rounds
Draft

jmarrero-bot wants to merge 1 commit into
mainfrom
bot/promoted-fix-rounds

Conversation

@jmarrero-bot

Copy link
Copy Markdown

Fixes jmarrero-forge/tracker#109. Promotion closes a PR's midstream review draft, and the draft stays the round ledger, but a closed PR's head is frozen. So once the bot pushed to the branch after promotion, every fix plan for that upstream PR held for good. That is what blocks tracker#101's plan for coreos/rpm-ostree#5658: its ledger, jmarrero-forge/rpm-ostree#2, closed at 2345b2b, while the branch is now at 448445d.

Only an open ledger must now match the upstream head. A closed or merged ledger stays tied to the upstream PR in five ways:

  • it is the only PR in the fork on that branch;
  • it has the same branch and repository;
  • it is the bot's own;
  • all its labels could be read;
  • it is labelled neither hold nor needs-human.

Each failed check now gets its own hold reason. The residual risk is in docs/pass.md: nothing checks who wrote the commits now on the branch, the same as the bot's other rounds on its own PRs.

Testing, on 16-core RHEL 10 devspaces:

  • just check: exit 0, 1835 passed.
  • just smoke and just replay: both exit 0.
  • just decision-diff against 113f892: no change in 45 line(s), base and head both dispatched 1/1, writes 3/3, held 5, requests 57. The recording has no fix plans, so it can't show this change. No live preview was run.
  • New tests: nine cases extend accepted_fix_plans_start_on_the_bots_pull_request. A negative control fails the closed-ledger case and the two-ledger case.
  • Separate review: it traced #5658's live state. Once deployed, the pass would start the plan as round 1 of 2.

The same fix is offered to cgwalters-forge/agent-board separately.

Generated-by: https://github.com/jmarrero-bot#llms

A promoted pull request's round ledger is the midstream draft promotion
closed, and a closed pull request keeps the head it had then. The pass
required that frozen head to equal the upstream pull request's, so once
the bot pushed to the branch after promotion, as it did for
coreos/rpm-ostree#5658 (ledger jmarrero-forge/rpm-ostree#2 at 2345b2b,
branch at 448445d), every fix plan for it was held for good
(jmarrero-forge/tracker#109).

The ledger is already tied to the upstream pull request by being its
head branch's only pull request in our head repository, which this keeps
checking along with the branch name, repository, authorship and labels.
Rounds are keyed by the upstream head, not the ledger's, so the closed
ledger's own head adds nothing. An open ledger tracks its branch, so it
must still be at the head.

The hold lumped unread, held and mismatched ledgers into one reason,
which hid this; it now names the ledger and the check that failed.

Generated-by: AI

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human Waiting on the operator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pass: A promoted PR whose upstream head moved can never take a fix round

1 participant