bug(cli): standalone doctor checks unrelated application node_modules instead of active runtime
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- node.js, typescript
Rechercherichtung
Start with packages/squad-cli/src/cli/commands/doctor.ts, especially checkVscodeJsonrpcExports(cwd) and checkCopilotSdkSessionPatch(cwd), then trace how the invoked CLI resolves its runtime dependencies. Add coverage for a standalone installation with healthy dependencies and an unrelated empty application node_modules, plus a genuinely broken runtime. Done means doctor reports the runtime actually in use and retains warnings for real import failures.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
Windows standalone Squad 2.0.0-preview.2 reports missing dependency/patch warnings based on the application's node_modules, even when the standalone installation's actual runtime dependencies import successfully.
An unrelated application's node_modules changes the advice to "run npm install or check dependencies". Following that advice in the application would not repair the runtime Squad is actually using.
This is distinct from the missing/broken package cases in #449 and #1190: both dependencies are healthy in the standalone runtime here. It also reproduces the confusing installed-user warning pattern previously reported in #565.
Synthetic reproduction
- Use the Windows standalone
2.0.0-preview.2distribution. - Create a synthetic application directory with an empty
node_modulesdirectory and a minimal.squad/team.md. Do not install Squad into that application. - Call the installed CLI's exported
runDoctor(syntheticApplicationDirectory); inspect these two result records:
[
{
"name": "vscode-jsonrpc exports field",
"status": "warn",
"message": "not found in node_modules — run npm install or check dependencies"
},
{
"name": "copilot-sdk session.js ESM patch",
"status": "warn",
"message": "not found in node_modules — run npm install or check dependencies"
}
]
- Separately import
vscode-jsonrpc/noderesolved relative to the standalone application'spackage.json, and import that installation's@github/copilot-sdk/dist/session.js.
Observed: both imports succeed. The same warning pair is observable from native standalone squad doctor in an application with unrelated dependencies.
The synthetic probe uses no real team files, credentials, or application data.
Source evidence
packages/squad-cli/src/cli/commands/doctor.ts:
checkVscodeJsonrpcExports(cwd)checks only<cwd>/node_modules/...and<cwd>/packages/squad-cli/node_modules/....checkCopilotSdkSessionPatch(cwd)has the same scope.- An existing
<cwd>/node_modulesis treated as a Squad development context, although it can belong entirely to the host application.
These lookups and warning messages are also present in current upstream dev at the time of this report.
Expected
Check or clearly identify the runtime actually used by the invoked Squad installation. Distinguish:
- application-local Squad dependencies genuinely in use;
- standalone/global runtime dependencies;
- an unrelated application dependency directory;
- an unverified runtime.
Do not recommend installing or patching application dependencies solely because the standalone runtime is outside the current checkout. Retain real failures for malformed exports or actual runtime import errors; an unknown lookup should not silently become success.
Suggested coverage: standalone/global installation with healthy dependencies plus an unrelated application's empty node_modules, and a separate genuinely broken runtime case.
Local handling
The warning scope and successful standalone imports are recorded separately. No application dependency was installed and no vendor source or export map was patched to silence diagnostics.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.4k
- Forks
- 516
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 116
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/squad
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
vercel-labs/ui#809 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bot:ai-assisted component:platform-js status:untriaged
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 74/100
midnightntwrk/platform-js#38 ·
-
[bug] Second false positive on high-cost plugin alert: detection only compares patch entry id, community plugin dsh-auto | [bug] 高成本插件告警第二次误报:检测只比对 patch 条目 id,社区插件 dsh-auto-review 被认成 @deepseek-ai/dsh-experimental-auto-reviewEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
ranxianglei/billion-context#7068 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
mybigday/whisper.rn#348 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
six-group/six-webcomponents#600 ·