Repository navigation
Closed
Labels
go:needs-researchNeeds investigationNeeds investigationrelease:nextTargeted for next releaseTargeted for next releasesquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a member
Description
squad upgrade reports success but the version stamp never persists. Running upgrade repeatedly always shows 0.0.0-source → 0.8.18 — it never reaches "Already up to date."
Repro
squad upgrade # says "0.0.0-source → 0.8.18"
squad upgrade # says "0.0.0-source → 0.8.18" again (should say "Already up to date")
grep "version:" .github/agents/squad.agent.md # still shows 0.0.0-source
Root Cause
In upgrade.js, stampVersion() correctly writes the version into squad.agent.md (line ~342), but the TEMPLATE_MANIFEST loop (line ~347) includes squad.agent.md with overwriteOnUpgrade: true, which copies the unstamped template back over the stamped file.
In templates.js:
export const TEMPLATE_MANIFEST = [
{
source: 'squad.agent.md',
destination: '../.github/agents/squad.agent.md',
overwriteOnUpgrade: true, // <-- this causes the overwrite
},
// ...
];In upgrade.js:
// Step 1: Copy + stamp (works correctly)
fs.copyFileSync(agentSrc, agentDest);
stampVersion(agentDest, cliVersion);
// Step 2: Template manifest loop (overwrites the stamp)
const filesToUpgrade = TEMPLATE_MANIFEST.filter(f => f.overwriteOnUpgrade);
for (const file of filesToUpgrade) {
fs.copyFileSync(srcPath, destPath); // squad.agent.md gets overwritten here
}Impact
- Coordinator greets with "Squad v0.0.0-source" instead of the real version
isAlreadyCurrentcheck never passes (compares0.0.0-sourcevs0.8.18), so it re-copies all 30 files on every run- Related: Version indicator missing from coordinator greeting after install/upgrade #128 (similar stamping fix, but this race condition was not caught)
Fix (verified locally)
Exclude squad.agent.md from the manifest loop — it is already handled explicitly with stampVersion():
const filesToUpgrade = TEMPLATE_MANIFEST.filter(f => f.overwriteOnUpgrade && f.source !== 'squad.agent.md');After this one-line change, squad upgrade correctly stamps 0.8.18 and subsequent runs report "Already up to date (v0.8.18)."
Environment
squad --version: 0.8.18- Node.js: v25.7.0
- npm: 11.10.1
- OS: Linux
- Install method:
npm install -g @bradygaster/squad-cli@0.8.18
Reacted by andrew-flatters-bliss
Metadata
Metadata
Assignees
Labels
go:needs-researchNeeds investigationNeeds investigationrelease:nextTargeted for next releaseTargeted for next releasesquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a member
Activity
feat: Wave 3 — docs migration, site engine, 5 guides, mechanical upda…
dnoriegagoodwin commentedon Mar 5, 2026
Really only relevant for folks migrating an old .squad folder built in like v0.3.0 heh
github-actions commentedon Mar 5, 2026
🏗️ Squad Triage — Keaton (Lead)
Issue: #195 — bug: squad upgrade version stamp overwritten by template manifest loop
Assigned to: Hockney (Tester)
Reason: Issue relates to testing/quality work
@copilot evaluation: 🔴 Not suitable — issue involves work outside the coding agent's capability profile.
Team roster:
squad:keatonsquad:verbalsquad:fenstersquad:hockneysquad:mcmanussquad:kujansquad:ediesquad:kobayashisquad:fortiersquad:rabinsquad:baersquad:redfootsquad:strauszsquad:saulsquad:kovashsquad:marquezsquad:cherittosquad:breedansquad:natesquad:waingrosquad:ralphsquad:copilotgithub-actions commentedon Mar 5, 2026
📋 Assigned to Fenster (Core Dev)
Issue: #195 — bug: squad upgrade version stamp overwritten by template manifest loop
Fenster will pick this up in the next Copilot session.
fix: preserve version stamp during squad upgrade (#195)
docs: update fenster history and team decision for #195
feat: contributors page + version stamp fix for v0.8.21 release
docs(ai-team): Session logging and decision merging
docs: update fenster history and team decision for #195
Merge pull request #212 from bradygaster/squad/195-fix-version-stamp-…
bradygaster commentedon Mar 7, 2026
✅ Fixed by PR #221 (merged commit 0315468) — test suite regressions resolved.
Closed as part of v0.8.21 release wave cleanup.
bradygaster commentedon Mar 7, 2026
Brilliant catch, @dnoriegagoodwin! The version stamping race condition—where the template loop overwrites the stamped version—is exactly the kind of subtle bug that's hard to spot. Your one-line fix is perfect. Thanks for the investigation and verification! 🔧
— McManus 📝, on behalf of the Squad