Repository navigation
fix(ci): resolve dev-to-main promotion merge conflicts and whitespace false-positives - #2152
Conversation
…espace failures squad-promote.yml's dev-to-main merge (-X theirs) was failing with ~76 unresolved conflicts, diagnosed down to concrete, mechanical causes: 1. Git's rename-detection heuristic falsely paired newly-added template/ charter files (new on dev, absent at merge-base) with unrelated files independently deleted on main, producing ~51 spurious conflicts. Fix: add -X no-renames. 2. The remaining ~25 conflicts were genuine delete(main)/modify(dev) conflicts purely on .squad/.ai-team/etc paths that the script's own next step deletes from the release tree regardless of merge outcome. Fix: run that git rm --cached cleanup before the unmerged-conflict check instead of after, so these non-decisions don't block the merge. 3. .github/workflows/squad-preview.yml was hardened independently on main while being deliberately removed on dev as part of the preview/ stable release-channel consolidation (8361274, which folded its logic into squad-release.yml). Fix: accept dev's removal explicitly. Also fixes a second, independent latent blocker that would hit the real v1.0.0 promotion even after the conflicts above are resolved: the 'git diff --cached --check' validation step flags every added line in the repo's ~95 intentionally CRLF-encoded .ts files (see .gitattributes) as 'trailing whitespace', since they're deliberately excluded from eol=lf normalization to avoid a disruptive renormalization commit. Fix: run the check with core.whitespace=cr-at-eol, which still catches real trailing spaces/tabs and blank-line-at-EOF issues. That real issue was present too: test/gh-aw-hosted-e2e.test.ts had one stray trailing blank line at EOF, now removed (141/141 tests still pass for that file via vitest). Validated end-to-end against live origin/main and origin/dev in an isolated clone: merge -X theirs -X no-renames -> git rm cleanup for .squad/.ai-team/etc -> git rm for squad-preview.yml yields 0 unresolved conflicts, 0 forbidden paths remaining, and a clean cr-at-eol whitespace check. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🏗️ Architectural Review
Automated architectural review — informational only. |
🟡 Impact Analysis — PR #2152Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedci-workflows (1 file)
tests (2 files)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ❌ | Branch up to date | dev is 1 commit(s) ahead — rebase recommended |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ❌ | Copilot threads resolved | 1 unresolved Copilot thread(s) — fix and resolve before merging |
| ❌ | CI passing | 11 check(s) still running |
Files Changed (3 files, +35 −11)
| File | +/− |
|---|---|
.github/workflows/squad-promote.yml |
+32 −9 |
test/gh-aw-hosted-e2e.test.ts |
+0 −1 |
test/standalone-release-workflow.test.ts |
+3 −1 |
Total: +35 −11
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
🟡 Changes recommended
The modified merge command breaks an existing regression assertion that must be updated.
1 open finding
What changed in this PR
Unblocks dev-to-main promotion for v1.0.0 by resolving mechanical merge conflicts and avoiding CRLF whitespace false positives.
Changes:
- Disables rename detection and resolves intentional deletions before checking conflicts.
- Allows CRLF endings while retaining whitespace validation.
- Removes a trailing blank line from a test file.
| File | Description |
|---|---|
test/gh-aw-hosted-e2e.test.ts |
Removes a trailing blank line; test logic is unchanged. |
.github/workflows/squad-promote.yml |
Adjusts promotion conflict handling and whitespace validation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # don't exist at the merge-base; without this, git's rename-detection | ||
| # heuristic falsely pairs them with unrelated files independently | ||
| # deleted on main, producing spurious rename/delete conflicts. | ||
| git merge origin/dev --no-commit --no-ff -X theirs -X no-renames || true |
The 'stable promotion' contract test hardcoded the exact pre-fix merge
command string ('git merge origin/dev --no-commit --no-ff -X theirs ||
true'). PR github#2152's fix added '-X no-renames' to that command to
eliminate spurious rename-detection-heuristic conflicts during the
dev-to-main sanitized merge, so the literal substring no longer
matched, failing CI run 37048896755.
Updated the expected string to match the new, intentional command:
'git merge origin/dev --no-commit --no-ff -X theirs -X no-renames ||
true'. Verified via
px vitest run test/standalone-release-workflow.test.ts
(32/32 passed).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Why
squad-promote.yml's dry-run dispatch (run 37045899886) failed with ~76 unresolveddev→mainmerge conflicts, blocking the v1.0.0 promotion (#2150 merged todevat f65ade9).Root causes found (not a human-judgment-required case — all mechanical)
dev(absent at merge-base) with unrelated files independently deleted onmain. Fix: add-X no-renamesto the merge..squad//.ai-team/-type paths that the script's own next step strips from the release tree regardless of merge outcome — not a real decision. Fix: move thatgit rm --cachedcleanup to run before the unresolved-conflict check..github/workflows/squad-preview.ymlwas SHA-pin-hardened independently onmainwhile deliberately removed ondev(8361274 "finalize preview and stable release channels", which folded its logic intosquad-release.yml). Fix: explicitly acceptdev's removal.Also fixes a second, independent latent blocker that would hit the real v1.0.0 promotion even after the conflicts above are resolved:
git diff --cached --checkflags every added line in the repo's ~95 intentionally CRLF-encoded.tsfiles (documented in.gitattributes, kept CRLF to avoid a disruptive renormalization commit) as "trailing whitespace." Fixed by running that check withcore.whitespace=cr-at-eol, which still catches real trailing-space/tab and blank-line-at-EOF issues — and did catch one real one: a stray trailing blank line intest/gh-aw-hosted-e2e.test.ts, now removed (141/141 tests for that file still pass via vitest).Validation
Reproduced and fixed against live
origin/main/origin/devin an isolated clone (not just this worktree, to rule out local working-tree contamination):git merge origin/dev --no-commit --no-ff -X theirs→ 76 unresolved conflicts (matches the real CI failure).-X no-renames: 25 unresolved conflicts (all.squad/**+squad-preview.yml).git rmcleanup →git rmforsquad-preview.yml): 0 unresolved conflicts, 0 forbidden paths remaining.git -c core.whitespace=cr-at-eol diff --cached --check: clean after the test-file fix (confirmed it correctly still flags the real blank-line issue before that fix was applied).Not yet validated: a real GitHub Actions dry-run dispatch of the updated workflow (next step after this merges).
Closes the promotion blocker reported from run 37045899886.