[DO NOT MERGE] fix(loop): replace obsolete --message flag with -p in gh copilot invocations (wait)#894
[DO NOT MERGE] fix(loop): replace obsolete --message flag with -p in gh copilot invocations (wait)#894
Conversation
🟡 Impact Analysis — PR #894Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
squad-cli (9 files)
tests (3 files)
|
There was a problem hiding this comment.
Pull request overview
Updates Squad CLI’s Copilot spawning to match the current GitHub CLI Copilot extension by replacing the obsolete --message flag with -p, and centralizes command/arg construction to avoid future drift across loop/watch/capabilities.
Changes:
- Added
buildCopilotArgs()helper to generate{ cmd, args }forexecFileand enforce-pconsistently. - Replaced per-file inline Copilot arg builders in
loop,watch, and multiple watch capabilities with the centralized helper. - Added unit tests for the helper and updated watch execute tests to expect
-p; included a changeset for@bradygaster/squad-cli.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
packages/squad-cli/src/cli/commands/copilot-args.ts |
New centralized helper for gh copilot spawn args (uses -p). |
packages/squad-cli/src/cli/commands/loop.ts |
Loop now delegates agent command construction to buildCopilotArgs(). |
packages/squad-cli/src/cli/commands/watch/index.ts |
Watch command builder now delegates to buildCopilotArgs(). |
packages/squad-cli/src/cli/commands/watch/capabilities/execute.ts |
Execute capability now uses centralized Copilot arg builder. |
packages/squad-cli/src/cli/commands/watch/capabilities/decision-hygiene.ts |
Delegates Copilot spawn args to centralized helper. |
packages/squad-cli/src/cli/commands/watch/capabilities/monitor-email.ts |
Delegates Copilot spawn args to centralized helper. |
packages/squad-cli/src/cli/commands/watch/capabilities/monitor-teams.ts |
Delegates Copilot spawn args to centralized helper. |
packages/squad-cli/src/cli/commands/watch/capabilities/retro.ts |
Delegates Copilot spawn args to centralized helper. |
packages/squad-cli/src/cli/commands/watch/capabilities/wave-dispatch.ts |
Delegates Copilot spawn args to centralized helper. |
test/cli/copilot-args.test.ts |
New unit tests validating buildCopilotArgs() behavior and edge cases. |
test/cli/watch-execute.test.ts |
Updated expectations to require -p instead of --message. |
.changeset/fix-copilot-message-flag.md |
Patch changeset documenting the CLI behavior change. |
53cfce8 to
82d7bf0
Compare
|
Is this introducing issues that 916 is meant to fix? |
12f331e to
19cd9ff
Compare
🔍 Squad Review — Kaylee (Engineering)
Verdict: ❌ 1 blocker to fix — CI est job is failing. Mergeable state is �locked. Review by Squad AI team (Kaylee — Engineering) · requested by Dina Berry |
diberry
left a comment
There was a problem hiding this comment.
required: Branch is behind dev — needs rebase before merge.
suggestion: No minimum gh copilot version documented. Users on older versions will hit a cryptic failure with -p. A note in CHANGELOG or README would protect them.
suggestion: loop.test.ts has zero assertions that buildLoopAgentCommand produces -p. The centralized copilot-args.test.ts covers the helper well, but an integration-level check in loop.test.ts would be good.
nit: buildLoopAgentCommand is now a 1-line wrapper — call site could import buildCopilotArgs directly.
19cd9ff to
18a4e42
Compare
Summary
Replaces the obsolete --message\ flag with -p\ in all \gh copilot\ invocations. The current GitHub CLI Copilot extension uses -p\ (for prompt), not --message, causing loop/watch/capabilities to fail immediately.
Changes
Why centralize?
When the CLI surface changes again (it's happened before), we fix one file instead of eight. The helper also handles edge cases (whitespace-only agentCmd/copilotFlags) that the duplicated code didn't.
Working as GNC (Node.js Runtime)
Closes #874