Repository navigation
agent rules: update only the next PR to merge - #1184
Conversation
The fork's ~265 Update-branch merges (11-14..11-28) came from agents calling update-branch with the owner's token, not the pr-queue (it has no runs on the fork). Replace the merge-queue-only rule with one that holds without a queue: update only the pull request merged next, once, right before it merges. Part of #1094 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: code · reviewer: claude-opus-5-5 · read at: a242850 blocker: none Checked: the diff is one bullet in State question: runs again: "at most once" means a second move of the base before the merge goes untested, which is acceptable only if the merge follows the green CI at once. Stops half-way: an updated PR that does not merge (red CI, agent stopped) stays next in line, and the rule does not say whether a later agent may update it again; "once per merge attempt" would make that clear. Old or empty state: a far-behind or conflicting PR gets tested against main only if the first major is fixed, and its conflict path is the first minor. 🤖 Generated with Claude Code |
Fix round 1 (code lens): the rule now requires the single update of a behind PR before its merge and says what to do when it conflicts; updates.md no longer says main's ruleset requires up-to-date branches. Part of #1094 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fix round 1, head 07524f8:
Checks: doc_check on both files (0 problems), plus vp fmt, vp lint and the fork-check scripts (schema, upstream files, seam). All pass. 🤖 Generated with Claude Code |
|
lens: code · reviewer: claude-opus-5-5 · read at: 07524f8 blocker: none Round 1, fixed: the rule now requires the update (before you merge a behind PR: update once, wait for CI, merge), so the PR is tested against current main as #444 asks. Checked: the full diff (two bullets/paragraphs in State question: runs again: a second update is needed only if main moved between the update and the merge (first minor). Otherwise one update per merged PR, and waiting PRs are left alone. Stops half-way: an updated PR whose CI goes red, or whose agent stops, stays behind-or-current. The next agent that merges it applies the same rule at its own merge time, so nothing is lost. Old or empty state: a far-behind PR gets one update and a full CI before it merges. A conflicting one goes through a local merge and a fresh lens read. 🤖 Generated with Claude Code |
* agent rules: update only the next pull request to merge The fork's ~265 Update-branch merges (11-14..11-28) came from agents calling update-branch with the owner's token, not the pr-queue (it has no runs on the fork). Replace the merge-queue-only rule with one that holds without a queue: update only the pull request merged next, once, right before it merges. Part of #1094 Co-Authored-By: Claude Opus 5.5 <[email protected]> * agent rules: one update right before the merge, strict off on purpose Fix round 1 (code lens): the rule now requires the single update of a behind PR before its merge and says what to do when it conflicts; updates.md no longer says main's ruleset requires up-to-date branches. Part of #1094 Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Part of #1094 (F8: one update per PR, right before it merges).
Where the Update-branch merges came from
All 534 PRs merged 11-14..11-28, every main-into-branch merge commit on each:
web-flow, author the owner account: the update-branch API with the owner's token), on 239 PRs: 215 once, 22 twice, 2 three times. Another 121 were localgit merge origin/maincommits (conflict fix rounds), not counted here.fork-pr-queue.ymlhas no runs on this repository (no caller workflow), and none of a random sample of 20 updated PRs has a queue comment.main: CI before mergeruleset hasstrict_required_status_checks_policy: false. That is on purpose: the one update right before the merge gives the same check against current main (Owner: require PR branches to be up to date before merging into main? (recommend yes) #444) without an update on every move of the base.Change
So the pr-queue is left as it is (it already updates one PR per run) and the rule goes in
docs/fork/agent-rules.md, as the issue asks when agents are the source. It replaces "never update by hand when a merge queue does it", which did not apply here because no queue runs. The new rule: before you merge a PR that is behind main, update it once, wait for its CI, then merge; never update PRs that are only waiting, and never on each move of the base. If the update fails on a conflict, merge main in locally and fix it: that is a new fix round, and the lenses read it again.docs/fork/updates.mdno longer says main's ruleset requires up-to-date branches. It now says strict is off on purpose and that the single update before the merge runs the seam checks on both changes together.No guard: one does not fit. A Bash hook cannot tell from the command which PR merges next, and T3's pull-request tools update branches outside Bash, so a guard would refuse right calls and still miss wrong ones.
Left for #1094
The orchestrator's merge conveyor (outside this repository) follows the rule: one update of the PR it merges next, then CI, then the merge.
General vs project
General: the rule is in the general agent rules. Project facts (strict off here, the numbers) are in this PR only.
Checks
Docs-only change, so no test.
doc_check.pyon both docs: 0 problems.vp fmt,vp lint. Fork checks: the schema, upstream-files and seam tests (197 pass) and scripts against this commit all pass.🤖 Generated with Claude Code