Repository navigation
fix: recover PR preparation after committed merge conflicts - #148063
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 4:08 AM ET / 08:08 UTC. ClawSweeper reviewWhat this changesThe PR allows PR preparation to recover from committed merge conflicts by validating retained Git conflict records against committed history, and adds acceptance and preservation tests. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main still rejects committed conflict metadata, and the earlier merged recovery work does not handle this case. No blocking introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's PR tooling validates checkout state before replaying a journaled Git transition. The validator compares committed trees, index entries, and working files so preparation can proceed without overwriting unrelated work. flowchart TD
A[Journaled source and target] --> C[Transition validator]
B[Git index and working files] --> C
D[Committed merge history] --> C
C --> E{State matches known trees?}
E -->|Yes| F[Existing native Git recovery]
E -->|No| G[Refuse and preserve state]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +100, Other +47. Total +147 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep committed-conflict admission inside the existing transition validator, preserving refusal of unknown state and the single native recovery path. Do we have a high-confidence way to reproduce the issue? Yes, from source: retained resolve-undo entries after a committed conflict resolution necessarily hit current main's blanket rejection. The PR supplies real-Git regression cases; this review did not execute them. Is this the best way to solve the issue? Yes. The patch narrows the existing admission check while reusing committed-tree comparison and native recovery, avoiding a bypass or a competing repair mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 069710f909f0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit 'a08cdc50bc049074ed7ad2db9e18e0ed3f5415ec': (81 commits) perf: reuse stateless plugin scope defaults (#148080) fix(gateway): flush slow-consumer 1008 close frame before terminating socket (#147707) fix: keep model catalogs loading during other session updates (#147878) fix: show queued external chat messages and their source (#147848) refactor(chat): share math label configuration (#148073) perf(ui): trim eager debug overlay icon payload (#147954) improve(logbook): sample batch frame metadata in SQLite (#147999) fix(ui): dismiss suggested task cards without waiting (#148021) fix(maturity): cover governance, interoperability, fleet, and state (#143528) chore(ui): restore core lint and startup budget checks (#148010) fix: chat startup loads unnecessary session setup text (#147973) perf: speed up fresh cloud worker activation (#147945) fix: recover PR preparation after committed merge conflicts (#148063) test(plugins): isolate ClawHub Docker fixture identity (#148074) fix(release): acknowledge ClawHub risk on moving installs (#148041) fix: restore context reads for installed official Discord and Slack plugins (#143341) fix: identify source capsule filesystem failures (#147778) fix(linux): keep Quick Chat widgets bound to their Gateway (#146049) refactor(infra): consolidate update campaign reset ownership (#146555) refactor: simplify Gateway health response parsing (#147834) ...
* commit '7d485aa2e89af7fdbd09e8ed0489b06d250b07e3': test(scripts): check the configurable ClawHub sweep spec fix: show queued external chat messages and their source (openclaw#147848) refactor(chat): share math label configuration (openclaw#148073) perf(ui): trim eager debug overlay icon payload (openclaw#147954) improve(logbook): sample batch frame metadata in SQLite (openclaw#147999) fix(ui): dismiss suggested task cards without waiting (openclaw#148021) fix(maturity): cover governance, interoperability, fleet, and state (openclaw#143528) chore(ui): restore core lint and startup budget checks (openclaw#148010) fix: chat startup loads unnecessary session setup text (openclaw#147973) perf: speed up fresh cloud worker activation (openclaw#147945) fix: recover PR preparation after committed merge conflicts (openclaw#148063) test(plugins): isolate ClawHub Docker fixture identity (openclaw#148074) fix(release): acknowledge ClawHub risk on moving installs (openclaw#148041) fix: restore context reads for installed official Discord and Slack plugins (openclaw#143341) fix: identify source capsule filesystem failures (openclaw#147778) fix(linux): keep Quick Chat widgets bound to their Gateway (openclaw#146049) refactor(infra): consolidate update campaign reset ownership (openclaw#146555) refactor: simplify Gateway health response parsing (openclaw#147834)
Related: #132180, #144431
What Problem This Solves
Fixes native PR preparation refusing to leave a clean checkout after a resolved merge has been committed.
User Impact
Maintainers can continue review and preparation without manually clearing Git conflict metadata. This changes maintainer tooling only.
Why This Change Was Made
Git keeps the resolved conflict stages in its index after a merge commit. The transition validator currently rejects every such record. The repair accepts records only when their stages match the source's latest first-parent merge and unique merge base, and their current index entry matches the committed source. Hidden flags, uncommitted edits, foreign stages and ambiguous ancestry still refuse recovery.
The existing native restore path owns the transition. No bypass or metadata-clearing command is added.
Evidence