fix(cli,sdk): warn when squad.agent.md template is missing during upgrade/init#762
fix(cli,sdk): warn when squad.agent.md template is missing during upgrade/init#762
Conversation
e06d1d4 to
ec9a1fb
Compare
There was a problem hiding this comment.
Pull request overview
This PR addresses a silent failure mode where .github/agents/squad.agent.md is not created/refreshed during squad init or squad upgrade when the squad.agent.md.template source is missing, by surfacing explicit warnings and adding regression tests.
Changes:
- CLI: warn in the
upgrade“already current version” path whensquad.agent.md.templateis missing. - SDK: extend
InitResultwith awarningsarray and record a warning when the agent template is missing duringinitSquad. - Tests: add regression coverage for the version-current upgrade refresh and init missing-template warning behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
packages/squad-cli/src/cli/core/upgrade.ts |
Adds a warning when the template is missing in the “already current” upgrade path. |
packages/squad-sdk/src/config/init.ts |
Adds warnings: string[] to InitResult and pushes a warning when the agent template is missing. |
test/cli/upgrade.test.ts |
Adds a regression test ensuring squad.agent.md is refreshed even when already current. |
test/init-scaffolding.test.ts |
Adds tests for happy-path creation and missing-template warning behavior in initSquad. |
.changeset/fix-silent-agent-md-skip.md |
Declares patch releases for CLI and SDK and describes the warning + new result field. |
b42aa95 to
f1481e8
Compare
…rade/init Closes #730 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f1481e8 to
a9a0960
Compare
|
Nice catch Dina. This is a real bug - users silently losing their coordinator instructions is bad. Clean fix, good tests. One small thing: the PR description has a Unicode rendering glitch - Other than that, LGTM. Merging this first. Also did a quick compare with how microsoft/aspire handles similar stuff - they use a PR template with checkboxes but don't have automated validation like this. We're ahead here. |
tamirdresher
left a comment
There was a problem hiding this comment.
Approved. Merge first in the batch.
…rade/init (#762) * fix(cli,sdk): warn when squad.agent.md template is missing during upgrade/init Closes #730 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: make InitResult.warnings optional, improve warning messages Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes #730
What
Why
2 code paths silently skip squad.agent.md creation when the template source is missing. Users lose their coordinator instructions with no warning.
Changes
Working as EECOM (Core Dev)