{"record":{"id":"64386e031643ee7d","repo":"nikivdev/code","slug":"sync-auto-fix-cleared-raw-conflicts-for-but-the","errorCode":null,"errorMessage":"Sync auto-fix cleared raw conflicts for {} but the merge is still open.\nRun `:sync repair --packet {}` or validate and finish the merge manually.","messagePattern":"Sync auto-fix cleared raw conflicts for (.+?) but the merge is still open\\.\nRun `:sync repair --packet (.+?)` or validate and finish the merge manually\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/sync.rs","lineNumber":4112,"sourceCode":"                        sync_progressln!(\"Sync agent validated and finalized the merge\");\n                        recorder.record(stage, \"sync agent validated and finalized merge\");\n                        return Ok(());\n                    }\n                    SyncRepairRouteOutcome::ValidationPending => {\n                        recorder\n                            .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,","sourceCodeStart":4094,"sourceCodeEnd":4130,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/sync.rs#L4094-L4130","documentation":"Thrown in src/sync.rs when auto-fix cleared raw conflict markers but the merge is still open (SyncRepairRouteOutcome::Unresolved fell through) and a repair packet path is available. Unlike error 907, validation wasn't merely pending — the merge itself remains un-finalized. The message includes the remote ref and packet path for resuming.","triggerScenarios":"The repair route ends with 'raw conflicts auto-resolved but merge not finalized'; `repair_packet_path` is Some, so the packet-aware variant of the bail fires, naming the packet via `packet_path.display()`.","commonSituations":"Agent removed conflict markers but could not stage/commit the merge (e.g., validation failures or unresolvable semantic conflicts); repair run aborted between marker cleanup and finalization.","solutions":["Resume with the packet: `:sync repair --packet <packet_path>` to complete the merge.","Finish manually: `git status` to see the open merge, resolve/stage files, then `git commit` to close the merge.","Validate the repo (tests/lint) to confirm the auto-fix produced a sound resolution.","Re-run sync once the merge is finalized."],"exampleFix":"// before\nf sync\n// error: ...merge is still open. Run `:sync repair --packet /tmp/packet-9.json`...\n\n// after\n:sync repair --packet /tmp/packet-9.json\ngit status && git commit   # manual fallback\nf sync","handlingStrategy":"try-catch","validationCode":"import std::path::Path;\nfn merge_open(repo_root: &Path) -> bool {\n    repo_root.join(\".git/MERGE_HEAD\").exists()\n}","typeGuard":null,"tryCatchPattern":"match sync::run(&repo_root, &cmd) {\n    Err(e) if e.to_string().contains(\"merge is still open\") => {\n        if let Some(packet) = extract_packet_path(&e.to_string()) {\n            eprintln!(\"Resume with: :sync repair --packet {}\", packet);\n        } else {\n            eprintln!(\"Finish the merge manually: git status && git add -A && git commit\");\n        }\n    }\n    other => other,\n}","preventionTips":["After auto-fix reports conflicts cleared, immediately verify the merge is closed: `git status` / absence of .git/MERGE_HEAD.","Prefer resuming via the repair packet instead of improvising a second fix pass.","Validate the auto-fix resolution with tests before committing the merge.","Don't kill the sync process between marker cleanup and finalization."],"tags":["sync","merge-conflict","auto-fix","repair-packet","merge-open"],"backgroundTag":"merge-finalization-pending","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}