Skip to content

docs: docs=code guards and audit of canonical pages (G7) - #122

Open
ManSio wants to merge 5 commits into
feat/g6-data-hygienefrom
goal2-g7
Open

ManSio wants to merge 5 commits into
feat/g6-data-hygienefrom
goal2-g7

Conversation

@ManSio

@ManSio ManSio commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

G7 — документация = код

Стек: goal2-g5 (#G5) → goal2-g6 (#G6) → этот PR. Diff относительно goal2-g6.

Правило и механика

  • AGENTS.md §8: каждая изменённая строка документации ссылается на факт кода
    (файл:символ), правка «только цифра» без ссылки отклоняется до коммита.
  • .github/pull_request_template.md: таблица «изменённая строка docs → файл:символ»;
    колонка Entry point в «What works today» обязательна (в RU README переименована).
  • scripts/check_docs_vs_installer.py: каждый install.py --flag и --client X из
    README/docs существует в install.py/snippets.py; пустой корпус = exit 2.
    162 → 159 ссылок, 0 проблем. На дореформенном docs/en/INSTALL.md из main
    печатает ✗ unknown installer flag --uninstall (воспроизведение исходного дефекта).
  • scripts/check_docs_vs_config.py: каждая переменная из таблиц
    docs/en/CONFIGURATION.md существует в коде (src/, scripts/, .opencode/,
    .githooks/, .env.example). 66 переменных, 0 проблем; ловит исторический
    MSCODEBASE_MAX_FILE_SIZE_MB (код читает MAX_FILE_SIZE_MB,
    src/config/settings.py:425).

Аудит канонических страниц (2026-11-12)

Страница Проверено Код
ARCHITECTURE.md точка входа/DI, раскладка артефактов, file_guard, Searcher, профиль 17/69 src/main.py::main, src/mcp/server_factory.py::create_mcp_server (156), src/core/artifact_paths.py::*, src/core/indexing/file_guard.py, src/core/search/engine.py::Searcher, src/mcp/server_tools.py::CORE_PROFILE
SEARCH_PIPELINE.md guard 512 симв., веса каналов 0.6/0.3/0.1/0.4, потолок 8×180, margin 4.0, BM25 1.2/0.45 src/mcp/tools/search_tools.py:288, investigate_tool.py:44,1025,1041, :681,:1191, settings.py:268, :219,:222
CONFIGURATION.md MAX_FILE_SIZE_MB без префикса; группы настроек; env плагина и хука settings.py:425, settings.py::SearchConfig (189–268), .opencode/plugin/mscodebase_gate.ts:25–27, .githooks/pre-commit:33,153
FAQ.md, INSTALL_MODELS.md, SYSTEM_REQUIREMENTS.md, CONTRIBUTING.md модели только по --with-models install.py::models_enabled, step_models, step_gguf
README.md профиль 69 зарегистрировано / 17 видимо tools/list замер: 17 / 69; src/mcp/server_tools.py::CORE_PROFILE

Каждая из четырёх страниц получила раздел «Code references» (EN/RU/ZH) с таблицей
«утверждение → файл:символ». Найденный дрейф исправлен: MSCODEBASE_MAX_FILE_SIZE_MB
→ MAX_FILE_SIZE_MB; OpenCode V2 форма mcp.servers (в G5-PR); модель-дефолты ×5
файлов; --uninstall (в G6-PR).

Не проверено

  • Guard'ы механические (флаги, имена клиентов, имена переменных). Смысловые
    утверждения сверены построчно по таблице выше, но не автоматизированы; страницы
    docs/blog/**, docs/research/**, docs/archive/** — историческое, не переписываются.

DoD «нет секции без кодовой ссылки» — как проверяется

Механически: guard требует, чтобы каждая каноническая страница (README.md,
docs/*/{ARCHITECTURE,SEARCH_PIPELINE,CONFIGURATION,INSTALL,CLIENTS,DATA_MAP,FAQ}.md)
содержала хотя бы одну ссылку на код (src/…py, install.py,
.opencode/plugin/…, .githooks/…); страница без ссылок = failure.
test_canonical_page_without_code_reference_is_reported фиксирует поведение,
test_every_canonical_page_in_the_repo_cites_code — инвариант репозитория.
Внутри страниц ссылки собраны в разделы «Code references» (EN/RU/ZH).


CI (head 6a346bb, run 43101532620): 7/7 jobs success — включая шаг
Client snippets cold start (G5) и clean-state (полный прогон из чистого клона).
Локально: guard'ы 159 flag reference(s) / 0 problem(s), 66 variable(s) / 0 problem(s);
pytest tests/test_docs_vs_installer.py tests/test_docs_vs_config.py → 11 passed.


Cold start on a clean environment, two non-Zed/OpenCode clients (DoD G5)

Fresh temp roots (MSCODEBASE_INSTALL_ROOT, MSCODEBASE_DATA_DIR), no pre-existing
state, --no-zed, no --with-models; commands taken from docs/en/CLIENTS.md §3.4/§3.5:

python install.py --yes --no-zed                -> rc=0, 12 ok / 0 skipped / 0 failed, 96 s
venv python                                     -> Python 3.14.3
src/main.py present, __mscodebase_ext__.marker  -> True / True
model dirs present (text-first)                 -> False   (install root 1.4 GB)
python install.py --print-config --client claude-code  -> .mcp.json written
python install.py --print-config --client cursor       -> .cursor/mcp.json written
launch exactly the file contents:
  claude-code  PASS: server=MSCodebase Intelligence Server tools=17 first=search_code has_investigate=True (4.8 s)
  cursor       PASS: server=MSCodebase Intelligence Server tools=17 first=search_code has_investigate=True (4.2 s)
python install.py --doctor (same install)       -> install_root 1.4 GB / 28755 files, index 0 chunk(s)

One deliberate deviation, stated in the harness: the installer's "kill stale MCP
processes" probe was neutralised with a powershell.bat shim exiting 1, so the run
could not terminate the live MCP host of the session; every other step is the real
installer code path.


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

@ManSio
ManSio changed the base branch from goal2-g6 to feat/g6-data-hygiene November 11, 2026 20:36
@ManSio ManSio closed this Nov 11, 2026
@ManSio ManSio reopened this Nov 11, 2026
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