Repository navigation
fix(cli): back up workflows during upgrade - #1709
Merged
bradygaster merged 2 commits intoAug 23, 2026
Merged
bradygaster merged 2 commits into
bradygaster merged 2 commits into
Conversation
Fixes github#1493 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ❌ | CI passing | 9 check(s) still running |
Files Changed (4 files, +73 −0)
| File | +/− |
|---|---|
.changeset/1493-upgrade-workflow-backup.md |
+5 −0 |
index.cjs |
+16 −0 |
packages/squad-cli/src/cli/core/upgrade.ts |
+16 −0 |
test/workflows.test.cjs |
+36 −0 |
Total: +73 −0
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Contributor
🟡 Impact Analysis — PR #1709Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (2 files)
squad-cli (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
Contributor
🏗️ Architectural Review
Automated architectural review — informational only. |
omercangumus
marked this pull request as ready for review
August 13, 2026 21:13
omercangumus
requested review from
bradygaster and
tamirdresher
as code owners
August 13, 2026 21:13
Contributor
|
👋 Friendly nudge — this PR has had no activity for 7 days. What needs attention:
If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows. |
This was referenced Aug 21, 2026
bradygaster
added a commit
that referenced
this pull request
Aug 23, 2026
…1843) `squad upgrade` has backed up locally customized Squad-owned files to `<file>.local-backup` for a while, and #1709 extended that to workflow files, but the behavior was never documented outside .squad/decisions.md. Adds a section to the self-upgrade feature docs covering: - which files are covered (squad.agent.md + managed workflows) - how to restore from a backup - version stamps are stripped before comparison, so a version-only diff does not trigger a spurious backup - only the most recent backup is kept per file - backups are not gitignored - --dry-run previews the squad.agent.md backup only; it returns before workflow files are processed Also cross-references the behavior from the `squad upgrade` row in the CLI reference for discoverability. Docs-only, no changeset required. Co-authored-by: brady gaster <bradygaster@github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2af08ff0-56a4-43e4-903b-3153c0910a13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1493
squad upgraderefreshed existing.github/workflows/*.ymlfiles in place. If a repo had local CI edits, the old workflow content was discarded before the new template/stub was written.Changed both upgrade paths that write workflow files to compare the current file with the next generated content first. If the current file is non-empty and different, upgrade writes
<workflow>.local-backupand logs the backup before refreshing the workflow.Regression coverage:
test/workflows.test.cjsnow modifiessquad-ci.yml, runssquad upgrade, and checks that the pre-upgrade content exists in.local-backupwith a visible log line.Commands run:
node --test test/workflows.test.cjs— failed before the fix with missingsquad-ci.yml.local-backup; passes after the fixnpm run build— passesnpm run lint— passesnpm test— fails locally; same command also fails on unmodifiedupstream/devafter stashing this diff. The base run includes ENOSPC from C: reaching 0 bytes free plus existing Windows/locale/worktree-sensitive failures (gh-aw-quality,watch-capabilities,telemetry, acceptance init in a worktree). Not touching those here.