[bug] mcp inject --dry-run can still save a config migration
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli
Research direction
Start at src/mcp-cmd.ts:97 and inspect how mcp inject passes options to autoDetectInit; confirm the dry-run flag reaches the loader. Then update the LOAD_ONLY_COMMANDS regression tests using the fixture from #866, and verify that mcp inject --dry-run leaves config.yaml unchanged while the tests pass.
Written by the indexing model from the issue text.
Description
Description
teamai mcp inject --dry-run can still write config: it loads the scope without { dryRun }, so a pending legacy role migration (or a partition rename, or a self-mode bootstrap) is saved even though nothing should change.
mcpInject(options) src/mcp-cmd.ts:97
- autoDetectInit() loads with LoadOptions = {} → migrations persist
+ autoDetectInit(undefined, { dryRun: options.dryRun })
reconcileMcpForConfig(…, { dryRun }) already honours it
#866 threaded { dryRun } through the loaders pull, push, status and list use; mcp inject was left out. mcp list (:27) is read-only and could load with dryRun: true unconditionally, as #866 does for status and list.
Expected: mcp inject --dry-run writes nothing, config included.
Proposed fix: the diff above, plus a ['mcp inject --dry-run', …] row in the LOAD_ONLY_COMMANDS table the #866 tests use, so the regression is pinned.
Reproduction
- A user scope whose
config.yamlis due for the legacy role migration (the fixture #866's tests use). teamai mcp inject --dry-run.config.yamlhas been rewritten.
Environment
- OS: macOS 27.0
- Node.js: v24.21.0
- teamai:
mainat b3b3a0b0 - Provider: any
- AI tool(s): any
Logs
Where it was found
Found while merging main (#866) into #880, which threads { dryRun } through the env commands and env exec the same way (with tests). Evidence here is from reading the code on main; not reproduced with the CLI.
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 376
- Avg merge
- 13h 21m
- Merged PRs (30d)
- 288
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Tencent/teamai-cli
-
bug help wanted
Difficulty 4/5 3-5 days Newbie friendliness 65/100
Tencent/teamai-cli#894 · 1 comment ·
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 74/100
Tencent/teamai-cli#892 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Tencent/teamai-cli#884 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Tencent/teamai-cli#883 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Tencent/teamai-cli#882 ·
Maintainers usually reply within 1 day
All issues in Tencent/teamai-cli
Similar issues
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mermaid-js/mermaid-live-editor#2053 ·
Maintainers usually reply within 1 day
-
factory
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jessepollak/home#1455 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
lingdojo/kana-dojo#31227 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
appandflow/stim#1838 ·
Maintainers usually reply within 1 day