Skip to content

feat(test): add prepared infobase mode - #36

Merged
alkoleft merged 4 commits into
alkoleft:masterfrom
korolevpavel:feat/test-no-build
Jul 26, 2026
Merged

feat(test): add prepared infobase mode#36
alkoleft merged 4 commits into
alkoleft:masterfrom
korolevpavel:feat/test-no-build

Conversation

@korolevpavel

@korolevpavel korolevpavel commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Closes #25.

Summary:

  • adds test --no-build for YaXUnit and Vanessa Automation
  • maps the flag to a typed build policy and reports the build step as skipped
  • validates file infobases through the 1Cv8.1CD marker before artifact creation or platform launch
  • allows prepared-test runs without configuration source trees or build tooling
  • preserves build-first behavior for ordinary CLI and MCP calls
  • documents the workflow in README, CAPABILITIES, and the repo-local skill

Verification:

  • cargo test --test cli_test --test cli_help: 25 + 10 passed
  • cargo test --bin v8-runner config::validate::tests: 47 passed
  • cargo test --bin v8-runner domain::test::tests: 5 passed
  • cargo test --bin v8-runner use_cases::run_tests: 14 passed
  • cargo test --bin v8-runner mcp::service::tests: 36 passed
  • cargo check --all-targets: passed
  • cargo clippy --all-targets: passed with existing warnings

Known baseline: the full macOS suite has pre-existing /private/var versus /var assertions; the same loader failures reproduce in an older independent worktree.

Accepted portability limitation: the current server connection contract has no cluster-admin credentials or portable management adapter. A TCP probe cannot prove that the named Ref exists, so server availability is established by the real test-engine connection and typed process errors. File infobases receive strict pre-launch validation.

Summary by CodeRabbit

  • Новые возможности
    • Добавлен флаг --no-build для v8-runner test (YaXUnit и Vanessa Automation) — запуск тестов выполняется на заранее подготовленной ИБ без повторной сборки.
    • Шаг build отображается как пропущенный.
    • Для file-ИБ требуется маркер 1Cv8.1CD, для server-ИБ доступность подтверждается через запуск тестового движка.
  • Исправления
    • Добавлена ошибка infobase_unavailable, если подготовленная ИБ недоступна/не проходит предварительную проверку.
  • Документация
    • Обновлены инструкции и примеры команд в README и справочниках, уточнена семантика --no-build.

- define typed build policy and file-infobase preflight\n- record the TDD implementation plan
- add typed no-build policy and skipped build reporting
- validate prepared file infobases without requiring source trees
- document CLI behavior and server preflight limitation
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@korolevpavel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7931f595-023c-4529-97f8-ecf3ceb3dd5e

📥 Commits

Reviewing files that changed from the base of the PR and between e8db1cb and 51ea040.

📒 Files selected for processing (7)
  • SKILL/SKILL.md
  • docs/CAPABILITIES.md
  • src/cli/args.rs
  • src/cli/execute.rs
  • src/mcp/service.rs
  • tests/cli_help.rs
  • tests/cli_test.rs

Walkthrough

Добавлен CLI-флаг --no-build для запуска YaXUnit и Vanessa Automation на подготовленной информационной базе. Реализованы типизированная политика сборки, специализированная валидация, preflight файловой базы, пропущенный build-шаг, типизированная ошибка доступности и интеграционные тесты.

Changes

Режим тестирования без сборки

Layer / File(s) Summary
CLI-политика и подготовленная конфигурация
src/cli/..., src/app.rs, src/config/..., src/use_cases/request.rs
Добавлены --no-build, TestBuildPolicy::Skip и отдельная валидация конфигурации без проверки исходников и build-инструментов.
Маппинг запросов и MCP-совместимость
src/cli/execute.rs, src/mcp/service.rs, src/use_cases/run_tests.rs
CLI-запросы получают выбранную политику, а MCP-запросы сохраняют BuildFirst.
Пропуск сборки и preflight
src/use_cases/run_tests/...
Координатор отмечает build как skipped и проверяет наличие 1Cv8.1CD для файловой базы.
Ошибки и интеграционные проверки
src/domain/test.rs, tests/cli_help.rs, tests/cli_test.rs
Добавлен код infobase_unavailable; проверены YaXUnit и Vanessa для подготовленных баз, отсутствие исходников и ранний отказ без маркера.
Документация контракта
README.md, SKILL/..., docs/CAPABILITIES.md, docs/superpowers/...
Описаны build-first по умолчанию, --no-build, preflight-проверки и ограничения режима.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant ConfigLoader
  participant TestCoordinator
  participant Infobase
  participant TestEngine

  CLI->>ConfigLoader: --no-build
  ConfigLoader->>ConfigLoader: validate_prepared_test
  CLI->>TestCoordinator: TestRequest(Skip)
  TestCoordinator->>Infobase: Проверка подготовленной базы
  Infobase-->>TestCoordinator: Результат preflight
  TestCoordinator->>TestEngine: Запуск YaXUnit или Vanessa
Loading

Possibly related PRs

Poem

Я, кролик, вижу: build уснул,
Подготовленный клон блеснул.
YaXUnit скачет, Vanessa поёт,
MCP свой build-first бережёт.
Маркер найден — тест вперёд!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 68.42% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Название кратко и точно описывает добавление режима подготовленной ИБ для тестов.
Linked Issues check ✅ Passed Изменения реализуют --no-build для test yaxunit и test va, включая skip build, проверки ИБ, ошибки и документацию.
Out of Scope Changes check ✅ Passed Новых нерелевантных изменений не видно: добавлены только связанные код, тесты, спецификации и документация.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@korolevpavel

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
tests/cli_test.rs (1)

992-1033: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Добавить проверку неизменности файловой инфобазы и для va-теста.

Тест test_va_no_build_skips_build_for_prepared_file_infobase проверяет пропуск build-шага, но, в отличие от аналогичного yaxunit-теста (test_yaxunit_no_build_skips_build_for_prepared_file_infobase, строки 458-492), не проверяет, что содержимое и mtime файла 1Cv8.1CD не изменились после запуска. Критерии приемки PR явно требуют отсутствия модификации временных меток/хэшей файловой инфобазы и интеграционного покрытия для обоих тестовых движков.

♻️ Предложение по добavлению проверки
 fn test_va_no_build_skips_build_for_prepared_file_infobase() {
     let (dir, config_path, build_calls, test_calls, _captured_params) =
         setup_va_project(JUNIT_SMOKE_REPORT_FIXTURE, &[]);
+    let infobase_path = dir.path().join("prepared-va-ib");
     configure_file_infobase(
         &config_path,
-        &dir.path().join("prepared-va-ib"),
+        &infobase_path,
         FileInfobaseState::Prepared,
     );
+    let database_path = infobase_path.join("1Cv8.1CD");
+    let database_before = fs::read(&database_path).expect("database contents before test");
+    let modified_before = fs::metadata(&database_path)
+        .and_then(|metadata| metadata.modified())
+        .expect("database timestamp before test");

     let output = v8_runner_command()
         .args([
@@
     assert!(test_calls.exists(), "Vanessa test engine must still run");
+    assert_eq!(
+        fs::read(&database_path).expect("database contents after test"),
+        database_before
+    );
+    assert_eq!(
+        fs::metadata(&database_path)
+            .and_then(|metadata| metadata.modified())
+            .expect("database timestamp after test"),
+        modified_before
+    );
     let payload: Value = serde_json::from_slice(&output.stdout).expect("json");

Как указано в целях PR, критерии приемки требуют "no modification of file-infobase timestamps or hashes" и "integration coverage for both test commands".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/cli_test.rs` around lines 992 - 1033, Расширьте тест
test_va_no_build_skips_build_for_prepared_file_infobase проверкой неизменности
файла 1Cv8.1CD: зафиксируйте его содержимое/хэш и время модификации до запуска
v8_runner_command, затем сравните оба значения после выполнения. Сохраните
существующие проверки пропуска Designer build и запуска Vanessa.
src/cli/execute.rs (1)

869-887: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Добавьте unit-тест для no_build=true.

В изменённых тестах TestArgs везде содержит no_build: false, поэтому маппинг true → TestBuildPolicy::Skip напрямую не проверяется ни для YaXUnit, ни для Vanessa. Добавьте проверки Skip и сохранения BuildFirst для обычного режима.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cli/execute.rs` around lines 869 - 887, Добавьте unit-тесты для маппинга
в обработчике `TestRunner`: проверьте, что `TestArgs.no_build = true` создаёт
`TestRequest` с `TestBuildPolicy::Skip` отдельно для YaXUnit и Vanessa, а
`no_build = false` сохраняет `TestBuildPolicy::BuildFirst`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/CAPABILITIES.md`:
- Line 33: Update the `test` capability row in `docs/CAPABILITIES.md` to
distinguish the support matrix for the default build-first mode from the
`--no-build` mode using a prepared database. Align the `--no-build` matrix with
the behavior documented around the prepared database, source-set, and build
tooling, so the table no longer claims both modes share the `build` matrix.

In `@docs/superpowers/specs/2026-07-22-test-no-build-design.md`:
- Line 9: Синхронизируйте имя политики сборки с CLI-контрактом: в
docs/superpowers/specs/2026-07-22-test-no-build-design.md:9 замените BuildPolicy
на TestBuildPolicy, а в docs/superpowers/plans/2026-07-22-test-no-build.md:30
выполните такую же замену; остальной смысл описания сохраните.

---

Nitpick comments:
In `@src/cli/execute.rs`:
- Around line 869-887: Добавьте unit-тесты для маппинга в обработчике
`TestRunner`: проверьте, что `TestArgs.no_build = true` создаёт `TestRequest` с
`TestBuildPolicy::Skip` отдельно для YaXUnit и Vanessa, а `no_build = false`
сохраняет `TestBuildPolicy::BuildFirst`.

In `@tests/cli_test.rs`:
- Around line 992-1033: Расширьте тест
test_va_no_build_skips_build_for_prepared_file_infobase проверкой неизменности
файла 1Cv8.1CD: зафиксируйте его содержимое/хэш и время модификации до запуска
v8_runner_command, затем сравните оба значения после выполнения. Сохраните
существующие проверки пропуска Designer build и запуска Vanessa.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 118d1087-54f9-423e-bece-97461697f476

📥 Commits

Reviewing files that changed from the base of the PR and between be558db and 628564a.

📒 Files selected for processing (19)
  • README.md
  • SKILL/SKILL.md
  • SKILL/references/testing.md
  • docs/CAPABILITIES.md
  • docs/superpowers/plans/2026-07-22-test-no-build.md
  • docs/superpowers/specs/2026-07-22-test-no-build-design.md
  • src/app.rs
  • src/cli/args.rs
  • src/cli/execute.rs
  • src/config/loader.rs
  • src/config/validate.rs
  • src/domain/test.rs
  • src/mcp/service.rs
  • src/use_cases/request.rs
  • src/use_cases/run_tests.rs
  • src/use_cases/run_tests/coordinator.rs
  • src/use_cases/run_tests/helpers.rs
  • tests/cli_help.rs
  • tests/cli_test.rs

Comment thread docs/CAPABILITIES.md Outdated
Comment thread docs/superpowers/specs/2026-07-22-test-no-build-design.md Outdated
- verify prepared Vanessa infobase remains unchanged\n- test build policy mapping and align documentation\n\nCo-Authored-By: codex <codex@openai.com>
- merge alkoleft/master into feat/test-no-build

- retain both CLI help contracts and update test fixtures for upstream launch options
@alkoleft
alkoleft merged commit db1404a into alkoleft:master Jul 26, 2026
1 check passed
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.

test: добавить --no-build для запуска на заранее подготовленной ИБ

2 participants