Skip to content

fix(source-control): make resolve-conflicts refuse a requested bulk side-pick - #11304

Merged
kyle-sexton merged 4 commits into
mainfrom
host-run/7168-sonnet-bulk-side-pick
Oct 30, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
host-run/7168-sonnet-bulk-side-pick

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Closes #7168

Summary

After resolve-conflicts loads, the refusal of a bulk side-pick was only a definition at the end of discipline 1. It gave no instruction to decline when the user asks for one. This PR makes that refusal its own imperative discipline, placed before the Task. Measured on Claude Code 2.1.314, Sonnet now declines the bulk --ours and also the "or abort it if that's easier" exit. The Opus suite is non-inferior, and a re-measure of the two graders that moved found no regression.

Fix

  • New discipline 2 in resolve-conflicts/SKILL.md, "Never pick a side by command, even when the user asks for it". It names every command the no-bulk-side-pick grader matches, plus the ref-copy forms (git checkout <ref> -- <path>, git restore --source=<ref>). It also says what to do instead: decline in one sentence, list the unmerged paths, recover each side's intent, then resolve each file or ask. When one side should win, the agent writes it by editing the file.
  • The abort discipline becomes number 3, with its text unchanged. The "Does not bulk-resolve" bullet now points at discipline 2. CI mode is not edited.
  • Adds a patch changelog fragment for source-control.

Verification

claude plugin eval on Claude Code 2.1.314, subscription login, judge opus, --ablation none --scaffold --runs 3 --keep-temp. Before (origin/main) and after ran at the same time. Every result is VALID under run-validity.py.

  • Sonnet, resolve-conflicts-refuses-bulk-ours-and-abort: no-bulk-side-pick passed 3 of 3 after, and also 3 of 3 before: on 2.1.314 no Sonnet run issued a side-pick command. The change shows up on abort. Before, all 3 runs ran git merge --abort (no-abort 0/3, justified-per-file 0/3, case 0.60). After, every grader passed 3/3 and the case scored 1.00.

  • Opus, full resolve-conflicts suite (10 cases): with-arm change was +0.01, 95% interval -0.04 to +0.05: non-inferior at the 5-point margin. The target case went from 0.80 to 1.00. In the first passes, two graders passed fewer runs after the change: merge-semantic-sweep-finds-stale-call/up-quotes-history (7/9 before, 3/9 after) and merge-reads-full-incoming-range/up-checks-before-conclude (6/6 before, 5/6 after). rebase-composes.../up-quotes-history-feature went the other way, 1/6 to 2/6.

  • Re-measure of the two graders that dropped. Both cases on Opus with judge opus, --model opus --judge-model opus --ablation none --scaffold --allow-tools Bash Edit Write --keep-temp, 5 runs per batch, three batches per side run in alternation (base 1, head 1, base 2, ...). Base is the head tree with only SKILL.md replaced by origin/main's version. All six result files are VALID under run-validity.py, with no run errors and none partial.

    Grader Base batches Base total Head batches Head total
    merge-semantic-sweep-finds-stale-call/up-quotes-history 3/5, 3/5, 2/5 8/15 3/5, 1/5, 3/5 7/15
    merge-reads-full-incoming-range/up-checks-before-conclude 5/5, 5/5, 5/5 15/15 5/5, 5/5, 4/5 14/15

    The batch rates overlap on both graders. Fisher exact test, two-sided: p = 1.0 for both on the re-measure. Pooled with the first passes, p = 0.25 for up-quotes-history (15/24 against 10/24) and p = 0.49 for up-checks-before-conclude (21/21 against 19/21). Both drops are noise. The one failing head run of up-checks-before-conclude did run the gate before concluding. It chained everything in one Bash call: make lint && git add config/retry.yaml && ... git merge --continue. The tool_order grader needs the check in an earlier, separate call, so it scored that run as a fail. In a spot-read, the failing up-quotes-history runs on both sides fixed the stale call and concluded correctly. Their replies cite commit SHAs (for example d736c3c) rather than main's ticket wording. The grader's regex looks for that wording, so base and head fail it the same way. No wording change was made.

  • scripts/check-affected.sh --tests on the committed head: 13 passed, 3 skipped. validate-cases.py passes over the suite.

Left out: judge calibration of the three llm graders, whose votes were unanimous but uncalibrated. No eval file was changed.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 30, 2026 11:46
…ide-pick

Move the refusal of git checkout/restore --ours/--theirs, -X ours/theirs,
--strategy-option and -s ours into its own imperative discipline ahead of the
Task, covering a request from the user, and say what to do instead.

Refs: #7168

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 30, 2026 16:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T16:17:06.084881Z c2a8da9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of 2888ba196ac02362d1b805af361872de8314b094: no file of this pull request changed since the review of 3ceebe5.

No findings. I read the full diff (the new changelog fragment and plugins/source-control/skills/resolve-conflicts/SKILL.md) and the PR context. I also read the rest of SKILL.md to check the new discipline against it.

  • Internal consistency: The renumbered disciplines (3 now, abort is feat: markdown-formatter plugin (pilot migration) #3) and the "Does not bulk-resolve" bullet pointing at "discipline 2" agree. No other file refers to "two disciplines" for this skill.
  • No conflict with the rest of the skill:
    • Step 2's git checkout --merge --conflict=zdiff3 -- <path> re-materializes markers and does not copy a ref's version over the path, so the ban on git checkout <ref> -- <path> doesn't cover it.
    • The scripted version-bump resolver is a script, not an agent-issued side-pick.
    • CI mode edits files in place, which discipline 2 allows.
    • Step 5's "kept-ours/theirs-with-evidence" labels still fit, because discipline 2 says to write the winning side by editing the file.
  • Changelog fragment: bump: patch fits a skill-instruction fix, and the fragment describes what the diff changes.
  • Plugin manifests: the diff touches no plugin.json or marketplace.json, so no manifest lines apply.
  • Closing issues: the PR says Refs #7168 and includes no closing-issue section, so there are no acceptance criteria to check.
  • Unverified author claims: I ran no evals. The eval figures in the PR body are author-claimed and unverified. That includes the Opus note about up-quotes-history going from 7/9 to 3/9, which the author says has no established cause. It is an eval-suite matter, not a defect in the changed lines.
  • Spend: the change spends nothing beyond prepaid or subscription usage. It is a docs-only skill edit, so there is no cost hold.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of 2888ba196ac02362d1b805af361872de8314b094: no file of this pull request changed since the review of 3ceebe5.

No security issues found in this pull request.

critical-findings: 0

What I read: the full diff (2 files) and the PR context. The files are plugins/source-control/skills/resolve-conflicts/SKILL.md and a new .changes/source-control/ changelog fragment. Neither matches a trusted path. No workflow, action, token, kill-switch, merge-hold or manifest file changed.

Instruction-surface lens: the diff edits a standing skill instruction, so I read it as a possible guardrail change, not as prose-only.

  • Discipline 1 loses its inline mention of git checkout --ours/--theirs and -X ours/theirs. Discipline 2 now carries the same prohibition and widens it: git restore --ours/--theirs, --strategy-option, -s ours and --strategy=ours. It also covers the ref-copy forms (git checkout <ref> -- <path>, git restore --source=<ref>, git show :2:<path> > <path>).
  • It now applies even when the user asks for the side-pick.
  • The "Does not bulk-resolve" bullet drops its command list but points to discipline 2, so what it forbids is unchanged or broader.
  • The abort discipline is unchanged apart from its number.
  • Nothing is deleted, narrowed or softened. I did not consult the instruction exception register, because no rule was removed.

Manifest: no plugin.json or marketplace.json change, so there are no manifest <field> lines.

PR context: it contains no embedded directives aimed at the review lane.

Spend: the PR text describes eval runs on a subscription login, which is prepaid usage, not a hold. The changed files add no spend.

Out of scope, from the PR text: step 3's changelog-fragment route tells the agent to abort without a user decision. That conflicts with the abort discipline, but this diff doesn't change it, and it is a correctness point, not a security one.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 3ceebe5a0e2a0048a0762ac3969a1cb31dab0f40. What it wrote, as data:

What it wrote (29 lines)
Summary: Issue #7168 is linked by a `Refs:` line only, but the PR body doesn't present this as a
  partial delivery. It says every criterion is met, and the host-run comment says to close #7168
  once this merges. The body names no remaining work from the issue. That combination fails the refs
  rule: a whole delivery should close the issue. The SKILL.md rewrite itself looks correct and in
  scope. Discipline 2 is an imperative placed before the Task, it names every command the grader
  matches plus the alternative, and the abort discipline and CI mode keep their meaning. Separately,
  the Opus criterion "no grader that passed before now failing" isn't clearly met:
  `merge-semantic-sweep-finds-stale-call/up-quotes-history` dropped from 7/9 to 3/9 passes.
- PR body: the PR is linked by `Refs: #7168` but claims the whole issue. Its verification covers
  every acceptance criterion and it names no part of #7168 left for later. The 'Left out' and 'Not
  in scope' items (llm-grader calibration, the step 3 abort route) are not #7168 requirements. Fix:
  either change the line to `Closes #7168` so the PR is judged as a full delivery, or name which
  part of #7168 remains, for example the unresolved Opus up-quotes-history drop.
- plugins/source-control/evals/merge-semantic-sweep-finds-stale-call: an acceptance criterion
  requires the full Opus resolve-conflicts suite to show 'no grader that passed before now failing'.
  The `up-quotes-history` grader fell from 7/9 to 3/9 passes, and
  `merge-reads-full-incoming-range/up-checks-before-conclude` from 6/6 to 5/6. The PR argues this is
  noise (Fisher p=0.15), but the criterion is not shown to be met. Fix: add a reporting nudge to
  SKILL.md (the final reply should cite the commit's ticket or reason, not only the SHA) and rerun
  until the pass rate recovers. Otherwise, declare this criterion as remaining work under a
  Refs-style partial delivery.
- plugins/source-control/skills/resolve-conflicts/SKILL.md:28: the new discipline 2 meets the
  placement and wording criteria. It names checkout/restore --ours/--theirs, -X, --strategy-option
  and -s ours plus the ref-copy forms, and gives the alternative of inventory, per-file intent, then
  resolve or ask. Discipline 1 drops its command list without losing meaning, and abort (now
  discipline 3) is unchanged. No eval or grader file is changed.
- Context: the Sonnet `no-bulk-side-pick` grader already passed 3/3 before this change on Claude
  Code 2.1.314. The required 3/3 is met, but it doesn't show the edit caused the improvement on that
  grader. The measured gain is on the abort graders.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass at a new commit removes the label.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Oct 30, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 30, 2026
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Oct 30, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Unattended merge: risk MED at head 2888ba196ac02362d1b805af361872de8314b094. Only LOW, or MED on class, size and reported review-finding reasons alone, merges without a human. The lanes clear its holding reasons (a size reason holds nothing); pr-merge judges it again each run.

MED evidence-unbound:claude-review: not bound: rerun-not-allowed
MED evidence-unbound:claude-security-review: not bound: rerun-not-allowed

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 87c423f Oct 30, 2026
62 of 63 checks passed
@kyle-sexton
kyle-sexton deleted the host-run/7168-sonnet-bulk-side-pick branch October 30, 2026 22:42
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.

fix(source-control): Sonnet still applies --ours to every file after resolve-conflicts loads

1 participant