Repository navigation
feat(source-control): choose pull request branch updates from shared criteria - #14258
Conversation
Add a pure decision script that picks none, merge, rebase, delegate or hold for one pull request branch from a set of signals, with an ordered first-match table and a forced-value setting that replaces only the forceable rows. The criteria reference records why each row decides as it does and where to read the sources live. Refs: #14199 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
Refs: #14199 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
Add a reader that turns a pull request or branch into the signals the decision script takes, failing toward unknown or blocked. Add the team setting pr_update_method and push-branch.sh --preflight, which checks a rebase target and leaves the force push to the caller. Move the base-branch setting read and the remote lookup into shared libraries, and the overlap check into one helper. A repository's overlap rule runs only for a base shown to be the default branch when the signal reader calls it. Refs: #14199 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
…ision Babysit's refresh and enqueue update now take the shared decision before updating a branch. A native stack member, a failed stack read or a decision that cannot be made is held, with no update, ledger entry or enqueue. Refs: #14199 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
…d decision create, ready, merge and monitor now read one decide-and-carry-out sequence in place of the fixed merge rule, with a rebase procedure that runs on a detached HEAD and pushes only with a pinned lease. ADR 0092 supersedes decision 4 of ADR 0037. Text that said ready always merges the base now says it updates the branch. Refs: #14199 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
claude-security-review reviewed Security review: incremental (2dd704c → 7e64cc8)I read the whole change to both files in the incremental scope and found no security issues. This lane had already reviewed an earlier head of this pull request, so this pass reports blocking findings only. critical-findings: 0 What changed
Both files are documentation only. Neither matches a trusted-path glob. The change touches no trust control, token scope, merge hold, plugin manifest or standing instruction. Earlier findingsThe one earlier SUGGESTION (discussion_r4507940852) was found fixed in the review of 66f27af. This push does not touch that code. No new spend. |
|
claude-review reviewed Code review, incremental (2dd704c → 7e64cc8)No findings. I read the whole change in both files in the incremental scope. This lane had already reviewed an earlier head ( What changed
Checks
Prior and settled threadsBoth settled threads ( Verification statusI ran nothing, because this lane has no shell. Everything above comes from reading the diff and the files at the head commit. SpendNone. This change touches only ADR docs. |
push-branch.sh ran a base ref's own overlap rule for any PR base, so a stacked base's unreviewed script ran in the operator's session. Only a base the remote reports as its default branch may now run its rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
The rebase procedure required the local HEAD to equal the remote tip, so a branch with no pull request and a new local commit was always judged stale and ended in a hold. Its fallback also sent a run with no pull request to the forge's update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
Main took number 0092 for the Miro MCP carry decision while this branch was open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
Refs: #14199
Summary
Problem: every step that updates a pull request branch follows a fixed "merge, never a rebase" rule, whatever the branch's situation. Intent: "driven by facts and the latest consensus-based /research"
create,ready,merge,monitorand babysit's two update sites now read that decision. A repository can force merge or rebase withpr_update_method, on the rows that allow it.Fix
plugins/source-control/scripts/branch-update-method.showns the ordered rows;reference/branch-update-criteria.mdrecords each row's reasoning and sources; ADR 0096 supersedes decision 4 of ADR 0037.branch-update-signals.shreads the signals;stale-base-overlap.sh,lib/base-file.shandlib/github-remote.shhold logic shared withpush-branch.sh,read-review-venue.shandread-pre-ready.sh.push-branch.sh --preflight, and pushes only with a pinned lease in the caller's own command. A repository's overlap rule runs only for a base shown to be the default branch, inpush-branch.shas well.Verification
read-review-venueandread-pre-readyexisting tests pass unmodified.holdmaking no update, no ledger entry and no enqueue. Merge-only guards are unchanged.pull-request-ready-merges-base-never-rebasesandpull-request-create-default-open-state-ready, each scored 1.00 at 66f27af with the validity gate VALID. Each was one run of the with-plugin arm only, so they show the behavior passes and measure no delta against no plugin.Acceptance criteria
create's refresh,ready's base merge, babysit's refresh andreassessall read the same criteria source, and the fixed rule is gone.reassessfollows in the next pull request.Remaining
reassessaction and its eval cases (AC1 to AC13), in a second pull request.Related
Refs: #14199
🤖 Generated with Claude Code
https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ