Skip to content

Исправление ошибок запуска Yaxunit и VA тестов#6

Open
Kyrales wants to merge 10 commits into
alkoleft:masterfrom
Kyrales:fix_yaxunit
Open

Исправление ошибок запуска Yaxunit и VA тестов#6
Kyrales wants to merge 10 commits into
alkoleft:masterfrom
Kyrales:fix_yaxunit

Conversation

@Kyrales

@Kyrales Kyrales commented May 12, 2026

Copy link
Copy Markdown

Кратко

  • Исправлена передача управляемого payload для /C при запуске 1С Enterprise.
  • Вместо одного аргумента вида /C"RunUnitTests=..." теперь передаются два аргумента: /C и RunUnitTests=....
  • Обновлены ожидания тестов и документация для YAxUnit, Vanessa и launch mcp.

Причина

На Windows std::process::Command экранировал кавычки внутри аргумента /C"...".

В результате 1С получала в raw command line не ожидаемый параметр /C RunUnitTests=..., а строку с экранированными кавычками. Из-за этого 1C запускалась, но YAxUnit не перехватывал старт и тесты не начинались.

Что изменено

  • Payload для /C теперь передаётся отдельным argv-аргументом после /C.
  • Удалена ручная сборка строки /C"<payload>".
  • Обновлены unit/CLI-тесты на новую форму аргументов.
  • Обновлены описания в документации и skill reference.

Дополнение: Vanessa JUnit reports

  • Для test va runtime VAParams теперь синхронизирует оба поддерживаемых пути JUnit-отчета: верхнеуровневый КаталогВыгрузкиJUnit и вложенный ОтчетJUnit.КаталогВыгрузкиJUnit.
  • Добавлена CLI-проверка, что вложенный путь также указывает на run-specific каталог junit.

Зачем это понадобилось

На реальном прогоне Vanessa Automation сценарии завершались успешно (Ошибок не было, va-status.log = 0), но v8-runner падал на этапе parse JUnit report с JUnit report was not produced. Причина оказалась в том, что текущая VA использовала вложенный ОтчетJUnit.КаталогВыгрузкиJUnit из шаблона и писала junit.xml в build/out/junit, а runner ожидал отчет внутри build/temp/<profile>/runs/<run-id>/junit.

Синхронизация обоих полей делает тестовый запуск самодостаточным: отчет остается в retained run artifacts, и runner может разобрать его без зависимости от статического каталога шаблона VAParams.

Дополнение: VA setup defaults

  • config init теперь генерирует верхнеуровневый execution_timeout: 3600000 с комментарием о миллисекундах.
  • tools download vanessa теперь дополняет primary config дефолтным блоком tests/tests.va, если он ещё не настроен.
  • Для Vanessa по умолчанию задаются tests.execution_timeout_seconds: 3600, tests.va.timeouts.total_ms: 3600000, профиль all, каталог features и исключение тега IgnoreOnCIMainBuild.
  • Добавлены проверки генерации config init и обновления config при скачивании Vanessa.

Зачем это понадобилось

Ручная настройка VA после config init/tools download vanessa была неполной: test va требовал tests.va.profile, tests.va.params_path и профиль с feature_path, а общий execution_timeout: 300000 обрезал длинные BDD-прогоны примерно через 5 минут даже при более длинных test timeout. Новые дефолты делают свежую конфигурацию пригодной для полного VA-прогона без ручного восстановления обязательных полей и без раннего внешнего timeout.

Дополнение: Windows path normalization for config init

  • config init теперь выводит относительные пути source-set в YAML как логические /-пути независимо от Windows-разделителей.
  • Пути в ConfigInitResult очищаются от Windows verbatim-префикса \\?\, чтобы result output был стабильным.

Зачем это понадобилось

Расширенная проверка config_init выявила Windows-специфичную проблему нормализации путей: часть YAML/result output зависела от платформенного формата путей. Это исправлено отдельным коммитом, и cargo test config_init теперь проходит полностью.

Summary by CodeRabbit

  • Новые функции
    • Поддержка --exception-file для фильтрации ошибок EDT синтаксиса.
    • Повторяемый параметр --project для выбора source-set в командах EDT.
  • Документация
    • Обновлены правила исключений EDT и формат передачи payload в launch mcp (разделение аргументов после /C).
  • Улучшения
    • При генерации конфигов увеличен execution_timeout до 3600000 мс; для Vanessa дополнены дефолтные поля tests/va.
  • CI и тесты
    • Блокирующие проверки выполняются на ubuntu-latest; Windows переведён в план/неблокирующий режим.

Kyrales added 6 commits May 10, 2026 20:50
build_project.rs: EDT build-export теперь вызывает export --project <path>, а не --project-name.

coordinator.rs: для build-export используется отдельный очищаемый workspace build\edt-build-workspace, чтобы не конфликтовать с init workspace.

cli_build.rs: обновил ожидание CLI-теста.
- add EDT syntax exception file handling for CLI requests

- isolate EDT syntax validation in a clean workspace

- document source-set based EDT syntax filtering
- soft-skip trusted happy-path live fixture when platform bundle secrets are absent

- keep blocking CI on Linux until Windows test helpers are hardened

- stabilize Linux process and CLI output assertions
@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Эта PR реализует систему фильтрации исключений для EDT синтаксиса, переорганизует рабочие пространства EDT для изоляции сборки, переструктурирует аргументы запуска платформы /C, улучшает обнаружение мёртвых процессов, добавляет дефолтные конфигурации Vanessa и обновляет CI/документацию.

Changes

EDT Exception Filtering System

Layer / File(s) Summary
CLI и Request Contract для Exception File
src/cli/args.rs, src/cli/execute.rs, src/use_cases/request.rs, src/mcp/service.rs, src/config/model.rs
Добавлены параметры --exception-file и exception_file поля в SyntaxTarget::Edt и SyntaxTargetRequest::Edt с поддержкой необязательного пути файла исключений, с прямой передачей через уровни execute и mapping.
EDT Exception Filtering Implementation
src/use_cases/check_syntax.rs
Реализована полная система фильтрации: загрузка файлов исключений, нормализация текста, подготовка выделённого рабочего пространства синтаксиса, генерация кандидатов на сопоставление, фильтрация проблем и вычисление статуса с учётом исключений.
MCP Service Integration
src/mcp/edt_syntax.rs, src/mcp/service.rs
Обновлены конструкторы и сопоставления для поддержки exception_file, обновлены сообщения об ошибках с "проектов" на "source-set" для отражения семантики EDT.
EDT Exception Filtering Tests
src/use_cases/check_syntax.rs (тесты)
Добавлены edt_args вспомогательный метод и новые тесты для фильтрации исключений, изоляции рабочего пространства, валидации сообщений; существующие тесты рефакторены для использования новых помощников.

EDT Build Export Workspace Management

Layer / File(s) Summary
Coordinator Workspace Initialization
src/use_cases/build_project/coordinator.rs
Введена выделённая переменная edt_build_export_workspace с инициализацией, очисткой и обработкой ошибок; создан отдельный интерактивный handle для построения экспорта.
EDT Export Refactoring from Name to Path
src/use_cases/build_project.rs, src/use_cases/build_project/coordinator.rs, tests/cli_build.rs, tests/cli_test.rs
Переключение от export_project (по имени) на export_project_path (по пути), обновление мокированных скриптов для парсинга обеих форм --project-name и --project, обновление всех тестовых утверждений для проверки нового формата пути.

Platform Launch Argument Restructuring

Layer / File(s) Summary
/C Argument Separation in Enterprise Launch
src/platform/enterprise.rs
Перестроено построение аргументов для передачи /C и payload как двух отдельных Vec элементов вместо одного цитируемого аргумента; удалена вспомогательная функция quoted_c_arg.
Process Liveness and Zombie Detection
src/platform/interactive.rs
Добавлены Unix-специфичные вспомогательные функции для обнаружения зомби через /proc/<pid>/stat, добавлена функция ожидания выхода процесса с тайм-аутом, обновлён тест kill для использования нового polling helper.
Vanessa JUnit Output Directory Handling
src/use_cases/vanessa.rs
Обновлена функция apply_test_overlay для вычисления junit_dir и вставки КаталогВыгрузкиJUnit в вложенный объект ОтчетJUnit с новым вспомогательным методом ensure_object.
Launch and CLI Tests Update
src/use_cases/launch_app.rs, tests/cli_launch.rs, tests/cli_test.rs
Обновлены утверждения Client MCP и CLI launch для проверки новой структуры с разделением /C на два отдельных аргумента; скорректированы проверки JUnit/VA параметров.

CI Workflow, Configuration и Documentation

Layer / File(s) Summary
CI Workflow Trusted Mode Gating
.github/workflows/ci.yml
Сужена матрица ОС только до ubuntu-latest, добавлена переменная V8TR_CI_TARGET_OS, добавлена логика case для выбора platform bundle по ОС, добавлена обработка отсутствующих bundle с установкой V8TR_DESIGNER_ALLOW_MISSING_CONFIG.
Configuration Init Path Handling и Execution Timeout
src/use_cases/config_init.rs, tests/cli_config_init.rs
Добавлены функции display_path и logical_path для нормализации путей на Windows, обновлены поля результата ConfigInit, изменено значение execution_timeout на 3600000 с добавлением комментария.
Vanessa Default Configuration in Tools Download
src/use_cases/tools_download.rs, tests/cli_tools_download.rs
Добавлены дефолтные YAML-фрагменты для Vanessa тестов, реализована логика добавления/обновления блока tests в конфиге при скачивании Vanessa Automation.
Documentation Alignment
docs/CAPABILITIES.md, docs/CONFIGURATION.md, SKILL/references/testing.md, SKILL/references/project-workflows.md, spec/acceptance/real-environment-validation.md, scripts/test/README.md
Обновлена документация для отражения новой системы фильтрации исключений EDT (--exception-file), структуры аргументов /C, состояния CI (ubuntu-latest blocking), Windows roadmap (planned/todo).
Change Detection Debug Logging
src/change_detection/analyzer.rs, src/change_detection/scanner.rs, src/support/fs.rs
Добавлены tracing::debug! логи на ключевых этапах анализа и сканирования для улучшения observability; переконфигурирована условная компиляция в best_effort_fsync_dir.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Poem

В глубинах кода, где исключенья живут,
Фильтры танцуют, проблемы уходят,
Рабочих пространств порядок блюдят,
А /C аргументы в парах нас водят.

Процессы в /proc шепчут про зомби-тень,
А Ubuntu сторожит CI-очаг,
Кролик код читает, светлеет как день. 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 69.47% 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 The title accurately summarizes the main changes: fixing startup errors for YAxUnit and Vanessa Automation tests, which is the core focus of this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@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: 3

🤖 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 `@spec/acceptance/real-environment-validation.md`:
- Line 5: Update the broken relative link string "../.github/workflows/ci.yml"
in the sentence that starts with "Начиная с `2026-04-22`, source of truth..." to
use two-levels-up path "../../.github/workflows/ci.yml" so the link from
spec/acceptance/real-environment-validation.md correctly points to the workflow
file.

In `@src/use_cases/check_syntax.rs`:
- Around line 832-837: The prepare_edt_syntax_workspace function currently uses
a fixed directory "edt-syntax-workspace" and calls clean_dir(&workspace), which
causes collisions and data loss for concurrent runs; change it to create a
unique per-run workspace (e.g., use tempfile::tempdir_in or append a random/UUID
suffix to work_path.join("edt-syntax-workspace-<unique>")) and stop calling
clean_dir on a shared path—create the new directory with std::fs::create_dir_all
and return its PathBuf so parallel `syntax edt` invocations do not interfere;
update references to prepare_edt_syntax_workspace and remove reliance on
clean_dir for the shared name.

In `@tests/cli_build.rs`:
- Line 679: Усиль проверку в тесте: вместо лишь поиска подстроки "export
--project" убедись, что переменная edt_calls содержит точную команду с ожидаемым
путём проекта (например собрать expected_project_path из используемой в тесте
переменной/функции, которая создаёт временный проект) и проверить через
edt_calls.contains(&expected_project_path) или эквивалентную проверку; обнови
утверждение, ссылаясь на edt_calls и ожидаемую строку (expected_project_path /
ожидаемую команду), чтобы тест падал при неверном пути.
🪄 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: 837939e3-e238-479d-85f2-1fed64250cf4

📥 Commits

Reviewing files that changed from the base of the PR and between 43674ee and 96adc36.

📒 Files selected for processing (22)
  • .github/workflows/ci.yml
  • SKILL/references/project-workflows.md
  • SKILL/references/testing.md
  • docs/CAPABILITIES.md
  • docs/CONFIGURATION.md
  • scripts/test/README.md
  • spec/acceptance/real-environment-validation.md
  • src/cli/args.rs
  • src/cli/execute.rs
  • src/config/model.rs
  • src/mcp/edt_syntax.rs
  • src/mcp/service.rs
  • src/platform/enterprise.rs
  • src/platform/interactive.rs
  • src/use_cases/build_project.rs
  • src/use_cases/build_project/coordinator.rs
  • src/use_cases/check_syntax.rs
  • src/use_cases/launch_app.rs
  • src/use_cases/request.rs
  • tests/cli_build.rs
  • tests/cli_launch.rs
  • tests/cli_test.rs

## Цель

Начиная с `2026-04-22`, source of truth для real-env happy-path является GitHub Actions workflow [`ci.yml`](../.github/workflows/ci.yml) с matrix на `ubuntu-latest` и `windows-latest`, а локальные скрипты в `scripts/test/*` остаются helper/entrypoint-слоем для этого workflow.
Начиная с `2026-04-22`, source of truth для real-env happy-path является GitHub Actions workflow [`ci.yml`](../.github/workflows/ci.yml), а локальные скрипты в `scripts/test/*` остаются helper/entrypoint-слоем для этого workflow.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Исправьте относительную ссылку на workflow.

На Line 5 путь ../.github/workflows/ci.yml выглядит битым для файла в spec/acceptance; нужен переход на два уровня вверх.

Предлагаемое исправление
-Начиная с `2026-04-22`, source of truth для real-env happy-path является GitHub Actions workflow [`ci.yml`](../.github/workflows/ci.yml), а локальные скрипты в `scripts/test/*` остаются helper/entrypoint-слоем для этого workflow.
+Начиная с `2026-04-22`, source of truth для real-env happy-path является GitHub Actions workflow [`ci.yml`](../../.github/workflows/ci.yml), а локальные скрипты в `scripts/test/*` остаются helper/entrypoint-слоем для этого workflow.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Начиная с `2026-04-22`, source of truth для real-env happy-path является GitHub Actions workflow [`ci.yml`](../.github/workflows/ci.yml), а локальные скрипты в `scripts/test/*` остаются helper/entrypoint-слоем для этого workflow.
Начиная с `2026-04-22`, source of truth для real-env happy-path является GitHub Actions workflow [`ci.yml`](../../.github/workflows/ci.yml), а локальные скрипты в `scripts/test/*` остаются helper/entrypoint-слоем для этого workflow.
🤖 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 `@spec/acceptance/real-environment-validation.md` at line 5, Update the broken
relative link string "../.github/workflows/ci.yml" in the sentence that starts
with "Начиная с `2026-04-22`, source of truth..." to use two-levels-up path
"../../.github/workflows/ci.yml" so the link from
spec/acceptance/real-environment-validation.md correctly points to the workflow
file.

Comment on lines +832 to +837
fn prepare_edt_syntax_workspace(work_path: &Path) -> std::io::Result<PathBuf> {
let workspace = work_path.join("edt-syntax-workspace");
clean_dir(&workspace)?;
std::fs::create_dir_all(&workspace)?;
Ok(workspace)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Избегайте общего edt-syntax-workspace для параллельных запусков

Сейчас используется один фиксированный каталог, который каждый запуск очищает через clean_dir. Параллельные syntax edt могут взаимно удалять рабочие данные и падать непредсказуемо.

💡 Предлагаемое исправление
 fn prepare_edt_syntax_workspace(work_path: &Path) -> std::io::Result<PathBuf> {
-    let workspace = work_path.join("edt-syntax-workspace");
-    clean_dir(&workspace)?;
-    std::fs::create_dir_all(&workspace)?;
-    Ok(workspace)
+    let root = work_path.join("edt-syntax-workspace");
+    std::fs::create_dir_all(&root)?;
+    let workspace = root.join(format!(
+        "run-{}-{}",
+        std::process::id(),
+        LOG_SEQUENCE.fetch_add(1, Ordering::Relaxed)
+    ));
+    clean_dir(&workspace)?;
+    std::fs::create_dir_all(&workspace)?;
+    Ok(workspace)
 }
🤖 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/use_cases/check_syntax.rs` around lines 832 - 837, The
prepare_edt_syntax_workspace function currently uses a fixed directory
"edt-syntax-workspace" and calls clean_dir(&workspace), which causes collisions
and data loss for concurrent runs; change it to create a unique per-run
workspace (e.g., use tempfile::tempdir_in or append a random/UUID suffix to
work_path.join("edt-syntax-workspace-<unique>")) and stop calling clean_dir on a
shared path—create the new directory with std::fs::create_dir_all and return its
PathBuf so parallel `syntax edt` invocations do not interfere; update references
to prepare_edt_syntax_workspace and remove reliance on clean_dir for the shared
name.

Comment thread tests/cli_build.rs
let ibcmd_calls = fs::read_to_string(ibcmd_calls_log).expect("ibcmd calls");
let edt_calls = fs::read_to_string(edt_calls_log).expect("edt calls");
assert!(edt_calls.contains("export --project-name configuration"));
assert!(edt_calls.contains("export --project "));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Усилите проверку аргумента --project точным ожидаемым путём.

На Line 679 проверяется только факт наличия export --project, поэтому тест не ловит случай, когда путь проекта неверный.

💡 Предлагаемое изменение
-    assert!(edt_calls.contains("export --project "));
+    let expected_project = config_path
+        .parent()
+        .expect("workspace dir")
+        .join("project")
+        .join("configuration");
+    assert!(edt_calls.contains(&format!(
+        "export --project {}",
+        expected_project.display()
+    )));
🤖 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_build.rs` at line 679, Усиль проверку в тесте: вместо лишь поиска
подстроки "export --project" убедись, что переменная edt_calls содержит точную
команду с ожидаемым путём проекта (например собрать expected_project_path из
используемой в тесте переменной/функции, которая создаёт временный проект) и
проверить через edt_calls.contains(&expected_project_path) или эквивалентную
проверку; обнови утверждение, ссылаясь на edt_calls и ожидаемую строку
(expected_project_path / ожидаемую команду), чтобы тест падал при неверном пути.

@steel-code-agent

Copy link
Copy Markdown

Confirmed on Linux. Same root cause as our independently-filed #7 (now closed as dup): quoted_c_arg injected literal " characters into the argv value because std::process::Command bypasses the shell on both Linux (execve) and Windows (CreateProcess). The Linux-visible symptom is platform exit code 1 with /Out:

Неверные или отсутствующие параметры соединения с информационной базой

…rather than the Windows YAxUnit-doesn't-start signature, but both come from the same unrecognized /C"…" argv token.

Tested this PR's two-token form on platform 8.3.27.2074 against gbig_pam_ai (server infobase, /UC enabled), using strace -f -e execve to capture the actual argv:

"/C",
"StartFeaturePlayer;VAParams=...;mcpMode=ws;manager_url=...;client_uid=...;...",

Result: cv8c parses the argv cleanly, no «Неверные параметры», process reaches the Vanessa side. LGTM from a Linux perspective.

@Kyrales Kyrales changed the title Исправление ошибок запуска Yaxunit тестов Исправление ошибок запуска Yaxunit и VA тестов May 14, 2026
@Kyrales

Kyrales commented May 14, 2026

Copy link
Copy Markdown
Author

Дополнение по последнему коммиту d615cc2 (Fix Vanessa JUnit report directory overlay).

Зачем понадобилось изменение: на реальном v8-runner test va Vanessa Automation завершала сценарии успешно (Ошибок не было, va-status.log = 0), но runner затем падал на parse JUnit report с JUnit report was not produced.

Диагностика показала расхождение путей: runner выставлял верхнеуровневый КаталогВыгрузкиJUnit в run-specific каталог и ожидал отчет в build/temp/<profile>/runs/<run-id>/junit, а используемая VA брала вложенный ОтчетJUnit.КаталогВыгрузкиJUnit из шаблона и писала junit.xml в build/out/junit.

Теперь runtime overlay синхронизирует оба поля JUnit на один run-specific каталог. Это сохраняет отчет внутри artifacts конкретного запуска и позволяет runner корректно разобрать JUnit после успешного завершения VA. Проверено cargo test vanessa.

@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.

🧹 Nitpick comments (1)
src/use_cases/vanessa.rs (1)

229-234: ⚡ Quick win

Документируйте причину двойной вставки КаталогВыгрузкиJUnit.

Параметр КаталогВыгрузкиJUnit вставляется дважды: на верхнем уровне (строка 230-233) и внутри вложенного объекта ОтчетJUnit (строка 234). Это выглядит как стратегия обратной совместимости, но без комментария будущие разработчики могут не понять причину дублирования или случайно удалить один из вариантов.

Рекомендуется добавить краткий комментарий, поясняющий, что верхний уровень поддерживается для совместимости, а вложенная структура является каноническим расположением.

📝 Предлагаемое дополнение документации
     object.insert("ДелатьОтчетВФорматеjUnit".to_owned(), Value::Bool(true));
     let junit_dir = Value::String(artifacts.junit_dir.display().to_string());
+    // Backward compatibility: keep КаталогВыгрузкиJUnit at top level for older VA versions
     object.insert(
         "КаталогВыгрузкиJUnit".to_owned(),
         junit_dir.clone(),
     );
+    // Canonical location: nested under ОтчетJUnit
     ensure_object(object, "ОтчетJUnit").insert("КаталогВыгрузкиJUnit".to_owned(), junit_dir);
🤖 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/use_cases/vanessa.rs` around lines 229 - 234, The key
"КаталогВыгрузкиJUnit" is inserted both at the top level (object.insert(...))
and inside the nested "ОтчетJUnit" object (ensure_object(...).insert(...)); add
a concise inline comment above these insertions explaining that the top-level
key is kept solely for backward compatibility while the canonical location is
inside the "ОтчетJUnit" object, so future maintainers know why both entries
exist and should not remove the top-level variant; leave both insert calls
(object.insert and ensure_object(...).insert) intact and place the comment near
the calls referencing the symbols object, ensure_object, "КаталогВыгрузкиJUnit",
and "ОтчетJUnit".
🤖 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.

Nitpick comments:
In `@src/use_cases/vanessa.rs`:
- Around line 229-234: The key "КаталогВыгрузкиJUnit" is inserted both at the
top level (object.insert(...)) and inside the nested "ОтчетJUnit" object
(ensure_object(...).insert(...)); add a concise inline comment above these
insertions explaining that the top-level key is kept solely for backward
compatibility while the canonical location is inside the "ОтчетJUnit" object, so
future maintainers know why both entries exist and should not remove the
top-level variant; leave both insert calls (object.insert and
ensure_object(...).insert) intact and place the comment near the calls
referencing the symbols object, ensure_object, "КаталогВыгрузкиJUnit", and
"ОтчетJUnit".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29d1496f-f931-4f3a-b8a4-db3a2ee1e293

📥 Commits

Reviewing files that changed from the base of the PR and between 96adc36 and d615cc2.

📒 Files selected for processing (2)
  • src/use_cases/vanessa.rs
  • tests/cli_test.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/cli_test.rs

@Kyrales

Kyrales commented May 14, 2026

Copy link
Copy Markdown
Author

Дополнение по последнему коммиту 7db4822 (Configure Vanessa defaults during setup).

Что изменилось:

  • config init теперь генерирует execution_timeout: 3600000 вместо 300000 и добавляет комментарий, что значение задается в миллисекундах.
  • tools download vanessa теперь дополняет primary config блоком tests / tests.va, если VA-тесты еще не настроены.
  • Для VA добавляются дефолты: tests.execution_timeout_seconds: 3600, tests.va.timeouts.total_ms: 3600000, профиль all, feature_path: features и исключение IgnoreOnCIMainBuild.

Зачем это понадобилось:
на реальном проекте после config init и скачивания Vanessa запуск v8-runner test va требовал ручной настройки обязательных полей tests.va.profile, tests.va.params_path и profiles.<name>.feature_path. Кроме того, верхнеуровневый execution_timeout: 300000 ограничивал всю CLI-команду пятью минутами и обрывал длинный VA-прогон, даже если test timeout был увеличен.

Теперь свежая конфигурация получает рабочие VA defaults сразу при setup, а полный BDD-прогон не обрезается старым глобальным 5-минутным лимитом.

Проверено:

  • cargo test tools_download
  • cargo test config_init

@Kyrales

Kyrales commented May 14, 2026

Copy link
Copy Markdown
Author

Дополнение по последнему коммиту 83a029f (Normalize config init paths on Windows).

Что изменилось:

  • config init теперь нормализует относительные пути source-set в YAML как логические пути с /, независимо от Windows-разделителя \.
  • Пути в ConfigInitResult очищаются от Windows verbatim-префикса \\?\, чтобы JSON/result output был стабильным и совпадал с ожиданиями CLI-тестов.

Зачем это понадобилось:
после добавления проверки execution_timeout широкий cargo test config_init выявил реальную Windows-специфичную проблему: часть сценариев сравнивала стабильный YAML/result output, а код отдавал платформенно-зависимые пути. Оставлять это как «известное падение» нельзя, поэтому нормализация исправлена отдельным коммитом.

Проверено:

  • cargo test config_init — 33/33 passed
  • cargo test tools_download — 6/6 passed

- add debug tracing around snapshot analysis and filesystem scans

- keep directory fsync best-effort on non-Unix platforms

@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

🤖 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 `@src/use_cases/tools_download.rs`:
- Around line 34-36: The three constants DEFAULT_VANESSA_VA_FIELDS,
DEFAULT_VANESSA_TESTS_FIELDS, and DEFAULT_VANESSA_TESTS_CONFIG contain
Windows-style path separators (backslashes) in the path 'tools\\VAParams.json',
which causes incorrect path interpretation on Unix systems where the backslash
is treated as a literal character rather than a separator. Replace all
occurrences of the Windows path separator \\ with forward slashes / in these
constants, changing 'tools\\VAParams.json' to 'tools/VAParams.json' in each of
the three constants. Forward slashes are cross-platform compatible and will be
automatically normalized by Rust's PathBuf on all operating systems.

In `@tests/cli_tools_download.rs`:
- Around line 316-321: Update the test assertions in the cli_tools_download.rs
test file to use forward slashes instead of Windows backslashes in the path
checks. Specifically, change the assertion that checks for
`'tools\\VAParams.json'` to use `'tools/VAParams.json'` instead, so that the
test matches the updated path separator format that is being applied to the
constants in src/use_cases/tools_download.rs.
🪄 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: 8b95207f-e673-42bd-8b19-1d4272d07ea0

📥 Commits

Reviewing files that changed from the base of the PR and between d615cc2 and de16d5b.

📒 Files selected for processing (7)
  • src/change_detection/analyzer.rs
  • src/change_detection/scanner.rs
  • src/support/fs.rs
  • src/use_cases/config_init.rs
  • src/use_cases/tools_download.rs
  • tests/cli_config_init.rs
  • tests/cli_tools_download.rs
✅ Files skipped from review due to trivial changes (3)
  • src/change_detection/analyzer.rs
  • src/change_detection/scanner.rs
  • tests/cli_config_init.rs

Comment on lines +34 to +36
const DEFAULT_VANESSA_VA_FIELDS: &str = " va:\n params_path: 'tools\\VAParams.json'\n profile: 'all'\n timeouts:\n total_ms: 3600000\n profiles:\n all:\n feature_path: 'features'\n ignore_tags:\n - 'IgnoreOnCIMainBuild'\n";
const DEFAULT_VANESSA_TESTS_FIELDS: &str = " execution_timeout_seconds: 3600\n va:\n params_path: 'tools\\VAParams.json'\n profile: 'all'\n timeouts:\n total_ms: 3600000\n profiles:\n all:\n feature_path: 'features'\n ignore_tags:\n - 'IgnoreOnCIMainBuild'\n";
const DEFAULT_VANESSA_TESTS_CONFIG: &str = "tests:\n execution_timeout_seconds: 3600\n va:\n params_path: 'tools\\VAParams.json'\n profile: 'all'\n timeouts:\n total_ms: 3600000\n profiles:\n all:\n feature_path: 'features'\n ignore_tags:\n - 'IgnoreOnCIMainBuild'\n";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Критическая проблема кросс-платформенной совместимости: пути с обратными слешами Windows не работают на Unix.

Константы DEFAULT_VANESSA_VA_FIELDS, DEFAULT_VANESSA_TESTS_FIELDS и DEFAULT_VANESSA_TESTS_CONFIG содержат путь 'tools\\VAParams.json' с Windows-разделителями. После парсинга YAML этот путь становится строкой tools\VAParams.json.

Проблема:

  • На Unix системах PathBuf::from("tools\VAParams.json") интерпретируется как один компонент имени файла с литеральным символом обратного слеша, а не как путь tools/VAParams.json
  • Это приведёт к ошибкам валидации и выполнения Vanessa на Linux/macOS

Решение: Используйте прямые слеши /, которые работают на обеих платформах — Rust's PathBuf автоматически нормализует их на Windows.

🔧 Предлагаемое исправление
-const DEFAULT_VANESSA_VA_FIELDS: &str = "  va:\n    params_path: 'tools\\VAParams.json'\n    profile: 'all'\n    timeouts:\n      total_ms: 3600000\n    profiles:\n      all:\n        feature_path: 'features'\n        ignore_tags:\n          - 'IgnoreOnCIMainBuild'\n";
-const DEFAULT_VANESSA_TESTS_FIELDS: &str = "  execution_timeout_seconds: 3600\n  va:\n    params_path: 'tools\\VAParams.json'\n    profile: 'all'\n    timeouts:\n      total_ms: 3600000\n    profiles:\n      all:\n        feature_path: 'features'\n        ignore_tags:\n          - 'IgnoreOnCIMainBuild'\n";
-const DEFAULT_VANESSA_TESTS_CONFIG: &str = "tests:\n  execution_timeout_seconds: 3600\n  va:\n    params_path: 'tools\\VAParams.json'\n    profile: 'all'\n    timeouts:\n      total_ms: 3600000\n    profiles:\n      all:\n        feature_path: 'features'\n        ignore_tags:\n          - 'IgnoreOnCIMainBuild'\n";
+const DEFAULT_VANESSA_VA_FIELDS: &str = "  va:\n    params_path: 'tools/VAParams.json'\n    profile: 'all'\n    timeouts:\n      total_ms: 3600000\n    profiles:\n      all:\n        feature_path: 'features'\n        ignore_tags:\n          - 'IgnoreOnCIMainBuild'\n";
+const DEFAULT_VANESSA_TESTS_FIELDS: &str = "  execution_timeout_seconds: 3600\n  va:\n    params_path: 'tools/VAParams.json'\n    profile: 'all'\n    timeouts:\n      total_ms: 3600000\n    profiles:\n      all:\n        feature_path: 'features'\n        ignore_tags:\n          - 'IgnoreOnCIMainBuild'\n";
+const DEFAULT_VANESSA_TESTS_CONFIG: &str = "tests:\n  execution_timeout_seconds: 3600\n  va:\n    params_path: 'tools/VAParams.json'\n    profile: 'all'\n    timeouts:\n      total_ms: 3600000\n    profiles:\n      all:\n        feature_path: 'features'\n        ignore_tags:\n          - 'IgnoreOnCIMainBuild'\n";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const DEFAULT_VANESSA_VA_FIELDS: &str = " va:\n params_path: 'tools\\VAParams.json'\n profile: 'all'\n timeouts:\n total_ms: 3600000\n profiles:\n all:\n feature_path: 'features'\n ignore_tags:\n - 'IgnoreOnCIMainBuild'\n";
const DEFAULT_VANESSA_TESTS_FIELDS: &str = " execution_timeout_seconds: 3600\n va:\n params_path: 'tools\\VAParams.json'\n profile: 'all'\n timeouts:\n total_ms: 3600000\n profiles:\n all:\n feature_path: 'features'\n ignore_tags:\n - 'IgnoreOnCIMainBuild'\n";
const DEFAULT_VANESSA_TESTS_CONFIG: &str = "tests:\n execution_timeout_seconds: 3600\n va:\n params_path: 'tools\\VAParams.json'\n profile: 'all'\n timeouts:\n total_ms: 3600000\n profiles:\n all:\n feature_path: 'features'\n ignore_tags:\n - 'IgnoreOnCIMainBuild'\n";
const DEFAULT_VANESSA_VA_FIELDS: &str = " va:\n params_path: 'tools/VAParams.json'\n profile: 'all'\n timeouts:\n total_ms: 3600000\n profiles:\n all:\n feature_path: 'features'\n ignore_tags:\n - 'IgnoreOnCIMainBuild'\n";
const DEFAULT_VANESSA_TESTS_FIELDS: &str = " execution_timeout_seconds: 3600\n va:\n params_path: 'tools/VAParams.json'\n profile: 'all'\n timeouts:\n total_ms: 3600000\n profiles:\n all:\n feature_path: 'features'\n ignore_tags:\n - 'IgnoreOnCIMainBuild'\n";
const DEFAULT_VANESSA_TESTS_CONFIG: &str = "tests:\n execution_timeout_seconds: 3600\n va:\n params_path: 'tools/VAParams.json'\n profile: 'all'\n timeouts:\n total_ms: 3600000\n profiles:\n all:\n feature_path: 'features'\n ignore_tags:\n - 'IgnoreOnCIMainBuild'\n";
🤖 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/use_cases/tools_download.rs` around lines 34 - 36, The three constants
DEFAULT_VANESSA_VA_FIELDS, DEFAULT_VANESSA_TESTS_FIELDS, and
DEFAULT_VANESSA_TESTS_CONFIG contain Windows-style path separators (backslashes)
in the path 'tools\\VAParams.json', which causes incorrect path interpretation
on Unix systems where the backslash is treated as a literal character rather
than a separator. Replace all occurrences of the Windows path separator \\ with
forward slashes / in these constants, changing 'tools\\VAParams.json' to
'tools/VAParams.json' in each of the three constants. Forward slashes are
cross-platform compatible and will be automatically normalized by Rust's PathBuf
on all operating systems.

Comment on lines +316 to +321
assert!(config.contains("tests:\n execution_timeout_seconds: 3600\n va:"));
assert!(config.contains(" params_path: 'tools\\VAParams.json'"));
assert!(config.contains(" profile: 'all'"));
assert!(config.contains(" total_ms: 3600000"));
assert!(config.contains(" feature_path: 'features'"));
assert!(config.contains(" - 'IgnoreOnCIMainBuild'"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Обновите утверждения теста после исправления разделителей путей.

Эти утверждения проверяют путь с обратными слешами Windows ('tools\\VAParams.json'), что соответствует текущей реализации констант. После исправления констант на использование прямых слешей (как отмечено в комментарии к src/use_cases/tools_download.rs), эти утверждения также потребуется обновить.

🔧 Ожидаемое исправление (после исправления констант)
-    assert!(config.contains("    params_path: 'tools\\VAParams.json'"));
+    assert!(config.contains("    params_path: 'tools/VAParams.json'"));
🤖 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_tools_download.rs` around lines 316 - 321, Update the test
assertions in the cli_tools_download.rs test file to use forward slashes instead
of Windows backslashes in the path checks. Specifically, change the assertion
that checks for `'tools\\VAParams.json'` to use `'tools/VAParams.json'` instead,
so that the test matches the updated path separator format that is being applied
to the constants in src/use_cases/tools_download.rs.

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.

2 participants