Primary finding
Merge failure paths assume a conflicted merge state; certain failures (e.g., unrelated histories) produce no changes, leading to misleading "conflicts" PR body
- .github/workflows/sync-upstream.yml:54-61
- .github/workflows/sync-upstream.yml:77-80
The else-branch assumes any merge failure leaves a merge state with conflicted files that can be staged and committed with markers. However, some failures (e.g., `fatal: refusing to merge unrelated histories`) abort without creating a merge state. In that case, `git add -A` has nothing to stage and `git commit` fails (suppressed by `|| true`), resulting in no changes pushed while the PR body still claims conflict markers were committed. This yields misleading PRs and hides the underlying merge failure mode.
Recommendation
Detect merge failure modes where no merge state is produced (e.g., check for `.git/MERGE_HEAD` existence or `git status --porcelain` after the failed merge). If no merge state exists, either stop the workflow with a clear error message or perform an `--allow-unrelated-histories` merge when appropriate. Update the PR body accordingly only when conflict markers were actually committed.