Skip to content

Reconcile declared intent, code, and result when finishing a merge - #738

Merged
mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a
Sep 17, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 17, 2026

Copy link
Copy Markdown
Owner

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

  • No hook enforces the check yet.
  • No change to how the merge queue or the stack tools rebase.

Test Plan

Test Plan

Revert Plan

Revert Plan
  • Safe to revert? Yes
  • Revert command: git revert <sha>
  • Post-revert steps: rerun ./install.sh so installed copies match
  • Data migration? No

🤖 Generated with Claude Code

@EdbertChan

EdbertChan commented Sep 17, 2026

Copy link
Copy Markdown
Owner Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 Reconcile declared intent, code, and result when finishing a merge #738 👈
2 Keep approved fix-later items in every status update #739
3 Search saved memory both ways before a deep dive #740

@EdbertChan EdbertChan changed the title Never resolve a conflict by taking one side's whole file Reconcile declared intent, code, and result when finishing a merge Sep 17, 2026
@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a branch from 047448a to 5b27b14 Compare September 17, 2026 00:49
@EdbertChan

EdbertChan commented Sep 17, 2026

Copy link
Copy Markdown
Owner Author

Revision history

# Type Changes Reason Date
1 initial 047448a 2026-09-17 00:49 UTC
2 content 047448a → 5b27b14 (raw) 2026-09-17 00:49 UTC
3 rebase 5b27b14 → 5642a01 (rebase only) 2026-09-17 04:23 UTC
4 rebase 5642a01 → 462018d (rebase only) 2026-09-17 04:37 UTC
5 rebase 462018d → ef089ee (rebase only) 2026-09-17 04:55 UTC
6 rebase ef089ee → bf3fe1e (rebase only) 2026-09-17 05:11 UTC
7 rebase bf3fe1e → 937de7d (rebase only) 2026-09-17 05:26 UTC

@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/read-script-s-whole-body-asking-run--fa4a6b3a branch from 769c372 to 8c9a494 Compare September 17, 2026 04:23
@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a branch from 5b27b14 to 5642a01 Compare September 17, 2026 04:23
@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/read-script-s-whole-body-asking-run--fa4a6b3a branch from 8c9a494 to 59d5caa Compare September 17, 2026 04:37
@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a branch from 5642a01 to 462018d Compare September 17, 2026 04:37

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread corpus/CLAUDE.learned.md
Comment thread corpus/CLAUDE.learned.md
@EdbertChan

Copy link
Copy Markdown
Owner Author

Mergify repair stopped: unresolved human review thread PRRT_kwDOT3uYWs6jNYzC

@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a branch from 462018d to ef089ee Compare September 17, 2026 04:55
@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/read-script-s-whole-body-asking-run--fa4a6b3a branch from 59d5caa to 79b7575 Compare September 17, 2026 04:55
@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a branch from ef089ee to bf3fe1e Compare September 17, 2026 05:11
@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/read-script-s-whole-body-asking-run--fa4a6b3a branch from 79b7575 to 8b6dfda Compare September 17, 2026 05:11
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
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
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/never-resolve-conflict-taking-one-side-s-whole--6c4fab6a branch from bf3fe1e to 937de7d Compare September 17, 2026 05:25
@mergify

mergify Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@EdbertChan

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify

mergify Bot commented Sep 17, 2026

Copy link
Copy Markdown
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
  • check-success = lint
  • check-success = test
  • check-success = validate

@mergify mergify Bot added the queued label Sep 17, 2026
@mergify
mergify Bot merged commit 7499e59 into main Sep 17, 2026
7 of 12 checks passed
@mergify mergify Bot removed the queued label Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant