Skip to content

fix: учитывать локальный oscript.cfg при запуске бенчмарков - #58

Merged
Stivo182 merged 9 commits into
mainfrom
fix/benchmark-local-config
Jul 23, 2026
Merged

fix: учитывать локальный oscript.cfg при запуске бенчмарков#58
Stivo182 merged 9 commits into
mainfrom
fix/benchmark-local-config

Conversation

@Stivo182

@Stivo182 Stivo182 commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Проблема

При запуске benchos run из каталога, отличного от каталога бенчмарков,
OneScript не учитывал oscript.cfg, расположенный рядом с бенчмарком.

Из-за этого не подключались локальные зависимости, указанные через
lib.system или lib.additional. Особенно это проявлялось, если пакет
отсутствовал в глобальном каталоге библиотек.

Решение

  • Добавлен поиск oscript.cfg рядом с переданными файлами и найденными
    бенчмарками.
  • Перед первичным подключением бенчмарков приложение один раз
    перезапускается с собранными путями библиотек.
  • На этапе подключения из найденных конфигураций учитываются только
    lib.system и lib.additional.
  • Пути библиотек объединяются в порядке от локальных конфигураций к
    глобальной.
  • При изолированном запуске применяется полная конфигурация, расположенная
    рядом с конкретным бенчмарком.
  • Относительные пути разрешаются относительно соответствующего
    oscript.cfg.
  • Для файлов без аннотации &Бенчмарк локальная конфигурация переносится
    во временный каталог вместе с подготовленным файлом.
  • Общая логика разрешения входных файлов и экранирования аргументов
    командной строки вынесена в отдельные компоненты.
  • Добавлены тесты и описание нового поведения в документации.

Summary by CodeRabbit

  • New Features
    • Benchmark runs now automatically find and apply nearby oscript.cfg, including local library dependencies, and reuse the configuration on execution.
    • Added recursive benchmark/config discovery and consistent prioritization/deduplication of configs.
    • Explicit benchmark paths without the .os extension are now resolved automatically.
    • Improved cross-platform command handling, including safe execution when paths contain spaces.
  • Documentation
    • Updated CLI and benchmark startup docs to clarify oscript.cfg and local dependency rules.
  • Tests
    • Expanded automated coverage for config discovery, dependency loading, recursive execution, and temporary environment cleanup.
  • Chores
    • Updated .gitignore to ignore Git worktrees.

Stivo182 added 2 commits July 15, 2026 16:48
- находить конфигурации OneScript рядом с файлами бенчмарков
- подключать локальные зависимости при первичной загрузке
- применять конфигурацию конкретного бенчмарка при изолированном запуске
- сохранять конфигурацию для файлов без аннотации Бенчмарк
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 18 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 009b4486-c754-4947-99ca-85834ac8d089

📥 Commits

Reviewing files that changed from the base of the PR and between 1f534dd and 4e24ad9.

📒 Files selected for processing (6)
  • tests/oscript.cfg
  • tests/ТестыЗапускателяПриложенияСКонфигурациейOneScript.os
  • tests/ТестыЛокатораФайловКонфигурацииOneScript.os
  • tests/ТестыМенеджераПараметровКонфигурацииOneScript.os
  • tests/ТестыМенеджераПроцессовБенчмарков.os
  • tests/ТестыРазрешателяВходныхФайловБенчмарков.os
📝 Walkthrough

Walkthrough

The change adds local oscript.cfg discovery and merging for benchmark inputs, applies configuration through controlled OneScript restarts, resolves benchmark files consistently, preserves local dependencies during preparation, and improves cross-platform process argument escaping.

Changes

Configured benchmark execution

Layer / File(s) Summary
Input and configuration discovery
src/BenchmarkOneScript/core/common/..., src/BenchmarkOneScript/cmd/Классы/..., tests/ТестыЛокатораФайловКонфигурацииOneScript.os, tests/ТестыРазрешателяВходныхФайловБенчмарков.os
Benchmark files and directories are resolved into normalized, sorted, deduplicated paths; adjacent oscript.cfg files are located in ordered, platform-aware fashion.
Configuration source aggregation
src/BenchmarkOneScript/core/config/Классы/МенеджерПараметровКонфигурацииOneScript.os, tests/ТестыМенеджераПараметровКонфигурацииOneScript.os
Configuration sources are read in priority order, missing settings are merged, library paths are combined, and additional files can provide all parameters when enabled.
Configuration-aware application restart
src/BenchmarkOneScript/cmd/..., src/BenchmarkOneScript/core/running/Классы/МенеджерПроцессовБенчмарков.os, src/BenchmarkOneScript/core/common/Модули/ЭкранированиеАргументовКоманднойСтроки.os, tests/helpers/..., tests/ТестыЗапускателяПриложенияСКонфигурациейOneScript.os, docs/*.md
The run command applies discovered configurations through a guarded restart, passes merged settings through OSCRIPT_CONFIG, and validates dependency loading and restart suppression.
Benchmark preparation and validation
src/BenchmarkOneScript/core/running/Классы/ПодготовительФайлаБенчмарка.os, tests/ТестыПодготовителяФайлаБенчмарка.os, tests/ТестыМенеджераПроцессовБенчмарков.os, .gitignore
Unannotated benchmarks are prepared in temporary directories with local configuration files, executable paths with spaces are tested, and supporting directives and ignore rules are updated.

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

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant ConfigLocator
  participant ConfigManager
  participant RestartLauncher
  participant OneScript
  CLI->>ConfigLocator: Resolve benchmark-adjacent oscript.cfg files
  ConfigLocator-->>CLI: Ordered configuration paths
  CLI->>RestartLauncher: Apply configurations
  RestartLauncher->>ConfigManager: Read and merge sources
  ConfigManager-->>RestartLauncher: Configuration parameters
  RestartLauncher->>OneScript: Start main.os with OSCRIPT_CONFIG
  OneScript-->>RestartLauncher: Return exit code
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: local oscript.cfg handling during benchmark runs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/benchmark-local-config

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.

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

🧹 Nitpick comments (4)
tests/ТестыЛокатораФайловКонфигурацииOneScript.os (1)

283-290: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate ЭтоWindows() implementation — deferred to consolidated comment.

🤖 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/ТестыЛокатораФайловКонфигурацииOneScript.os` around lines 283 - 290,
Remove the duplicate ЭтоWindows() implementation from this location and reuse
the existing consolidated implementation instead, updating any local references
if needed while preserving the Windows platform detection behavior.
src/BenchmarkOneScript/cmd/Классы/ЛокаторФайловКонфигурацииOneScript.os (1)

82-89: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate ЭтоWindows() implementation — deferred to consolidated comment.

This is the same platform-detection logic duplicated across this file, РаботаСПутямиФайловойСистемы.os, and a test file; see consolidated comment.

🤖 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/BenchmarkOneScript/cmd/Классы/ЛокаторФайловКонфигурацииOneScript.os`
around lines 82 - 89, Remove the duplicate ЭтоWindows() implementation from this
file and reuse the existing shared platform-detection helper used by
РаботаСПутямиФайловойСистемы.os and the tests. Update callers as needed so
Windows detection remains unchanged while maintaining a single implementation.
src/BenchmarkOneScript/core/common/Модули/РаботаСПутямиФайловойСистемы.os (1)

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

ЭтоWindows() implemented identically in three places.

The same platform-detection logic is copy-pasted across a common utility module, a CLI locator class, and a test file, risking drift if the platform check ever needs adjustment.

  • src/BenchmarkOneScript/core/common/Модули/РаботаСПутямиФайловойСистемы.os#L85-88: export this helper (it's currently private) so it can be the single source of truth.
  • src/BenchmarkOneScript/cmd/Классы/ЛокаторФайловКонфигурацииOneScript.os#L82-89: remove the local copy and call the exported common helper instead.
  • tests/ТестыЛокатораФайловКонфигурацииOneScript.os#L283-290: remove the local copy and call the exported common helper instead.
🤖 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/BenchmarkOneScript/core/common/Модули/РаботаСПутямиФайловойСистемы.os` at
line 1, Export ЭтоWindows() from РаботаСПутямиФайловойСистемы.os, then remove
the duplicated platform-detection implementations in
ЛокаторФайловКонфигурацииOneScript and ТестыЛокатораФайловКонфигурацииOneScript,
replacing their uses with the shared exported helper.
tests/ТестыМенеджераПараметровКонфигурацииOneScript.os (1)

49-77: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider &Параметры(...) for these input-variant tests.

Both tests exercise two input variants (Строка/ФиксированныйМассив and Неопределено/"") against the same expected outcome, which fits the project convention of preferring parameterized tests when only input data changes.

As per coding guidelines: "Prefer parameterized tests through &Параметры(...) when only input data and expectations change." for tests/**/*.os.

Also applies to: 103-123

🤖 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/ТестыМенеджераПараметровКонфигурацииOneScript.os` around lines 49 - 77,
Объедините тесты вариантов входных данных в параметризованный тест с директивой
&Параметры(...): используйте один сценарий для проверки
МенеджерПараметровКонфигурацииOneScript с входами Строка/ФиксированныйМассив и
Неопределено/"". Сохраните общую проверку ожидаемых параметров, изменяя только
входные данные и соответствующие ожидания.

Source: Coding guidelines

🤖 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/BenchmarkOneScript/core/common/Классы/РазрешательВходныхФайловБенчмарков.os`:
- Around line 1-2: Remove the `#Использовать` collectionos dependency and update
the sorting in the benchmark input file resolver to avoid Массивы.Сортировать
and collectionos. Replace that call with a manual sort or another available
built-in approach while preserving direct-order sorting of ПолныеИменаФайлов.

In `@src/BenchmarkOneScript/core/common/Модули/РаботаСПутямиФайловойСистемы.os`:
- Line 1: Canonicalize temporary-directory paths at creation time in the test
helper by resolving symlinks once, so ТекущийКаталог(),
НайтиПолноеИмяФайлаСценария, and СформироватьИсточникиКонфигурации compare the
same physical path representation. Preserve downstream path construction and
test assertions; do not patch the macOS-specific expectations.

In `@tests/ТестыЗапускателяПриложенияСКонфигурациейOneScript.os`:
- Around line 159-163: Replace the parent-process assertion on
ПолучитьПеременнуюСреды("BENCHOS_OSCRIPT_CONFIG_APPLIED") with an assertion
against observable child-process output or another propagated result that
confirms the restart marker was applied exactly once. Preserve the existing
library-load count check and ensure the test fails when the child restart logic
does not execute correctly.

In `@tests/ТестыЛокатораФайловКонфигурацииOneScript.os`:
- Around line 192-206: Обновите проверку в
ТестДолжен_РазрешитьЯвныйФайлБезРасширенияOS так, чтобы ожидаемый и фактический
пути сравнивались в одной канонической форме на macOS, включая нормализацию
префикса /private. Сохраните проверку единственного найденного файла и
используйте существующий механизм нормализации путей, если он доступен.

In `@tests/ТестыМенеджераПараметровКонфигурацииOneScript.os`:
- Around line 228-293: Update the path expectations in
ТестДолжен_ДобавитьКаталогиБиблиотекИзВсехКонфигурацийПоПриоритету to
canonicalize every expected path consistently with the paths produced by
МенеджерПараметровКонфигурацииOneScript and ТекущийКаталог(), including all six
lib.additional entries and lib.system. Reuse the existing path-normalization
helper or established canonicalization flow rather than comparing raw ПолныйПуть
results.

---

Nitpick comments:
In `@src/BenchmarkOneScript/cmd/Классы/ЛокаторФайловКонфигурацииOneScript.os`:
- Around line 82-89: Remove the duplicate ЭтоWindows() implementation from this
file and reuse the existing shared platform-detection helper used by
РаботаСПутямиФайловойСистемы.os and the tests. Update callers as needed so
Windows detection remains unchanged while maintaining a single implementation.

In `@src/BenchmarkOneScript/core/common/Модули/РаботаСПутямиФайловойСистемы.os`:
- Line 1: Export ЭтоWindows() from РаботаСПутямиФайловойСистемы.os, then remove
the duplicated platform-detection implementations in
ЛокаторФайловКонфигурацииOneScript and ТестыЛокатораФайловКонфигурацииOneScript,
replacing their uses with the shared exported helper.

In `@tests/ТестыЛокатораФайловКонфигурацииOneScript.os`:
- Around line 283-290: Remove the duplicate ЭтоWindows() implementation from
this location and reuse the existing consolidated implementation instead,
updating any local references if needed while preserving the Windows platform
detection behavior.

In `@tests/ТестыМенеджераПараметровКонфигурацииOneScript.os`:
- Around line 49-77: Объедините тесты вариантов входных данных в
параметризованный тест с директивой &Параметры(...): используйте один сценарий
для проверки МенеджерПараметровКонфигурацииOneScript с входами
Строка/ФиксированныйМассив и Неопределено/"". Сохраните общую проверку ожидаемых
параметров, изменяя только входные данные и соответствующие ожидания.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: ffac55c5-4dfb-4512-af4d-cf325b0f3450

📥 Commits

Reviewing files that changed from the base of the PR and between 8552fad and eaf3e24.

📒 Files selected for processing (25)
  • .gitignore
  • docs/CLI.md
  • docs/ЗапускБенчмарков.md
  • src/BenchmarkOneScript/cmd/main.os
  • src/BenchmarkOneScript/cmd/Классы/ЗапускательПриложенияСКонфигурациейOneScript.os
  • src/BenchmarkOneScript/cmd/Классы/КомандаЗапуска.os
  • src/BenchmarkOneScript/cmd/Классы/ЛокаторФайловКонфигурацииOneScript.os
  • src/BenchmarkOneScript/core/common/Классы/РазрешательВходныхФайловБенчмарков.os
  • src/BenchmarkOneScript/core/common/Модули/РаботаСПутямиФайловойСистемы.os
  • src/BenchmarkOneScript/core/common/Модули/ЭкранированиеАргументовКоманднойСтроки.os
  • src/BenchmarkOneScript/core/config/Классы/МенеджерПараметровКонфигурацииOneScript.os
  • src/BenchmarkOneScript/core/running/Классы/ЗапускательФайловБенчмарков.os
  • src/BenchmarkOneScript/core/running/Классы/МенеджерПроцессовБенчмарков.os
  • src/BenchmarkOneScript/core/running/Классы/ПодготовительФайлаБенчмарка.os
  • src/BenchmarkOneScript/core/serialization/jason/Классы/ДесериализаторJsonBench.os
  • tests/helpers/Модули/ТестированиеБенчмарков.os
  • tests/helpers/Модули/ТестированиеПроцессов.os
  • tests/ТестыЗапускателяПриложенияСКонфигурациейOneScript.os
  • tests/ТестыЗапускателяФайловБенчмарков.os
  • tests/ТестыЛокатораФайловКонфигурацииOneScript.os
  • tests/ТестыМенеджераПараметровКонфигурацииOneScript.os
  • tests/ТестыМенеджераПроцессовБенчмарков.os
  • tests/ТестыПодготовителяФайлаБенчмарка.os
  • tests/ТестыРазрешателяВходныхФайловБенчмарков.os
  • tests/ТестыСериализатораРезультатовБенчмарков.os

Comment on lines +1 to +2
#Использовать fs
#Использовать collectionos

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🔴 Critical | 🏗️ Heavy lift

#Использовать collectionos fails to load in CI — build-breaking.

Pipeline logs show this exact import failing across multiple macOS runners: OneScript failed to load required library: 'collectionos', breaking ТестДолжен_ИгнорироватьКонфигурациюСтартовогоСценария. This dependency isn't resolvable in the test environment.

🐛 Suggested direction
 `#Использовать` fs
-#Использовать collectionos

Replace Массивы.Сортировать(ПолныеИменаФайлов, СравнениеЗначений.ПрямойПорядок()) (line 81) with a manual sort or a built-in alternative that doesn't require this external library.

🤖 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/BenchmarkOneScript/core/common/Классы/РазрешательВходныхФайловБенчмарков.os`
around lines 1 - 2, Remove the `#Использовать` collectionos dependency and update
the sorting in the benchmark input file resolver to avoid Массивы.Сортировать
and collectionos. Replace that call with a manual sort or another available
built-in approach while preserving direct-order sorting of ПолныеИменаФайлов.

Sources: Learnings, Pipeline failures

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/BenchmarkOneScript/core/config/Классы/МенеджерПараметровКонфигурацииOneScript.os (1)

52-72: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Docstring priority order is now stale.

Порядок приоритета файлов конфигурации: 1. Дополнительные файлы конфигурации в переданном порядке 2. Текущий каталог 3. Каталог программы — but СформироватьИсточникиКонфигурации now inserts the startup-script directory's config between "additional files" and "current directory" (Lines 163-167), which isn't reflected here.

📝 Suggested doc update
 // Порядок приоритета файлов конфигурации:
 //   1. Дополнительные файлы конфигурации в переданном порядке
-//   2. Текущий каталог
-//   3. Каталог программы
+//   2. Каталог стартового сценария
+//   3. Текущий каталог
+//   4. Каталог программы

As per coding guidelines, "Document public methods, constructors, and other program interface elements with comments when touching or adding them."

🤖 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/BenchmarkOneScript/core/config/Классы/МенеджерПараметровКонфигурацииOneScript.os`
around lines 52 - 72, Обновите комментарий перед экспортной функцией Прочитать,
чтобы порядок источников отражал фактическую последовательность
СформироватьИсточникиКонфигурации: после дополнительных файлов укажите
конфигурацию из каталога стартового скрипта, затем текущий каталог и каталог
программы.

Source: Coding guidelines

♻️ Duplicate comments (2)
tests/ТестыМенеджераПараметровКонфигурацииOneScript.os (1)

195-266: 🎯 Functional Correctness | 🔴 Critical

Unresolved: macOS symlink path mismatch in this test — previously flagged.

This test (and the new "current directory" assertions added at Lines 254-263) still compares against ПолныйПуть() (348-352, Новый Файл(...).ПолноеИмя, no symlink resolution) while production resolution (ФС.НормализоватьПуть) canonicalizes symlinks on macOS (e.g. /var/private/var), per prior CI failure logs on this exact test. Since the comparison helper wasn't changed, this failure mode remains for the newly-added assertions too.

🤖 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/ТестыМенеджераПараметровКонфигурацииOneScript.os` around lines 195 -
266, Update the path expectations in
ТестДолжен_ДобавитьКаталогиБиблиотекИзВсехКонфигурацийПоПриоритету, including
the current-configuration assertions, to use the same symlink-resolving
normalization as production’s ФС.НормализоватьПуть instead of ПолныйПуть. Ensure
every compared expected path is canonicalized so macOS `/var` and `/private/var`
representations match.

Source: Pipeline failures

tests/ТестыЗапускателяПриложенияСКонфигурациейOneScript.os (1)

71-143: 🎯 Functional Correctness | 🟡 Minor

Line 141's assertion still doesn't test the restart guard — previously flagged.

The line 141 check reads BENCHOS_OSCRIPT_CONFIG_APPLIED in the parent test process, but per the upstream contract Функция СоздатьИЗапуститьПроцесс... ПеременныеСредыПроцесса.Вставить("BENCHOS_OSCRIPT_CONFIG_APPLIED", "1") only mutates the spawned child's own environment map, not the parent's. Since the parent's copy was blanked at Line 84 and never touched again, this assertion passes regardless of whether the child's "restart once" logic is correct. The library-load count check at Lines 137-140 is the real regression guard and is unaffected.

🤖 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/ТестыЗапускателяПриложенияСКонфигурациейOneScript.os` around lines 71 -
143, Remove the ineffective parent-process assertion on
BENCHOS_OSCRIPT_CONFIG_APPLIED from
ТестДолжен_ОдинРазПерезапуститьRunСКонфигурациямиOneScript, since the child
process environment cannot update it. Keep the existing
КоличествоЗагрузокБиблиотеки assertion as the regression check for the
single-restart behavior.
🧹 Nitpick comments (2)
tests/ТестыМенеджераПараметровКонфигурацииOneScript.os (1)

269-317: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Orphaned helper functions — no test exercises the new startup-script config source.

ТекстСтартовогоСценария, ВыполнитьСтартовыйСценарий, and ПутьКИсполняемомуФайлуOneScript (plus the globals at Lines 10, 20-32 they depend on) are defined but never called by any test in this file. See consolidated comment.

🤖 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/ТестыМенеджераПараметровКонфигурацииOneScript.os` around lines 269 -
317, Remove the unused helper functions ТекстСтартовогоСценария,
ВыполнитьСтартовыйСценарий, and ПутьКИсполняемомуФайлуOneScript, along with the
dependent globals, since no test invokes the startup-script configuration
source. Ensure the remaining tests and setup no longer reference those removed
symbols.
src/BenchmarkOneScript/core/config/Классы/МенеджерПараметровКонфигурацииOneScript.os (1)

153-180: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

New "startup script" config source lacks dedicated test coverage.

The addition at Lines 163-167 introduces a new, higher-priority config source resolved from СтартовыйСценарий().Каталог. This can't be exercised by directly instantiating the manager in-process (the startup script is fixed for the whole process), and no test in the accompanying test file spawns a subprocess to verify it — see the consolidated note.

🤖 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/BenchmarkOneScript/core/config/Классы/МенеджерПараметровКонфигурацииOneScript.os`
around lines 153 - 180, Добавьте отдельный тест для
СформироватьИсточникиКонфигурации, запускающий BenchmarkOneScript в дочернем
процессе с заданным стартовым сценарием и конфигурацией в его каталоге.
Проверьте, что источник из СтартовыйСценарий().Каталог имеет приоритет и его
параметры применяются раньше источников текущего каталога и каталога программы.
🤖 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.

Outside diff comments:
In
`@src/BenchmarkOneScript/core/config/Классы/МенеджерПараметровКонфигурацииOneScript.os`:
- Around line 52-72: Обновите комментарий перед экспортной функцией Прочитать,
чтобы порядок источников отражал фактическую последовательность
СформироватьИсточникиКонфигурации: после дополнительных файлов укажите
конфигурацию из каталога стартового скрипта, затем текущий каталог и каталог
программы.

---

Duplicate comments:
In `@tests/ТестыЗапускателяПриложенияСКонфигурациейOneScript.os`:
- Around line 71-143: Remove the ineffective parent-process assertion on
BENCHOS_OSCRIPT_CONFIG_APPLIED from
ТестДолжен_ОдинРазПерезапуститьRunСКонфигурациямиOneScript, since the child
process environment cannot update it. Keep the existing
КоличествоЗагрузокБиблиотеки assertion as the regression check for the
single-restart behavior.

In `@tests/ТестыМенеджераПараметровКонфигурацииOneScript.os`:
- Around line 195-266: Update the path expectations in
ТестДолжен_ДобавитьКаталогиБиблиотекИзВсехКонфигурацийПоПриоритету, including
the current-configuration assertions, to use the same symlink-resolving
normalization as production’s ФС.НормализоватьПуть instead of ПолныйПуть. Ensure
every compared expected path is canonicalized so macOS `/var` and `/private/var`
representations match.

---

Nitpick comments:
In
`@src/BenchmarkOneScript/core/config/Классы/МенеджерПараметровКонфигурацииOneScript.os`:
- Around line 153-180: Добавьте отдельный тест для
СформироватьИсточникиКонфигурации, запускающий BenchmarkOneScript в дочернем
процессе с заданным стартовым сценарием и конфигурацией в его каталоге.
Проверьте, что источник из СтартовыйСценарий().Каталог имеет приоритет и его
параметры применяются раньше источников текущего каталога и каталога программы.

In `@tests/ТестыМенеджераПараметровКонфигурацииOneScript.os`:
- Around line 269-317: Remove the unused helper functions
ТекстСтартовогоСценария, ВыполнитьСтартовыйСценарий, and
ПутьКИсполняемомуФайлуOneScript, along with the dependent globals, since no test
invokes the startup-script configuration source. Ensure the remaining tests and
setup no longer reference those removed symbols.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a00be6ee-0389-44f8-ae42-0a7ffbfe46d5

📥 Commits

Reviewing files that changed from the base of the PR and between eaf3e24 and 1f534dd.

📒 Files selected for processing (3)
  • src/BenchmarkOneScript/core/config/Классы/МенеджерПараметровКонфигурацииOneScript.os
  • tests/ТестыЗапускателяПриложенияСКонфигурациейOneScript.os
  • tests/ТестыМенеджераПараметровКонфигурацииOneScript.os

@sonar-openbsl-ru-qa-bot

Copy link
Copy Markdown

Failed Quality Gate failed

  • 41 New Issues (is greater than 0)

Project ID: benchmark

View in SonarQube

@Stivo182
Stivo182 merged commit 405315c into main Jul 23, 2026
24 of 32 checks passed
@Stivo182
Stivo182 deleted the fix/benchmark-local-config branch July 23, 2026 12:19
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