Skip to content

docs(runtime): document supported platform pinning - #348

Merged
zeegin merged 1 commit into
mainfrom
codex/issue-321-platform-docs
Aug 6, 2026
Merged

docs(runtime): document supported platform pinning#348
zeegin merged 1 commit into
mainfrom
codex/issue-321-platform-docs

Conversation

@zeegin

@zeegin zeegin commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Что изменено

  • удалена устаревшая рекомендация использовать неподдерживаемые V8_PATH и V8_BASE;
  • описан действующий контракт tools.platform.version и tools.platform.path;
  • показано разделение общего ограничения версии и локального пути через v8project.local.yaml;
  • CI-тест закрепляет актуальные ключи и запрещает возврат неподдерживаемых переменных.

Причина

Раздел был перенесён из старого справочного корпуса и расходился с закреплённым v8-runner 0.5.1: раннер не читает V8_PATH или V8_BASE, а выбирает платформу через tools.platform. Без явного ограничения он намеренно выбирает максимальную найденную версию.

Related to #321.

Проверка

python3.12 -m unittest tests.ci.test_unica_skills tests.ci.test_reference_reachability
Ran 50 tests
OK

Summary by CodeRabbit

  • Documentation
    • Updated runtime build instructions to configure the 1C platform through project settings.
    • Documented version and path matching requirements, including machine-specific local paths.
    • Added a reference to the complete configuration contract.
    • Removed outdated environment-variable guidance.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Platform selection contract

Layer / File(s) Summary
Update platform selection guidance and validation
plugins/unica/references/tooling/runtime-build.md, tests/ci/test_unica_skills.py
The runtime build documentation now uses tools.platform.version and tools.platform.path in project configuration. The test checks these fields, v8project.local.yaml, and removal of V8_PATH and V8_BASE.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: korolevpavel

🚥 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 and concisely describes the main documentation change: supported runtime platform pinning.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-321-platform-docs

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

@zeegin
zeegin marked this pull request as ready for review August 4, 2026 18:06

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

🧹 Nitpick comments (1)
tests/ci/test_unica_skills.py (1)

1470-1474: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Verify the complete platform-selection contract.

These assertions check token presence anywhere in runtime_build. They do not require the document to state v8-runner 0.5.1 or the maximum-version fallback. A later edit can remove the selection rule while all five assertions still pass. Scope the checks to ## Выбор платформы 1С and assert the version-specific behavior.

[details]

Suggested test additions
+        selection = runtime_build.split("## Выбор платформы 1С", 1)[1]
+        self.assertIn("0.5.1", selection)
+        self.assertIn("максимальную найденную версию", selection)

[/details]

🤖 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/ci/test_unica_skills.py` around lines 1470 - 1474, Strengthen the
assertions in the test containing the runtime_build checks by extracting the `##
Выбор платформы 1С` section and validating its version-specific
platform-selection rules, including `v8-runner` version 0.5.1 and the
maximum-version fallback. Keep the existing token and exclusion checks scoped to
that section so unrelated document content cannot satisfy them.
🤖 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 `@plugins/unica/references/tooling/runtime-build.md`:
- Around line 436-439: The platform-selection documentation in
plugins/unica/references/tooling/runtime-build.md (lines 436-439) must
explicitly state the v8-runner version as 0.5.1 and describe its maximum-version
fallback when no platform restriction is provided. Update the CI coverage in
tests/ci/test_unica_skills.py (lines 1470-1474) to verify both the pinned
v8-runner version and maximum-version fallback behavior, rather than checking
only key presence.

---

Nitpick comments:
In `@tests/ci/test_unica_skills.py`:
- Around line 1470-1474: Strengthen the assertions in the test containing the
runtime_build checks by extracting the `## Выбор платформы 1С` section and
validating its version-specific platform-selection rules, including `v8-runner`
version 0.5.1 and the maximum-version fallback. Keep the existing token and
exclusion checks scoped to that section so unrelated document content cannot
satisfy them.
🪄 Autofix

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 Plus

Run ID: 4ba44e53-287c-4630-9472-3bd012e9e5f1

📥 Commits

Reviewing files that changed from the base of the PR and between 7e4ba7d and 520d308.

📒 Files selected for processing (2)
  • plugins/unica/references/tooling/runtime-build.md
  • tests/ci/test_unica_skills.py

Comment on lines +436 to +439
Закреплённый `v8-runner` выбирает платформу по `tools.platform.version` и
`tools.platform.path` в `v8project.yaml` или локальном
`v8project.local.yaml`. Без явного ограничения он использует максимальную
найденную версию. Например, проект может ограничить семейство платформы:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- documentation context ---'
sed -n '410,465p' plugins/unica/references/tooling/runtime-build.md

printf '%s\n' '--- CI test context ---'
sed -n '1435,1495p' tests/ci/test_unica_skills.py

printf '%s\n' '--- relevant references ---'
rg -n -i --glob '!target/**' --glob '!.build/**' --glob '!dist/**' \
  'v8-runner|0\.5\.1|maximum|максималь|tools\.platform\.(version|path)|V8_(PATH|BASE)' \
  plugins/unica tests/ci

Repository: IngvarConsulting/unica

Length of output: 23792


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- current change summary ---'
git status --short
git diff --stat
git diff -- plugins/unica/references/tooling/runtime-build.md tests/ci/test_unica_skills.py

printf '%s\n' '--- project platform contract ---'
sed -n '1,145p' plugins/unica/references/tooling/v8project.md

printf '%s\n' '--- lock metadata ---'
sed -n '52,88p' plugins/unica/third-party/tools.lock.json
sed -n '35,52p' plugins/unica/ATTRIBUTIONS.md

printf '%s\n' '--- provenance and version assertions ---'
sed -n '350,400p' tests/ci/test_skill_provenance.py
sed -n '600,625p' tests/ci/test_skill_provenance.py

Repository: IngvarConsulting/unica

Length of output: 13557


🌐 Web query:

alkoleft v8-runner-rust 0.5.1 tools.platform.version maximum platform version v8project

💡 Result:

In the context of the alkoleft/v8-runner-rust project (a CLI and MCP server for 1C development workflow), v0.5.1 is a specific software release [1]. Regarding your query on configuration and platform version handling: In v0.5.1, the tool supports configuration options such as tools.platform.path and tools.platform.version [2]. These settings allow for pinning the 1C platform for reproducible CI/CD workflows [2]. Specifically: 1. Platform Resolution: The locator mechanism in v0.5.1 matches platform candidates against the configured version [2]. 2. Strict Mode: Subsequent improvements (notably in PR #37) added an opt-in tools.platform.strict mode [3]. When enabled, this enforces a strict path and version resolution policy, ensuring that if a tools.platform.path is provided, the tool performs a fail-closed check rather than falling back to system PATH or other defaults [2][3]. 3. Version Validation: The tool validates exact platform versions and ensures consistency across components like 1cv8, 1cv8c, and ibcmd by requiring them to resolve to the same canonical installation root [3]. There is no native concept of a "maximum platform version" inherent to the v8-runner-rust tool's own configuration schema; rather, it focuses on enforcing the specific version explicitly required by the user to ensure consistency and reliability [2][3]. The "maximum" limitations mentioned in other contexts (like NativeScript or Ionic) refer to SDK or framework compatibility, which are distinct from the version-pinning logic implemented in v8-runner-rust [4][5][6]. If you are encountering issues with platform resolution, ensure that your configuration uses the explicit tools.platform.path and tools.platform.version keys, and consider enabling tools.platform.strict: true to harden the resolution process [2][3].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu

api='https://api.github.com/repos/alkoleft/v8-runner-rust'

printf '%s\n' '--- issue 28 ---'
curl -fsSL "$api/issues/28" | jq '{number,title,state,body,html_url}'

printf '%s\n' '--- pull request 37 ---'
curl -fsSL "$api/pulls/37" | jq '{number,title,state,merged,body,html_url,merge_commit_sha}'

printf '%s\n' '--- release 0.5.1 ---'
curl -fsSL "$api/releases/tags/v0.5.1" | jq '{tag_name,target_commitish,name,body,html_url}'

printf '%s\n' '--- source tree at locked source commit ---'
curl -fsSL "$api/git/trees/72d346c0a8fcf8373d9388257d11e6bef0ad70b2?recursive=1" |
  jq -r '.tree[] | select(.path | test("platform|locat|config|project|version"; "i")) | "\(.type)\t\(.path)"' |
  head -120

Repository: IngvarConsulting/unica

Length of output: 463


🌐 Web query:

site:github.com/alkoleft/v8-runner-rust/issues/28 "tools.platform"

💡 Result:

GitHub Issue #28: “platform locator: path hint должен быть fail-closed и проверять version”.

It reports that tools.platform.path and tools.platform.version are not enforced together: mismatched or invalid paths can silently fall back to another installation via default roots or PATH. Proposed fix: strict fail-closed behavior, version validation, consistent installation roots, and resolution metadata. [1]

[1] (github.com)

Citations:


🌐 Web query:

site:github.com/alkoleft/v8-runner-rust/pull/37 "tools.platform"

💡 Result:

No indexed results were found for:

site:github.com/alkoleft/v8-runner-rust/pull/37 "tools.platform"


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
import io
import tarfile
import urllib.request

urls = {
    "v0.5.1": "https://codeload.github.com/alkoleft/v8-runner-rust/tar.gz/refs/tags/v0.5.1",
    "locked-source-commit": "https://codeload.github.com/alkoleft/v8-runner-rust/tar.gz/72d346c0a8fcf8373d9388257d11e6bef0ad70b2",
}

needles = (
    "tools.platform",
    "platform.version",
    "platform.path",
    "max",
    "maximum",
    "strict",
    "PATH",
)

for label, url in urls.items():
    print(f"--- {label} ---")
    try:
        data = urllib.request.urlopen(url, timeout=30).read()
    except Exception as exc:
        print(f"download failed: {exc}")
        continue

    with tarfile.open(fileobj=io.BytesIO(data), mode="r:gz") as archive:
        matches = []
        for member in archive.getmembers():
            if not member.isfile():
                continue
            try:
                text = archive.extractfile(member).read().decode("utf-8")
            except (UnicodeDecodeError, AttributeError):
                continue
            if any(needle in text for needle in needles):
                matches.append((member.name, text))

        print("matching files:", len(matches))
        for name, text in matches:
            print(f"### {name}")
            lines = text.splitlines()
            for number, line in enumerate(lines, 1):
                if any(needle in line for needle in needles):
                    start = max(1, number - 3)
                    end = min(len(lines), number + 5)
                    for i in range(start, end + 1):
                        print(f"{i}: {lines[i-1]}")
                    print()
PY

Repository: IngvarConsulting/unica

Length of output: 508


🌐 Web query:

"platform locator" "path hint" "v8-runner"

💡 Result:

In the context of v8-runner-rust, a tool for local 1C:Enterprise development workflows, a platform locator path hint refers to a configuration setting used to specify the directory path of the 1C:Enterprise platform installation [1][2]. The path hint mechanism in v8-runner-rust is designed to locate the required platform executables (such as 1cv8, 1cv8c, or ibcmd) [1]. Technical details regarding this feature include: 1. Functionality: The platform locator attempts to resolve the path specified by the configuration hint [1]. If the hint is missing or invalid, it typically falls back to searching other locations, including hint roots, default installation roots, and the system PATH [1]. 2. Strict Mode: Recent updates (e.g., in v8-runner-rust version 0.5.1 and subsequent patches) introduced a strict mode, configurable via tools.platform.strict [3]. When enabled, the locator becomes fail-closed: if the specified path hint does not contain the required executable or fails to match the configured version, it returns an error instead of falling back to a different platform installation [1][3]. 3. Consistency: In strict mode, the locator enforces that 1cv8, 1cv8c, and ibcmd are all resolved from the same canonical installation root to ensure consistency [3]. This path hint is part of the broader configuration for managing platform versions and ensuring reproducible environments for CI/CD and local development [1]. It should not be confused with similarly named concepts in other technologies, such as Adobe's location hints for network routing [4] or CMake's find_path command [5].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu

for ref in 'refs/tags/v0.5.1' '72d346c0a8fcf8373d9388257d11e6bef0ad70b2'; do
  printf '\n--- %s ---\n' "$ref"
  curl -kfsSL "https://codeload.github.com/alkoleft/v8-runner-rust/tar.gz/$ref" |
    python3 -c '
import io, sys, tarfile

needles = (
    "tools.platform", "platform.version", "platform.path",
    "max", "maximum", "strict", "PATH",
)
data = sys.stdin.buffer.read()
with tarfile.open(fileobj=io.BytesIO(data), mode="r:gz") as archive:
    for member in archive.getmembers():
        if not member.isfile():
            continue
        try:
            text = archive.extractfile(member).read().decode("utf-8")
        except (UnicodeDecodeError, AttributeError):
            continue
        lines = text.splitlines()
        hits = [i for i, line in enumerate(lines) if any(n in line for n in needles)]
        if not hits:
            continue
        print(f"### {member.name}")
        emitted = set()
        for hit in hits:
            for i in range(max(0, hit - 3), min(len(lines), hit + 6)):
                if i not in emitted:
                    print(f"{i + 1}: {lines[i]}")
                    emitted.add(i)
            print()
'
done

Repository: IngvarConsulting/unica

Length of output: 50379


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- repository commit context ---'
git log -1 --oneline --decorate
git show --stat --oneline HEAD
git show --format=fuller --no-ext-diff HEAD -- \
  plugins/unica/references/tooling/runtime-build.md \
  tests/ci/test_unica_skills.py \
  plugins/unica/third-party/tools.lock.json \
  plugins/unica/ATTRIBUTIONS.md

printf '%s\n' '--- exact upstream resolver and decision excerpts ---'
for ref in 'refs/tags/v0.5.1' '72d346c0a8fcf8373d9388257d11e6bef0ad70b2'; do
  printf '\n### %s\n' "$ref"
  curl -kfsSL "https://codeload.github.com/alkoleft/v8-runner-rust/tar.gz/$ref" |
    python3 -c '
import io, sys, tarfile

data = sys.stdin.buffer.read()
wanted = (
    "src/platform/locator.rs",
    "src/platform/version.rs",
    "spec/decisions/0004-avtoobnaruzhivat-komponenty-platformy-1s-po-versii-maske.md",
    "Cargo.toml",
)
with tarfile.open(fileobj=io.BytesIO(data), mode="r:gz") as archive:
    for member in archive.getmembers():
        if not member.isfile() or not any(member.name.endswith(path) for path in wanted):
            continue
        try:
            text = archive.extractfile(member).read().decode("utf-8")
        except (UnicodeDecodeError, AttributeError):
            continue
        print(f"--- {member.name} ---")
        lines = text.splitlines()
        for i, line in enumerate(lines):
            if any(term in line for term in (
                "PlatformVersionRequirement", "max_by", "maximum", "version",
                "strict", "tools.platform", "0.5.1",
            )):
                start = max(0, i - 2)
                end = min(len(lines), i + 4)
                for j in range(start, end):
                    print(f"{j + 1}: {lines[j]}")
                print()
'
done

Repository: IngvarConsulting/unica

Length of output: 50380


Keep the v8-runner 0.5.1 platform-selection contract consistent.

State v8-runner 0.5.1 and its maximum-version fallback in runtime-build.md. Extend the CI test to check both rules, not only key presence.

📍 Affects 2 files
  • plugins/unica/references/tooling/runtime-build.md#L436-L439 (this comment)
  • tests/ci/test_unica_skills.py#L1470-L1474
🤖 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 `@plugins/unica/references/tooling/runtime-build.md` around lines 436 - 439,
The platform-selection documentation in
plugins/unica/references/tooling/runtime-build.md (lines 436-439) must
explicitly state the v8-runner version as 0.5.1 and describe its maximum-version
fallback when no platform restriction is provided. Update the CI coverage in
tests/ci/test_unica_skills.py (lines 1470-1474) to verify both the pinned
v8-runner version and maximum-version fallback behavior, rather than checking
only key presence.

@zeegin
zeegin merged commit a222c7b into main Aug 6, 2026
17 checks passed
@zeegin zeegin added this to the v0.12 milestone Aug 9, 2026
@zeegin
zeegin deleted the codex/issue-321-platform-docs branch August 16, 2026 21:21
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