Skip to content

feat(install): host-neutral install with --print-config (G5) - #120

Open
ManSio wants to merge 5 commits into
mainfrom
goal2-g5
Open

ManSio wants to merge 5 commits into
mainfrom
goal2-g5

Conversation

@ManSio

@ManSio ManSio commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

G5 — универсальная установка (любой хост)

Развязывает «сервер» и «хост-адаптер». Стек: этот PR → goal2-g6 (#G6) → goal2-g7 (#G7).

Что делает

  • install.py v3.2: MSCODEBASE_INSTALL_ROOT + resolve_install_root(); исторический
    Zed-путь остаётся только дефолтом, содержимое — обычный venv.
  • Zed-адаптер больше не импортируется на верхнем уровне: step_zed/step_zedcfg
    делают ленивый импорт, отказ адаптера не роняет установку, --no-zed — нейтральный режим.
  • install.py --print-config --client {generic,opencode,zed,claude-code,cursor} печатает
    один JSON: <install-root>/venv/Scripts/mscodebase-mcp.exe -u -m src.main,
    PYTHONPATH, PROJECT_PATH, PYTHONUTF8=1. Entry point взят из
    pyproject.toml [project.scripts] mscodebase-mcp = src.main:main.
  • adapters/clients/snippets.py — единственный источник форм конвертов. OpenCode V2 —
    mcp.servers.<name> (сверено с https://opencode.ai/docs/mcp-servers).
  • scripts/verify_client_snippets.py запускает каждый напечатанный сниппет и делает
    MCP initialize + tools/list; в CI это отдельный шаг на чистом раннере.
  • docs/{en,ru,zh}/CLIENTS.md переписаны: секция на клиента, Zed не первый и не
    обязательный; README quick start; adapters/clients/*.

Доказательства

generic      PASS: server=MSCodebase Intelligence Server tools=17
opencode     PASS: server=MSCodebase Intelligence Server tools=17
zed          PASS: server=MSCodebase Intelligence Server tools=17
claude-code  PASS: server=MSCodebase Intelligence Server tools=17
cursor       PASS: server=MSCodebase Intelligence Server tools=17
  • python install.py --print-config --client opencode → {"mcp": {"servers": {...}}}
  • tests/test_install_cli.py (8 тестов, включая реальный initialize из сниппета)
  • Мутационная проба: PYTHONPATH → PYTHONPATH_XX даёт 5 красных.
  • CI: шаг Client snippets cold start (G5) на ubuntu и windows.

Не проверено

  • Полный холодный старт вручную на новой ОС не выполнялся: сниппеты запускаются на
    CI-раннерах и локально в чистом каталоге.

CI (head ea09277, run 43101353744): 7/7 jobs success — test (ubuntu + windows),
clean-state, manifest-parity, secret-scan, docker-build, transport-equiv-e2e.
Локально: pytest tests/test_install_cli.py → 8 passed; scripts/verify_client_snippets.py
→ 5/5 PASS (tools=17).


Clean-room install found a real bug (fixed here)

install.py --yes never ran a single step: range(0 if auto_yes else …) produced an
empty loop and the for/else branch marked every step failed without calling it
(latent since v3.0; all non-interactive installs were empty).

  • fix: range(1 if auto_yes else …) in install.py::main;
  • regression test test_auto_yes_runs_each_step_once (red before the fix: the fake
    step was never called);
  • after the fix, a clean root gives install rc=0, 12 ok / 0 skipped / 0 failed.

Clean-room client proof for two non-Zed/OpenCode hosts was executed on the stacked tip
(text-first lives in #121), see #122.


Final heads (after the base refresh and the clean-room fixes)

PR head CI
#120 G5 6010443 run 43107170075 → 7/7 success
#121 G6 dc1a94e run 43107312275 → 7/7 success
#122 G7 f4cb766 run 43108288221 → 7/7 success

Lines about earlier heads (ea09277, f814ba9, 6a346bb) describe previous
snapshots; the table above is the current state.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant