You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handle a Qualified --target Spelling Consistently in local_review #2109
scripts/local_review.py treats --target as a branch name, and a value already spelled as a qualified ref is handled inconsistently across the engine. Each case below predates the #1235 change and was found by the local review passes on it.
A refs/remotes/... target whose ref is absent falls through to the as-written step.target_ref then resolves the value with rev-parse, which also looks the full name up under refs/heads/, so a local branch literally named refs/remotes/upstream/main defines the review scope. The short spelling upstream/main refuses in the same repository.
Other qualified spellings are still tried under origin/.--target remotes/origin/develop resolves to refs/remotes/origin/remotes/origin/develop where an origin branch carries that nested name, and --target refs/heads/develop resolves to refs/remotes/origin/refs/heads/develop rather than the local branch the caller named. Only the refs/remotes/ spelling skips the origin/ candidate.
same_target does not match a qualified spelling.target_ref resolves develop and refs/remotes/origin/develop to the same ref, but same_target("develop", "refs/remotes/origin/develop") is false. A pass recorded with --target develop then does not cover check --target refs/remotes/origin/develop, and check reports a wrong-scope mismatch although the merge base and digest are identical. It fails closed.
Decision needed first
Whether a qualified spelling is in contract at all. The --target help calls the value a target branch. If qualified refs are out of contract, the fix is to refuse any value starting with refs/ or remotes/ with a message naming the branch form. If they are in contract, all three cases need the same normalization in one place, shared by target_ref and same_target.
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.
Activity
State the Qualified-Target Lookup Without Overclaiming It
Promote develop to main: Qualify local_review's Remote-Tracking Targe…
Refuse a Dangling Remote-Tracking Target in local_review (#2121)
ptr727 commentedon Oct 23, 2026
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.