Skip to content

feat(windows): smoke-test script + setup docs (Phase 1)#761

Open
kokevidaurre wants to merge 1 commit intomainfrom
feature/windows-smoke-test
Open

feat(windows): smoke-test script + setup docs (Phase 1)#761
kokevidaurre wants to merge 1 commit intomainfrom
feature/windows-smoke-test

Conversation

@kokevidaurre
Copy link
Copy Markdown
Contributor

Summary

Phase 1 of cross-platform support — validates squads-cli actually works on Windows. Adds a PowerShell smoke test (parity with scripts/e2e-smoke.sh) and a setup guide covering native PowerShell, WSL2, and OpenSSH for remote testing.

Closes #747 (Windows test for v0.3.x).

What's in the PR

  • scripts/windows-smoke-test.ps1 — runs install → init → status → doctor → run --dry-run. Supports -FromTarball (local build) and -Tag <next|latest> flags.
  • docs/windows.md — two install paths (native vs WSL2), SSH setup commands, troubleshooting (long paths, ExecutionPolicy, PATH).

What's NOT in the PR

  • Tier 2 setup (Postgres + Redis + API + Bridge via Docker) — the Bridge and API images aren't public yet. Filed as Phase 2 epic.
  • Bundled docker-compose.yml in templates/ — same reason; would point at images that don't exist.
  • Changes to squads init behaviour — Phase 1 is verification only, no scaffold changes.

Why phased

Tier 2 needs work across 3 repos (agents-squads, squads-api, squads-cli) and adds a "local mode" auth path on the API (today the API requires GCP Secret Manager). That's a multi-PR epic. Phase 1 ships independently and unlocks public announcement of v0.3.1 cross-platform support.

Test plan

  • Manual run on a real Windows machine: pwsh scripts/windows-smoke-test.ps1
  • Run with -Tag next to verify @next channel works end-to-end
  • Run with -FromTarball to validate packaging before next release

Phase 1 of cross-platform support: validate squads-cli works on Windows.

- scripts/windows-smoke-test.ps1: PowerShell parity for e2e-smoke.sh.
  Installs (from npm or local tarball), runs init/status/doctor/run --dry-run.
  Catches Windows-specific path, encoding, and PATH issues that Linux CI misses.
  (Force-added — scripts/ is gitignored, matching e2e-smoke.sh precedent.)

- docs/windows.md: install paths (native PowerShell vs WSL2), OpenSSH setup
  for remote testing, common troubleshooting (long paths, ExecutionPolicy,
  npm prefix), Tier 2 status note.

Phase 2 (separate epic): publish Bridge + API as public Docker images so
Tier 2 (Postgres, Redis, API, Bridge) works for fresh users without
cloning the source tree.

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds Windows setup documentation and a PowerShell smoke test script to ensure cross-platform compatibility. The documentation covers native PowerShell, WSL2, and SSH configurations. Feedback on the smoke test script highlights a destructive global uninstallation in the cleanup phase, a logic error in help output verification using PowerShell operators, and a potential crash when parsing command output if no squads are found.

function Cleanup {
Write-Host ""
Write-Host "▶ Cleaning up..." -ForegroundColor DarkGray
npm uninstall -g squads-cli 2>$null
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This script uninstalls squads-cli globally during the cleanup phase. This is a destructive side effect for users running the smoke test on their local machines, as it will remove any existing installation of the tool. Consider using a temporary local installation path (via npm install --prefix) or providing a warning to the user.

Comment on lines +107 to +109
if ($help -notmatch 'Changelog') {
Write-Host " WARN: Resources footer missing from --help output" -ForegroundColor Yellow
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The -notmatch operator, when applied to an array (the output of squads --help), returns all elements that do not match the pattern. In a boolean context, this will evaluate to true if there are any non-matching lines, which is almost always the case for CLI help output. To correctly detect the absence of the 'Changelog' string, you should check if the -match operator returns no results.

        if (-not ($help -match 'Changelog')) {
            Write-Host "  WARN: Resources footer missing from --help output" -ForegroundColor Yellow
        }


Step "squads run <squad> --dry-run"
$statusOutput = squads status 2>$null
$firstSquad = ($statusOutput | Select-String -Pattern '^\s+(\w+)' | Select-Object -First 1).Matches.Groups[1].Value
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Accessing .Matches.Groups[1].Value directly on the result of Select-String will cause a terminating error if no match is found, as the result will be null. Since $ErrorActionPreference is set to Stop, the script will crash before reaching the if ($firstSquad) check.

        $match = $statusOutput | Select-String -Pattern '^\s+(\w+)' | Select-Object -First 1
        $firstSquad = if ($match) { $match.Matches.Groups[1].Value } else { $null }

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

needs:human — Windows test for v0.3.0 before publish (deadline Apr 18)

2 participants