fix(ci): remove stale nested SDK from lockfile#414
Merged
bradygaster merged 8 commits intodevfrom Mar 15, 2026
Merged
Conversation
The prepare scripts in root and SDK package.json were causing a race condition in CI where the SDK build could be incomplete when the CLI tried to build. This resulted in TypeScript errors about missing roles exports. The prepare script runs during npm ci, which conflicts with npm workspaces' parallel installation. The explicit build step in the CI workflow (npm run build) is sufficient and builds in the correct order (SDK first, then CLI). This fix ensures: - SDK builds completely before CLI starts building - No circular dependency issues during npm ci - CI build order matches local build order Closes #XXX Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Root cause: npm workspaces on Windows copies dist/ folders during npm ci. If dist/ exists from a previous build but is incomplete, the workspace copy is stale and missing new modules like roles/. Changes: 1. Remove prepare scripts from root and SDK package.json to prevent premature builds during npm ci 2. Add 'Clean dist folders' step in CI workflow before npm ci to ensure fresh workspace copies 3. Use wildcard (*) for CLI's SDK dependency to ensure workspace resolution regardless of version bumps This ensures: - SDK builds from scratch with all modules - CLI sees the complete SDK dist including roles/ - No race conditions between install and build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The issue was that npm ci creates workspace links before building, so the CLI's node_modules SDK link pointed to an empty dist folder. New build sequence: 1. Clean dist folders 2. Install SDK dependencies only 3. Build SDK (creates dist with roles/) 4. Install CLI dependencies (creates workspace link to built SDK) 5. Build CLI (now sees complete SDK including roles/) This ensures the CLI always sees a fully-built SDK dist.
After building SDK, remove CLI's node_modules SDK copy and reinstall to ensure the workspace link/copy includes the freshly built dist with all modules including roles/.
The package-lock.json had a nested entry at packages/squad-cli/node_modules/@bradygaster/squad-sdk that resolved to the npm registry (v0.8.25) instead of using the workspace symlink. This stale copy predated the roles module addition, causing all CI builds to fail with 'Module has no exported member listRoles' since the roles feature was merged. Removing the nested entry lets npm ci properly resolve the SDK through the root workspace link (node_modules/@bradygaster/squad-sdk -> packages/squad-sdk), which includes the roles module. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tamirdresher
pushed a commit
to tamirdresher/squad
that referenced
this pull request
Mar 16, 2026
…bradygaster#414) * chore(squad): Phase 2 launch — thinking feedback, P0 bugs, dual telemetry Phase 1 complete: 5 issues closed (bradygaster#325, bradygaster#326, bradygaster#327, bradygaster#328, bradygaster#329), 5 PRs merged. Phase 2 launched with Cheritto (thinking feedback), Hockney (P0 bugs), Saul (dual telemetry). Decision inbox merged and archived. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(squad): Phase 2 Wave 1 merged, Wave 2 launched Session: 2026-02-23T2145-phase2-wave2 Phase 2 Wave 1 complete (PRs bradygaster#351, bradygaster#352, bradygaster#353 merged). Wave 2 launched: Cheritto on ghost response detection (bradygaster#332), Hockney on error hardening (bradygaster#334). Changes: - Session log created: 2026-02-23T2145-phase2-wave2.md - Merged 3 inbox decisions (Cheritto, Hockney, Saul) - Deleted inbox files post-merge Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(squad): Epic bradygaster#323 complete — all phases shipped 🎉 All 3 phases delivered: - Phase 1 (Testing Wave): 6 issues closed - Phase 2 (Improvement): 6 issues closed - Phase 3 (Breathtaking): 7 issues closed - 17 PRs merged, 19 issues closed total Session log: 2026-02-23T2320-epic-complete.md Decisions merged from inbox: P2 UX Polish, first-run wow moment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * hostile QA: end-to-end quality assessment — 10 findings, 4 HIGH severity Candid assessment requested by Brady. Traced every code path in cli-entry.ts, shell/index.ts, shell/commands.ts, App.tsx, coordinator.ts, spawn.ts, and the SDK adapter client. Key findings: - Dead sessions never evicted from agentSessions Map after connection drop - No React ErrorBoundary — any render throw kills the shell - Nasty-inputs corpus (95 strings) is never imported by any test - No SIGTERM handler in interactive shell - MemoryManager exported but never instantiated (dead code) - Single streaming content slot clobbers multi-agent output - User input silently dropped during processing (no type-ahead buffer) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(squad): quality review findings — 7 issues filed Quality audit complete: 5 agents assessed CLI across testing, coverage, stability, accessibility, UX. Results: 4 P0 blockers (bradygaster#365–bradygaster#368), 3 P1 items (bradygaster#369–bradygaster#371). Blocking: Waingro dead sessions, ErrorBoundary, dropped input; Marquez help text consistency. Changes: - Logged session summary to .squad/log/2026-02-24T0205-quality-review-complete.md - Updated .squad/identity/now.md with quality review findings and new issue numbers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(squad): merge decision — Marquez UX audit findings Quality assessment merged from inbox (Grade B): 11 improvements (3 P0, 4 P1, 4 P2). help text, stub commands, vocabulary, separators, roster. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(squad): test sprint launch Session: 2026-02-24T0210-test-sprint Changes: - Logged test sprint: 5 agents, 7+ issues - Branches: P0 fixes, stale tests, E2E, hostile/SDK, A11y Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: product love — first 10 seconds that make you want the next 10 minutes Walked through the full first-time user experience and fixed every moment that wasn't delightful: **\/clear\ actually clears (bradygaster#400)** - Was sending raw ANSI escape as message content (no-op in Ink) - Now resets message array to empty — genuine fresh slate - Added \clear?: boolean\ to CommandResult interface **Natural language routing revealed (bradygaster#402)** - The coordinator auto-routing is the WOW feature — was completely hidden - Welcome banner hints: 'Just type · @agent to direct · /help · Ctrl+C exit' - /help explains: 'Just type naturally — the coordinator routes it' - First-run prompt: adds 'Or just type naturally' hint - Input placeholder: 'Type anything or @agent...' **First-run hint layout (bradygaster#404)** - Was horizontal Box that broke on narrow terminals - Now vertical flexDirection=column with breathing room **Exit message consistency (bradygaster#405)** - Replaced wave emoji with diamond mark (matches P2 emoji removal) **Welcome roster wrapping (bradygaster#407)** - Agents were one dense string that wrapped mid-name - Now individual Ink elements with flex-wrap for clean word-boundary wrapping Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every CI build has been failing since ~March 13 with TypeScript errors.
Root Cause
The package-lock.json had a nested entry at packages/squad-cli/node_modules/@bradygaster/squad-sdk that resolved to the npm registry (v0.8.25) instead of using the workspace symlink. This stale copy predated the roles module addition.
Fix
Removed the stale nested entry. Now npm ci properly resolves through the root workspace link.
Unblocks