{"record":{"id":"39abd057c4754a97","repo":"nikivdev/code","slug":"sync-auto-fix-cleared-raw-conflicts-for-but-the-39abd0","errorCode":null,"errorMessage":"Sync auto-fix cleared raw conflicts for {} but the merge is still open. Validate the repo and finish the merge manually.","messagePattern":"Sync auto-fix cleared raw conflicts for (.+?) but the merge is still open\\. Validate the repo and finish the merge manually\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/sync.rs","lineNumber":4118,"sourceCode":"                            .record(stage, \"merge validation pending after raw conflict repair\");\n                        bail!(\n                            \"Sync auto-fix cleared raw conflicts for {} but validation and merge finalization are still pending.\\nRun `:sync repair --packet {}` or validate and finish the merge manually.\",\n                            remote_ref,\n                            packet_path.display()\n                        );\n                    }\n                    SyncRepairRouteOutcome::Unresolved => {}\n                }\n            }\n            recorder.record(stage, \"raw conflicts auto-resolved but merge not finalized\");\n            if let Some(packet_path) = repair_packet_path {\n                bail!(\n                    \"Sync auto-fix cleared raw conflicts for {} but the merge is still open.\\nRun `:sync repair --packet {}` or validate and finish the merge manually.\",\n                    remote_ref,\n                    packet_path.display()\n                );\n            }\n            bail!(\n                \"Sync auto-fix cleared raw conflicts for {} but the merge is still open. Validate the repo and finish the merge manually.\",\n                remote_ref\n            );\n        }\n    }\n\n    let conflicted_files = conflicted_files_in_repo(repo_root).unwrap_or_default();\n    let repair_packet_path = if conflicted_files.is_empty() {\n        None\n    } else {\n        write_sync_repair_packet(\n            repo_root,\n            SyncRepairKind::MergeConflict,\n            &conflicted_files,\n            &merge_detail,\n            Some(&remote_ref),\n            None,\n            None,","sourceCodeStart":4100,"sourceCodeEnd":4136,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/sync.rs#L4100-L4136","documentation":"Thrown in src/sync.rs as the fallback of the 'merge still open' case: auto-fix cleared raw conflict markers, the merge remains un-finalized, and no repair packet path is available (repair_packet_path is None). Since there is no packet to resume from, the user is told to validate the repo and finish the merge manually.","triggerScenarios":"Same route as error 908 — SyncRepairRouteOutcome::Unresolved with raw conflicts auto-resolved — but the repair packet was never created (repair_packet_path == None), so the packet-less bail variant fires with only the remote ref.","commonSituations":"Auto-fix ran without packet capture enabled or the packet creation failed; older tool version that doesn't emit packets; repair invoked through a path that skips packet recording.","solutions":["Check `git status` for the open merge; resolve any remaining conflicts and `git add` the files.","Complete the merge with `git commit` (keeping the default merge message).","Validate the repo (run tests/lint) to confirm the auto-resolution is correct; revert suspect hunks if not.","Re-run sync once the merge is closed; consider updating the tool version so repair packets are produced."],"exampleFix":"// before\nf sync\n// error: Sync auto-fix cleared raw conflicts for origin/main but the merge is still open...\n\n// after\ngit status            # inspect open merge\ngit add -A            # after resolving anything left\ngit commit            # finalize merge\nf sync","handlingStrategy":"validation","validationCode":"import std::path::Path;\nfn check_merge_open(repo_root: &Path) -> bool {\n    repo_root.join(\".git/MERGE_HEAD\").exists()\n}\n// Run before sync; if true, finish or abort the merge first:\n//   git status && git add -A && git commit   (or git merge --abort)","typeGuard":null,"tryCatchPattern":"match sync::run(&repo_root, &cmd) {\n    Err(e) if e.to_string().contains(\"merge is still open\") => {\n        eprintln!(\"No repair packet available. Finish manually: git add -A && git commit, then re-sync.\");\n    }\n    other => other,\n}","preventionTips":["Check `git status` for an open merge before re-running sync after an auto-fix.","Keep the tool up to date so repair packets are generated and resumable.","Run validation (tests/lint) after agent auto-fixes; agent conflict removal is not proof of correctness.","If you don't want the merge, `git merge --abort` and redo the sync from a clean state."],"tags":["sync","merge-conflict","auto-fix","merge-open","manual-resolution"],"backgroundTag":"merge-finalization-pending","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}