fix: stage base merge on PR reopen so stale-conflict asks are actionable #197

Merged
joshtronic merged 2 commits from fix/pr-reopen-resolve-stale-conflicts into master 2026-06-10 01:14:13 +00:00
Owner

When a sibling PR merges first, an open bot PR can go un-mergeable
through no fault of its own (a purely textual conflict against the
advanced base). The reviewer's natural ask -- "resolve the conflict with
master" -- went nowhere: the reopen flow checked the PR branch out in
isolation (origin/$PR_HEAD alone) and never merged the base in, so the
agent saw a clean tree, found nothing actionable (AGENTS.md 1b), and
no-op'd a review round-trip. This is exactly what happened to #190 after
#189 landed.

Stage the merge before handing the worktree to the agent:

  • clean merge / already-current -> branch brought up to date with base.
  • conflict -> leave the merge in progress with real markers and tell the
    agent (prompt + AGENTS.md 1b) it is mid-merge and resolving IS the work.

Add a fail-closed conflict-marker gate before any PR-revision push
(list_conflict_marker_violations), mirroring the off-limits/security
gates. The agent or the harness auto-commit can complete a merge with
markers baked in; scanning the committed delta refuses that closed --
the exact failure that shipped <<<<<<< / ======= / >>>>>>> to master
via PR #191. Bounces back to the reviewer instead of pushing broken code.

Reactive foundation only: triggered by the existing REQUEST_CHANGES /
reassignment pickup, human stays the bottleneck. Autonomous reconcile
(a mergeable=false pickup signal) layers on top later without rework.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

When a sibling PR merges first, an open bot PR can go un-mergeable through no fault of its own (a purely textual conflict against the advanced base). The reviewer's natural ask -- "resolve the conflict with master" -- went nowhere: the reopen flow checked the PR branch out in isolation (origin/$PR_HEAD alone) and never merged the base in, so the agent saw a clean tree, found nothing actionable (AGENTS.md 1b), and no-op'd a review round-trip. This is exactly what happened to #190 after #189 landed. Stage the merge before handing the worktree to the agent: - clean merge / already-current -> branch brought up to date with base. - conflict -> leave the merge in progress with real markers and tell the agent (prompt + AGENTS.md 1b) it is mid-merge and resolving IS the work. Add a fail-closed conflict-marker gate before any PR-revision push (list_conflict_marker_violations), mirroring the off-limits/security gates. The agent or the harness auto-commit can complete a merge with markers baked in; scanning the committed delta refuses that closed -- the exact failure that shipped <<<<<<< / ======= / >>>>>>> to master via PR #191. Bounces back to the reviewer instead of pushing broken code. Reactive foundation only: triggered by the existing REQUEST_CHANGES / reassignment pickup, human stays the bottleneck. Autonomous reconcile (a mergeable=false pickup signal) layers on top later without rework. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix: stage base merge on PR reopen so stale-conflict asks are actionable
Some checks failed
Lint / check-sync (push) Successful in 3s
Lint / check-sync (pull_request) Has been cancelled
d85a6bcdd4
When a sibling PR merges first, an open bot PR can go un-mergeable
through no fault of its own (a purely textual conflict against the
advanced base). The reviewer's natural ask -- "resolve the conflict with
master" -- went nowhere: the reopen flow checked the PR branch out in
isolation (origin/$PR_HEAD alone) and never merged the base in, so the
agent saw a clean tree, found nothing actionable (AGENTS.md 1b), and
no-op'd a review round-trip. This is exactly what happened to #190 after
#189 landed.

Stage the merge before handing the worktree to the agent:
- clean merge / already-current -> branch brought up to date with base.
- conflict -> leave the merge in progress with real markers and tell the
  agent (prompt + AGENTS.md 1b) it is mid-merge and resolving IS the work.

Add a fail-closed conflict-marker gate before any PR-revision push
(list_conflict_marker_violations), mirroring the off-limits/security
gates. The agent or the harness auto-commit can complete a merge with
markers baked in; scanning the committed delta refuses that closed --
the exact failure that shipped <<<<<<< / ======= / >>>>>>> to master
via PR #191. Bounces back to the reviewer instead of pushing broken code.

Reactive foundation only: triggered by the existing REQUEST_CHANGES /
reassignment pickup, human stays the bottleneck. Autonomous reconcile
(a mergeable=false pickup signal) layers on top later without rework.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge branch 'master' into fix/pr-reopen-resolve-stale-conflicts
All checks were successful
Lint / check-sync (push) Successful in 3s
Lint / check-sync (pull_request) Successful in 3s
56efbed635
joshtronic deleted branch fix/pr-reopen-resolve-stale-conflicts 2026-06-10 01:14:13 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
joshtronic/igor!197
No description provided.