Reconcile declared intent, code, and result when finishing a merge - #738
Merged
Conversation
This was referenced Sep 17, 2026
Owner
Author
|
This pull request is part of a Mergify stack:
|
This was referenced Sep 17, 2026
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a
branch
from
September 17, 2026 00:49
047448a to
5b27b14
Compare
Owner
Author
Revision history
|
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/read-script-s-whole-body-asking-run--fa4a6b3a
branch
from
September 17, 2026 04:23
769c372 to
8c9a494
Compare
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a
branch
from
September 17, 2026 04:23
5b27b14 to
5642a01
Compare
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/read-script-s-whole-body-asking-run--fa4a6b3a
branch
from
September 17, 2026 04:37
8c9a494 to
59d5caa
Compare
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a
branch
from
September 17, 2026 04:37
5642a01 to
462018d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 462018d. Configure here.
Owner
Author
|
Mergify repair stopped: unresolved human review thread PRRT_kwDOT3uYWs6jNYzC |
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a
branch
from
September 17, 2026 04:55
462018d to
ef089ee
Compare
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/read-script-s-whole-body-asking-run--fa4a6b3a
branch
from
September 17, 2026 04:55
59d5caa to
79b7575
Compare
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a
branch
from
September 17, 2026 05:11
ef089ee to
bf3fe1e
Compare
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/read-script-s-whole-body-asking-run--fa4a6b3a
branch
from
September 17, 2026 05:11
79b7575 to
8b6dfda
Compare
The learned rule now covers every merge or rebase, not only whole-side checkouts: each side's commit messages and PR description (intent and named tests), each side's code, and the resolved result must agree, and a mismatch is flagged to the user with history (`why`) and evidence (`principle-prove-it`) instead of being resolved by choice. Taking a whole side stays forbidden. Tests: one real-git case where --theirs drops a non-conflicting hunk, one where a textually clean merge fails the test a commit declared, and checks that pin the rule text. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Change-Id: I6c4fab6adcc07aa0e5b2e11a4ea97e08f794e0f3
EdbertChan
changed the base branch from
stack/EdbertChan/feat/memory-rules-into-catstack/read-script-s-whole-body-asking-run--fa4a6b3a
to
main
September 17, 2026 05:25
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a
branch
from
September 17, 2026 05:25
bf3fe1e to
937de7d
Compare
Contributor
|
Queued — the merge queue status continues in this comment ↓. |
Owner
Author
|
@Mergifyio queue |
Contributor
Merge Queue Status
This pull request spent 5 minutes 47 seconds in the queue, including 5 minutes 20 seconds running CI. Required conditions to merge
|
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
When the agent finishes a merge or rebase, it now checks that three things agree before calling it done.
Those three are what each side said it meant to do, what each side's code does, and what the combined result does.
A merge can finish with no conflict and still break one side's work, so the agent checks every merge.
If the three disagree, it stops and tells you, with the history and test output that show why.
Review Claim
The learned working-style rule for finishing a merge or rebase requires declared intent, code, and result to agree, and requires a flag with evidence when they do not.
Review Lane
behavior
Review Unit
corpus-lesson
Safety Invariant
Taking one side's whole file stays forbidden; the rule only adds checks and a stop-and-flag path, and never tells the agent to pick a side on its own.
Slice Rationale
One rule and its test, replacing this PR's earlier, narrower whole-file rule in place.
Non-goals
Test Plan
Test Plan
python3 -m unittest tests.test_conflict_whole_side_rule -vgit checkout --theirsdrops a non-conflicting hunk, and a textually clean merge fails the test the other branch's commit named.corpus/CLAUDE.learned.md. Resolved with the rule itself: Keep approved fix-later items in every status update #739's commit and PR body declare one added line, the old whole-file line was only context, and the diff against this commit is exactly Keep approved fix-later items in every status update #739's line.tests.test_deferred_items_ruleand this PR's tests:Ran 8 tests ... OK. Search saved memory both ways before a deep dive #740 rebased cleanly; its added lines are unchanged andtests.test_check_memory_first_rulepasses.bash scripts/test/run_all_tests.shon the rebased stack (Classify corpus/CLAUDE.learned.md as a corpus lesson #733 through Search saved memory both ways before a deep dive #740)Revert Plan
Revert Plan
git revert <sha>./install.shso installed copies match🤖 Generated with Claude Code