feat(test): add prepared infobase mode - #36
Conversation
- 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
|
Warning Review limit reached
Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
WalkthroughДобавлен CLI-флаг ChangesРежим тестирования без сборки
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
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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
📒 Files selected for processing (19)
README.mdSKILL/SKILL.mdSKILL/references/testing.mddocs/CAPABILITIES.mddocs/superpowers/plans/2026-07-22-test-no-build.mddocs/superpowers/specs/2026-07-22-test-no-build-design.mdsrc/app.rssrc/cli/args.rssrc/cli/execute.rssrc/config/loader.rssrc/config/validate.rssrc/domain/test.rssrc/mcp/service.rssrc/use_cases/request.rssrc/use_cases/run_tests.rssrc/use_cases/run_tests/coordinator.rssrc/use_cases/run_tests/helpers.rstests/cli_help.rstests/cli_test.rs
- 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
Closes #25.
Summary:
Verification:
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отображается как пропущенный.1Cv8.1CD, для server-ИБ доступность подтверждается через запуск тестового движка.infobase_unavailable, если подготовленная ИБ недоступна/не проходит предварительную проверку.--no-build.