fix(cli): auto-update config version during upgrade#127
Conversation
97a9dc4 to
5c83204
Compare
🏗️ Flight (Lead) — Architecture Review — PR #127Verdict: ✅ Approve Architecture AssessmentThis PR correctly addresses bugs #84 and #125 by auto-stamping
Scope Assessment
Well-structured fix. Ship it. ✅ |
🧪 FIDO (Quality Owner) — Quality Review — PR #127Verdict: ✅ Approve Test Coverage Assessment9 new tests covering all critical paths:
Quality Gates
Regression Risk
Quality gates passed. Ship it. ✅ |
⚙️ Booster (CI/CD Engineer) — Implementation Review — PR #127Verdict: ✅ Approve Implementation Quality
CI Impact
Risk Assessment
Clean implementation. Approve. ✅ |
🔒 RETRO (Security) — Security Review — PR #127Verdict: ✅ Approve Security Assessment
No security concerns. Approve. ✅ |
🖥️ DSKY (TUI Engineer) — UX Impact Review — PR #127Verdict: ✅ Approve
No UX concerns. Approve. ✅ |
📡 Ralph Status UpdateCompleted all pipeline steps for PR #127:
Branch: No P0 issues found. |
Code Review: PR #127 — fix(cli): auto-update config version during upgradeReviewed: Full diff of the 3 actual changed files (upgrade.ts +68/-66, version.ts +46/-8, upgrade.test.ts +111/-4). Read via upstream PR bradygaster#725 since #127 diff exceeds GitHub's 20K line limit due to stale base. Architecture ✅
Code Quality
Test Coverage ✅ (with gaps)9 new tests — solid coverage of the happy paths:
Missing test cases:
Edge Cases
VerdictWell-scoped fix. The FSStorageProvider → fs migration is clean, the config version stamping addresses a real user pain point (#84, #125), and the test coverage is good. The fork PR needs a rebase to resolve the dirty merge state before it can land. Ship it after:
|
🔧 EECOM (Core Dev) — Review — PR #127Verdict: ✅ Approve Implementation ReviewAs primary owner of src/cli/, this is a clean fix. FSStorageProvider to node:fs migration is correct. copyDirRecursive to fs.cpSync leverages Node 22+ native API. upgradeConfigVersion() called from both upgrade paths. force: true for templates, force: false for skills — correct copy semantics. Clean mechanical refactor. Approve. ✅ |
🕵️ CAPCOM (SDK Expert) — Review — PR #127Verdict: ✅ Approve SDK Integration ReviewConfig discovery uses hardcoded candidates (squad.config.ts, squad.config.js) matching SDK resolution order. No new SDK API surface changes. Version stamping is CLI-only — SDK stays clean. No SDK concerns. Approve. ✅ |
👩💻 CONTROL (TypeScript Engineer) — Review — PR #127Verdict: ✅ Approve Type System ReviewRegex captures properly typed with m flag for multiline. readConfigVersion and discoverSquadConfig return string or null — proper nullable handling. No any types introduced, strict mode compliant. Type safety maintained. Approve. ✅ |
🧠 Procedures (Prompt Engineer) — Review — PR #127Verdict: ✅ Approve Agent Impact ReviewNo prompt/charter changes — this is CLI plumbing. Config version stamping ensures agent tools see correct version metadata. No prompt concerns. Approve. ✅ |
📣 PAO (DevRel) — Review — PR #127Verdict: ✅ Approve Documentation Impactsquad upgrade now stamps config — should be mentioned in upgrade docs/changelog. No README changes needed. Changeset recommended for release notes. Approve with changelog note. ✅ |
⚡ GNC (Node.js Runtime) — Review — PR #127Verdict: ✅ Approve Runtime Reviewfs.cpSync is stable in Node 22+ — correct for engines.node >= 22.5.0. readFileSync/writeFileSync appropriate for CLI upgrade command (not hot path). Regex execution on config files is negligible. No runtime concerns. Approve. ✅ |
📦 Network (Distribution) — Review — PR #127Verdict: ✅ Approve Distribution ReviewNo packaging changes. Config stamping is runtime-only. No npm publish impact. No distribution concerns. Approve. ✅ |
🎨 INCO (CLI UX) — Review — PR #127Verdict: ✅ Approve UX Reviewsquad upgrade now prints config version stamp feedback — clear UX. Silent skip when no config file exists — no noise. No UX concerns. Approve. ✅ |
🔌 GUIDO (VS Code Extension) — Review — PR #127Verdict: ✅ Approve VS Code Integration ReviewNo VS Code Extension API changes. Config updates are file-level — VS Code picks up changes via file watcher. No integration concerns. Approve. ✅ |
🔭 Telemetry (Observability) — Review — PR #127Verdict: ✅ Approve Observability ReviewNo telemetry hooks needed — upgrade is a one-shot command. Console output for config stamp is appropriate diagnostics. No observability concerns. Approve. ✅ |
🖥️ VOX (REPL) — Review — PR #127Verdict: ✅ Approve REPL Impact ReviewNo REPL/shell changes — config stamping runs during squad upgrade only. No streaming affected. No REPL concerns. Approve. ✅ |
🧪 Sims (E2E Testing) — Review — PR #127Verdict: ✅ Approve E2E Test Assessment9 unit tests cover all critical paths. E2E coverage for squad upgrade config stamping is recommended as future work. No acceptance test regressions expected. Approve with note on E2E coverage. ✅ |
📖 Handbook (SDK Usability) — Review — PR #127Verdict: ✅ Approve API Surface ReviewdiscoverSquadConfig, stampConfigVersion, readConfigVersion are well-named single-responsibility utilities. Return types are clean nullable strings. No usability concerns. Approve. ✅ |
🚢 Surgeon (Release Manager) — Review — PR #127Verdict: ✅ Approve Release ImpactCloses issues 84 and 125 — two version-related bugs fixed. Split from PR 119 (61 files to 3 files) — correct scoping. Changeset entry recommended. Approve — ready for release. ✅ |
🛰️ Ralph — Squad Team ReviewPR #127: fix(cli): auto-update config version during upgrade (Closes P0 #84)Scope: 3 files, ~225 additions, 78 deletions
Architecture ✅
Code Quality ✅
eadConfigVersion() returns Test Coverage ✅ (9 new tests)
eadConfigVersion reads and returns null correctly
Edge Cases 🟡
Merge Readiness
Ralph — Work Monitor | PR Lifecycle Pipeline Round 1 |
|
🚦 Team review complete. Waiting for Dina's review. Add gh pr edit 127 --repo diberry/squad --remove-label "squad:pr-reviewed" --add-label "squad:pr-dina-approved" |
9b73ffe to
200a668
Compare
|
🤖 Ralph — Pipeline Status Stage: \squad:pr-needs-preparation\ → \squad:pr-needs-review\ ✅ Preparation checklist:
Next: Full team + Copilot review required before advancing to \squad:pr-reviewed. |
200a668 to
41998da
Compare
Closes #84 - Added discoverSquadConfig(), stampConfigVersion(), and readConfigVersion() to version.ts - Both upgrade paths (full upgrade + already-current refresh) now discover and stamp squad.config.ts / squad.config.js if present - Preserves quote style (single or double) in the version field - Skips gracefully when no config file exists (markdown-only projects) - 9 new tests covering all upgrade and edge-case scenarios Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9797545 to
e42fe8e
Compare
🤖 Ralph — Preparation CompleteStage: \squad:pr-needs-preparation\ → \squad:pr-needs-review\ Checks completed:
Next round: Team + Copilot code review at \squad:pr-needs-review\ stage. |
🤖 Ralph Pipeline — Preparation CompleteStage: Preparation checklist:
Next: Team + Copilot code review |
Closes #84
Closes #125
Problem
\squad upgrade\ stamps the version in \squad.agent.md\ but never touches \squad.config.ts. Users who use SDK-first config (\squad init --sdk) find their config version stuck at \1.0.0\ after every upgrade.
Fix
eadConfigVersion()\ to \�ersion.ts\
Tests (9 new)
eadConfigVersion\ reads/returns null correctly
Split from PR #119
This PR contains only the 3 bug-fix files from PR #119 (which had ~61 changed files):
The remaining ~58 files (skill templates, .squad state, consult tests, workflow templates) should go in a separate PR.