squad upgrade installs Squad's own CI/release workflows that init deliberately skips (regression of #201)

Open Beginner friendly
#2,527 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
77/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, typescript
Domain
cli, devtools

Research direction

Start in packages/squad-cli/src/cli/core/upgrade.ts at collectSquadOwnedCandidates and compare its workflow selection with the FRAMEWORK_WORKFLOWS allowlist in packages/squad-sdk/src/config/init.ts. Reproduce with the init and upgrade --dry-run commands in the issue. Done means upgrade refreshes installed workflows but does not plan creation of other Squad workflows; check both existing and absent workflow cases.

Written by the indexing model from the issue text.

Description

bug

Version: CLI built from release/prepare-2.0.0-preview.5 @ 38d45d02 (package version 2.0.0-preview.6).

What happens

squad init installs only the four framework workflows (#201). Running squad upgrade right after, with nothing changed in between, adds seven more workflows. These are Squad's own product CI/CD, built for Squad's dev/preview/main/insider branch model.

D=$(mktemp -d); cd "$D"; git init -q
node <squad-cli>/dist/cli-entry.js init --roles --client copilot,claude
ls -1 .github/workflows
#   squad-heartbeat.yml  squad-issue-assign.yml  squad-triage.yml  sync-squad-labels.yml
node <squad-cli>/dist/cli-entry.js upgrade --dry-run | grep workflows
#   create    .github/workflows/squad-ci.yml
#   create    .github/workflows/squad-docs.yml
#   create    .github/workflows/squad-insider-release.yml
#   create    .github/workflows/squad-label-enforce.yml
#   create    .github/workflows/squad-preview.yml
#   create    .github/workflows/squad-promote.yml
#   create    .github/workflows/squad-release.yml

A real squad upgrade creates all seven files. For a non-npm project, the five in PROJECT_TYPE_SENSITIVE_WORKFLOWS become TODO stubs that still trigger on pushes and PRs to dev/preview/main/insider. squad-promote.yml and squad-label-enforce.yml are copied verbatim.

Expected

upgrade installs and refreshes the same workflow set that init installs (FRAMEWORK_WORKFLOWS). It updates any other squad-*.yml only if it's already present, because the user opted in. It never creates one.

Source

  • packages/squad-sdk/src/config/init.ts, line 773: the FRAMEWORK_WORKFLOWS allowlist that init uses (the #201 fix).
  • packages/squad-cli/src/cli/core/upgrade.ts, collectSquadOwnedCandidates (line 606). Line 623 onward iterates every *.yml in templates/workflows/ and plans each as a candidate, with no FRAMEWORK_WORKFLOWS filter.
  • packages/squad-cli/src/cli/core/templates.ts, lines ~350–415: TEMPLATE_MANIFEST lists all 11 workflows with overwriteOnUpgrade: true.
  • packages/squad-cli/src/cli/core/workflows.ts, line 8: PROJECT_TYPE_SENSITIVE_WORKFLOWS.

Related: #201 (original init fix), #2047 (upgrade refreshing templates), #2361.

🤖 Generated with Claude Code

Dominant language
TypeScript
Stars
3.4k
Forks
516
Avg merge
1d 15h
Merged PRs (30d)
116

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/squad

All issues in github/squad

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.