From bcbc79c4154eccab928decf3b87a8c5889a52fd3 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sat, 26 Sep 2026 22:15:47 +0300 Subject: [PATCH] =?UTF-8?q?feat(interface-validate):=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=2014=20=E2=80=94=20=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=81=D0=B8=D1=8F=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=20=D0=BA=D0=B0=D0=BA=20=D1=83=20=D0=B2=D0=BB=D0=B0=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D1=86=D0=B0;=20=D1=81=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=81=20=D0=B2=D1=8B=D0=B3=D1=80=D1=83=D0=B7?= =?UTF-8?q?=D0=BA=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Командный интерфейс и его владелец — дескриптор подсистемы или Configuration.xml (для Ext/CommandInterface.xml и Ext/MainSectionCommandInterface.xml конфигурации) — платформа загружает только в одной версии формата («Версия формата загружаемого файла … отличается от версии формата ранее загруженных файлов»), проверено на 8.3.27.1859. Расхождение с владельцем — ошибка. Подсистема целиком в другой версии, чем выгрузка, грузится — это лишь неоднородность выгрузки, поэтому такое расхождение только предупреждение. Co-Authored-By: Sergei Pleshanov <2357qwr@gmail.com> Co-Authored-By: Claude Opus 5.5 (1M context) --- .../scripts/interface-validate.ps1 | 77 +++++- .../scripts/interface-validate.py | 87 +++++- .../error-version-differs-from-owner.json | 9 + .../ci-version-agree/Catalogs/Товары.xml | 91 +++++++ .../Catalogs/Товары/Ext/ObjectModule.bsl | 1 + .../ci-version-agree/Configuration.xml | 257 ++++++++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 ++ .../ci-version-agree/Languages/Русский.xml | 16 ++ .../ci-version-agree/Subsystems/Склад.xml | 24 ++ .../Subsystems/Склад/Ext/CommandInterface.xml | 6 + .../ci-version-differs/Catalogs/Товары.xml | 91 +++++++ .../Catalogs/Товары/Ext/ObjectModule.bsl | 1 + .../ci-version-differs/Configuration.xml | 257 ++++++++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 ++ .../ci-version-differs/Languages/Русский.xml | 16 ++ .../ci-version-differs/Subsystems/Склад.xml | 24 ++ .../Subsystems/Склад/Ext/CommandInterface.xml | 6 + .../Catalogs/Товары.xml | 91 +++++++ .../Catalogs/Товары/Ext/ObjectModule.bsl | 1 + .../Configuration.xml | 257 ++++++++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 ++ .../Languages/Русский.xml | 16 ++ .../Subsystems/Склад.xml | 24 ++ .../Subsystems/Склад/Ext/CommandInterface.xml | 6 + .../valid-version-matches-owner.json | 7 + .../warn-version-differs-from-dump.json | 10 + tests/skills/check-inline-drift.mjs | 8 +- 27 files changed, 1431 insertions(+), 6 deletions(-) create mode 100644 tests/skills/cases/interface-validate/error-version-differs-from-owner.json create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-agree/Catalogs/Товары.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-agree/Catalogs/Товары/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-agree/Configuration.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-agree/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-agree/Languages/Русский.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-agree/Subsystems/Склад.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-agree/Subsystems/Склад/Ext/CommandInterface.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-differs/Catalogs/Товары.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-differs/Catalogs/Товары/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-differs/Configuration.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-differs/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-differs/Languages/Русский.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-differs/Subsystems/Склад.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-differs/Subsystems/Склад/Ext/CommandInterface.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Catalogs/Товары.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Catalogs/Товары/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Configuration.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Languages/Русский.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Subsystems/Склад.xml create mode 100644 tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Subsystems/Склад/Ext/CommandInterface.xml create mode 100644 tests/skills/cases/interface-validate/valid-version-matches-owner.json create mode 100644 tests/skills/cases/interface-validate/warn-version-differs-from-dump.json diff --git a/.claude/skills/interface-validate/scripts/interface-validate.ps1 b/.claude/skills/interface-validate/scripts/interface-validate.ps1 index fa34b5327..d564a3282 100644 --- a/.claude/skills/interface-validate/scripts/interface-validate.ps1 +++ b/.claude/skills/interface-validate/scripts/interface-validate.ps1 @@ -1,4 +1,4 @@ -# interface-validate v1.4 — Validate 1C CommandInterface.xml structure +# interface-validate v1.5 — Validate 1C CommandInterface.xml structure # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills [CmdletBinding(PositionalBinding=$false)] param( @@ -11,6 +11,61 @@ param( $ErrorActionPreference = "Stop" [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 +# Штамп версии формата — атрибут version КОРНЕВОГО элемента файла. Копия общего эталона (семья +# root_version, авторитет — meta-validate). +function Get-RootVersion([string]$xmlPath) { + if (-not (Test-Path -LiteralPath $xmlPath -PathType Leaf)) { return $null } + $buf = New-Object byte[] 4096 + $fs = [System.IO.File]::OpenRead($xmlPath) + try { $len = $fs.Read($buf, 0, $buf.Length) } finally { $fs.Dispose() } + $head = [System.Text.Encoding]::UTF8.GetString($buf, 0, $len) + $m = [regex]::Match($head, '<[A-Za-z_][\w.:-]*(\s[^>]*)?/?>') + if (-not $m.Success) { return $null } + $v = [regex]::Match($m.Groups[1].Value, '(?:^|\s)version="([^"]*)"') + if ($v.Success) { return $v.Groups[1].Value } + return $null +} + +# Корень автономной внешней обработки/отчёта. Копия общего эталона (семья is_external_root, +# авторитет — cf-edit). +function Test-ExternalObjectRoot([string]$xmlPath) { + if (-not (Test-Path $xmlPath)) { return $false } + try { + [xml]$mx = Get-Content -Path $xmlPath -Encoding UTF8 + $el = $mx.DocumentElement.FirstChild + while ($el -and $el.NodeType -ne 'Element') { $el = $el.NextSibling } + if ($el) { return @('ExternalDataProcessor','ExternalReport') -contains $el.LocalName } + } catch {} + return $false +} + +# Якорь выгрузки: корень автономной EPF/ERF либо Configuration.xml, ближайший вверх. Копия общего +# эталона (семья find_dump_anchor, авторитет — meta-validate). +function Find-DumpAnchor([string]$startDir) { + $d = $startDir + for ($i = 0; $i -lt 15 -and $d; $i++) { + if (Test-ExternalObjectRoot "$d.xml") { return "$d.xml" } + $cfg = Join-Path $d "Configuration.xml" + if (Test-Path $cfg) { return $cfg } + $parent = [System.IO.Path]::GetDirectoryName($d) + if (-not $parent -or $parent -eq $d) { break } + $d = $parent + } + return $null +} + +# Владелец тела X/Ext/<файл>.xml — дескриптор X.xml рядом с каталогом X; у тел конфигурации — +# Configuration.xml. Копия общего эталона (семья ext_body_owner, авторитет — form-validate). +function Get-ExtBodyOwner([string]$bodyPath) { + $extDir = [System.IO.Path]::GetDirectoryName($bodyPath) + if ([System.IO.Path]::GetFileName($extDir) -cne "Ext") { return $null } + $objDir = [System.IO.Path]::GetDirectoryName($extDir) + if (Test-Path -LiteralPath "$objDir.xml" -PathType Leaf) { return "$objDir.xml" } + $cfg = Join-Path $objDir "Configuration.xml" + if (Test-Path -LiteralPath $cfg -PathType Leaf) { return $cfg } + return $null +} + # --- Resolve path --- if (-not [System.IO.Path]::IsPathRooted($CIPath)) { $CIPath = Join-Path (Get-Location).Path $CIPath @@ -384,6 +439,26 @@ if (-not $script:stopped) { } } +# --- Check 14: версия формата — как у владельца (подсистемы или конфигурации); сверка с выгрузкой --- +# Командный интерфейс и его владелец — дескриптор подсистемы или Configuration.xml — платформа +# загружает только в одной версии формата: «Версия формата загружаемого файла … отличается от версии +# формата ранее загруженных файлов». С остальной выгрузкой владелец может расходиться — платформа +# такое грузит, это лишь неоднородность выгрузки (типично после мержа веток, выгруженных разными +# платформами). +if (-not $script:stopped -and $version) { + $ownerPath = Get-ExtBodyOwner $resolvedPath + $ownerVer = if ($ownerPath) { Get-RootVersion $ownerPath } else { $null } + $dumpAnchor = Find-DumpAnchor (Split-Path $resolvedPath -Parent) + $dumpVer = if ($dumpAnchor) { Get-RootVersion $dumpAnchor } else { $null } + if ($ownerVer -and $version -ne $ownerVer) { + Report-Error "14. Format version $version differs from its owner $([System.IO.Path]::GetFileName($ownerPath)) ($ownerVer) — the platform refuses to load parts of one object in different formats" + } elseif ($dumpVer -and $version -ne $dumpVer) { + Report-Warn "14. Format version $version differs from the dump ($dumpVer) — the platform loads it, but the dump is no longer uniform (typical after merging branches dumped by different platforms)" + } elseif ($ownerVer -or $dumpVer) { + Report-OK "14. Format version: $version, matches the owner and the dump" + } +} + # --- Finalize --- $checks = $script:okCount + $script:errors + $script:warnings diff --git a/.claude/skills/interface-validate/scripts/interface-validate.py b/.claude/skills/interface-validate/scripts/interface-validate.py index 14844b516..10bac8c12 100644 --- a/.claude/skills/interface-validate/scripts/interface-validate.py +++ b/.claude/skills/interface-validate/scripts/interface-validate.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# interface-validate v1.4 — Validate 1C CommandInterface.xml structure +# interface-validate v1.5 — Validate 1C CommandInterface.xml structure # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills """Validates CommandInterface.xml sections, command references, order, duplicates.""" import sys, os, argparse, re @@ -95,6 +95,71 @@ def find_duplicates(items): return dupes +# Штамп версии формата — атрибут version КОРНЕВОГО элемента файла. Копия общего эталона (семья +# root_version, авторитет — meta-validate). +def root_version(xml_path): + if not os.path.isfile(xml_path): + return None + with open(xml_path, "rb") as f: + head = f.read(4096).decode("utf-8", errors="ignore") + m = re.search(r'<[A-Za-z_][\w.:-]*(\s[^>]*)?/?>', head) + if not m: + return None + v = re.search(r'(?:^|\s)version="([^"]*)"', m.group(1) or "") + if v: + return v.group(1) + return None + + +# Корень автономной внешней обработки/отчёта. Копия общего эталона (семья is_external_root, +# авторитет — cf-edit). +def _sg_is_external_root(xml_path): + if not os.path.isfile(xml_path): + return False + try: + mx = etree.parse(xml_path).getroot() + for child in mx: + if isinstance(child.tag, str): + return child.tag.split("}")[-1] in ("ExternalDataProcessor", "ExternalReport") + except Exception: + return False + return False + + +# Якорь выгрузки: корень автономной EPF/ERF либо Configuration.xml, ближайший вверх. Копия общего +# эталона (семья find_dump_anchor, авторитет — meta-validate). +def find_dump_anchor(start_dir): + d = start_dir + for _ in range(15): + if not d: + break + if _sg_is_external_root(d + ".xml"): + return d + ".xml" + cfg = os.path.join(d, "Configuration.xml") + if os.path.exists(cfg): + return cfg + parent = os.path.dirname(d) + if not parent or parent == d: + break + d = parent + return None + + +# Владелец тела X/Ext/<файл>.xml — дескриптор X.xml рядом с каталогом X; у тел конфигурации — +# Configuration.xml. Копия общего эталона (семья ext_body_owner, авторитет — form-validate). +def ext_body_owner(body_path): + ext_dir = os.path.dirname(body_path) + if os.path.basename(ext_dir) != "Ext": + return None + obj_dir = os.path.dirname(ext_dir) + if os.path.isfile(obj_dir + ".xml"): + return obj_dir + ".xml" + cfg = os.path.join(obj_dir, "Configuration.xml") + if os.path.isfile(cfg): + return cfg + return None + + def main(): sys.stdout.reconfigure(encoding="utf-8") sys.stderr.reconfigure(encoding="utf-8") @@ -397,6 +462,26 @@ def main(): suffix = ' ...' if len(bad_refs) > 5 else '' r.warn(f'13. Command reference format: {len(bad_refs)} unrecognized: {", ".join(shown)}{suffix}') + # --- 14. Format version: как у владельца (подсистемы или конфигурации); сверка с выгрузкой --- + # Командный интерфейс и его владелец — дескриптор подсистемы или Configuration.xml — платформа + # загружает только в одной версии формата: «Версия формата загружаемого файла … отличается от версии + # формата ранее загруженных файлов». С остальной выгрузкой владелец может расходиться — платформа + # такое грузит, это лишь неоднородность выгрузки (типично после мержа веток, выгруженных разными + # платформами). + if not r.stopped and version: + owner_path = ext_body_owner(resolved_path) + owner_ver = root_version(owner_path) if owner_path else None + dump_anchor = find_dump_anchor(os.path.dirname(resolved_path)) + dump_ver = root_version(dump_anchor) if dump_anchor else None + if owner_ver and version != owner_ver: + r.error(f'14. Format version {version} differs from its owner {os.path.basename(owner_path)} ' + f'({owner_ver}) — the platform refuses to load parts of one object in different formats') + elif dump_ver and version != dump_ver: + r.warn(f'14. Format version {version} differs from the dump ({dump_ver}) — the platform loads it, ' + 'but the dump is no longer uniform (typical after merging branches dumped by different platforms)') + elif owner_ver or dump_ver: + r.ok(f'14. Format version: {version}, matches the owner and the dump') + # --- Finalize --- checks = r.ok_count + r.errors + r.warnings if r.errors == 0 and r.warnings == 0 and not detailed: diff --git a/tests/skills/cases/interface-validate/error-version-differs-from-owner.json b/tests/skills/cases/interface-validate/error-version-differs-from-owner.json new file mode 100644 index 000000000..fe34605c9 --- /dev/null +++ b/tests/skills/cases/interface-validate/error-version-differs-from-owner.json @@ -0,0 +1,9 @@ +{ + "name": "Командный интерфейс 2.18 при дескрипторе подсистемы 2.20 — ошибка: платформа такую подсистему не загрузит", + "setup": "fixture:ci-version-differs", + "params": { "ciPath": "Subsystems/Склад/Ext/CommandInterface.xml" }, + "expectError": true, + "noSnapshot": "interface-validate только читает и печатает — эталон зафиксировал бы фикстуру, а не выход проверяемого навыка; проверяется stdout", + "expect": { "stdoutContains": ["[ERROR] 14. Format version 2.18 differs from its owner Склад.xml (2.20)"] }, + "skipPlatformVerify": "фикстура намеренно не загружается: командный интерфейс и дескриптор подсистемы в разных версиях формата" +} diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Catalogs/Товары.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Catalogs/Товары.xml new file mode 100644 index 000000000..24289f7ea --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Catalogs/Товары.xml @@ -0,0 +1,91 @@ + + + + + + 51817524-0f51-477b-a7c7-1d138827d74e + 97a1c4d0-6128-45db-ab0c-7266a602316f + + + cbb1f27e-a394-42ba-b66e-62302b91c23e + 797982e6-63e0-4d0a-8864-eba03a24b569 + + + a8195e0f-2517-447d-ae31-9963e54dce59 + 2ea7dad5-4eb4-4357-a778-4cacd99cf6fc + + + 7dee1910-f5a7-4ef8-8627-c2719a9a18a3 + 749266d7-1797-470b-8204-4cf8d8a65395 + + + a1d85fe4-e316-4ab4-9b2b-945d41e93893 + e7a7760f-05d2-4a1b-ba5a-31e71d50662d + + + + Товары + + + ru + Товары + + + + false + HierarchyFoldersAndItems + false + 2 + true + true + + ToItems + 9 + 25 + String + Variable + WholeCatalog + false + true + AsDescription + + Auto + InDialog + false + BothWays + + Catalog.Товары.StandardAttribute.Description + Catalog.Товары.StandardAttribute.Code + + Begin + DontUse + Directly + + + + + + + + + + + false + + + Managed + Use + + + + + + Use + Auto + DontUse + false + false + + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Catalogs/Товары/Ext/ObjectModule.bsl b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Catalogs/Товары/Ext/ObjectModule.bsl new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Catalogs/Товары/Ext/ObjectModule.bsl @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Configuration.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Configuration.xml new file mode 100644 index 000000000..2fa0a5073 --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Configuration.xml @@ -0,0 +1,257 @@ + + + + + + 9cd510cd-abfc-11d4-9434-004095e12fc7 + 0ad62760-b331-4346-8e8b-3e42b90a60c4 + + + 9fcd25a0-4822-11d4-9414-008048da11f9 + 9614422d-809e-4c50-8feb-efef235571fb + + + e3687481-0a87-462c-a166-9f34594f9bba + 41f6317a-5456-43db-97a2-33c31681aee3 + + + 9de14907-ec23-4a07-96f0-85521cb6b53b + 7bbf04ce-053d-4bd1-9502-df44d2c14b6d + + + 51f2d5d8-ea4d-4064-8892-82951750031e + 834b09af-82fa-42ed-9a97-05202b126864 + + + e68182ea-4237-4383-967f-90c1e3370bc7 + 1bdafb28-bc70-4011-8de1-63af7a7ebc07 + + + fb282519-d103-4dd3-bc12-cb271d631dfc + a6e1fc3f-c614-42cf-a681-36646a1f56b7 + + + + ПроверкаВерсий + + + ru + ПроверкаВерсий + + + + + Version8_3_27 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + TextToSpeech + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_27 + + + + Русский + Склад + Товары + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Ext/ClientApplicationInterface.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Ext/ClientApplicationInterface.xml new file mode 100644 index 000000000..e10c2790c --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + cbab57f2-a0f3-4f0a-89ea-4cb19570ab75 + + + + + b553047f-c9aa-4157-978d-448ecad24248 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Languages/Русский.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Languages/Русский.xml new file mode 100644 index 000000000..39e8b5bd6 --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Subsystems/Склад.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Subsystems/Склад.xml new file mode 100644 index 000000000..d3c69ce44 --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Subsystems/Склад.xml @@ -0,0 +1,24 @@ + + + + + Склад + + + ru + Склад + + + + true + true + false + + + + Catalog.Товары + + + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Subsystems/Склад/Ext/CommandInterface.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Subsystems/Склад/Ext/CommandInterface.xml new file mode 100644 index 000000000..4e7d40103 --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-agree/Subsystems/Склад/Ext/CommandInterface.xml @@ -0,0 +1,6 @@ + + + + false + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Catalogs/Товары.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Catalogs/Товары.xml new file mode 100644 index 000000000..24289f7ea --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Catalogs/Товары.xml @@ -0,0 +1,91 @@ + + + + + + 51817524-0f51-477b-a7c7-1d138827d74e + 97a1c4d0-6128-45db-ab0c-7266a602316f + + + cbb1f27e-a394-42ba-b66e-62302b91c23e + 797982e6-63e0-4d0a-8864-eba03a24b569 + + + a8195e0f-2517-447d-ae31-9963e54dce59 + 2ea7dad5-4eb4-4357-a778-4cacd99cf6fc + + + 7dee1910-f5a7-4ef8-8627-c2719a9a18a3 + 749266d7-1797-470b-8204-4cf8d8a65395 + + + a1d85fe4-e316-4ab4-9b2b-945d41e93893 + e7a7760f-05d2-4a1b-ba5a-31e71d50662d + + + + Товары + + + ru + Товары + + + + false + HierarchyFoldersAndItems + false + 2 + true + true + + ToItems + 9 + 25 + String + Variable + WholeCatalog + false + true + AsDescription + + Auto + InDialog + false + BothWays + + Catalog.Товары.StandardAttribute.Description + Catalog.Товары.StandardAttribute.Code + + Begin + DontUse + Directly + + + + + + + + + + + false + + + Managed + Use + + + + + + Use + Auto + DontUse + false + false + + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Catalogs/Товары/Ext/ObjectModule.bsl b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Catalogs/Товары/Ext/ObjectModule.bsl new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Catalogs/Товары/Ext/ObjectModule.bsl @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Configuration.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Configuration.xml new file mode 100644 index 000000000..2fa0a5073 --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Configuration.xml @@ -0,0 +1,257 @@ + + + + + + 9cd510cd-abfc-11d4-9434-004095e12fc7 + 0ad62760-b331-4346-8e8b-3e42b90a60c4 + + + 9fcd25a0-4822-11d4-9414-008048da11f9 + 9614422d-809e-4c50-8feb-efef235571fb + + + e3687481-0a87-462c-a166-9f34594f9bba + 41f6317a-5456-43db-97a2-33c31681aee3 + + + 9de14907-ec23-4a07-96f0-85521cb6b53b + 7bbf04ce-053d-4bd1-9502-df44d2c14b6d + + + 51f2d5d8-ea4d-4064-8892-82951750031e + 834b09af-82fa-42ed-9a97-05202b126864 + + + e68182ea-4237-4383-967f-90c1e3370bc7 + 1bdafb28-bc70-4011-8de1-63af7a7ebc07 + + + fb282519-d103-4dd3-bc12-cb271d631dfc + a6e1fc3f-c614-42cf-a681-36646a1f56b7 + + + + ПроверкаВерсий + + + ru + ПроверкаВерсий + + + + + Version8_3_27 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + TextToSpeech + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_27 + + + + Русский + Склад + Товары + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Ext/ClientApplicationInterface.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Ext/ClientApplicationInterface.xml new file mode 100644 index 000000000..e10c2790c --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + cbab57f2-a0f3-4f0a-89ea-4cb19570ab75 + + + + + b553047f-c9aa-4157-978d-448ecad24248 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Languages/Русский.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Languages/Русский.xml new file mode 100644 index 000000000..39e8b5bd6 --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Subsystems/Склад.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Subsystems/Склад.xml new file mode 100644 index 000000000..d3c69ce44 --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Subsystems/Склад.xml @@ -0,0 +1,24 @@ + + + + + Склад + + + ru + Склад + + + + true + true + false + + + + Catalog.Товары + + + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Subsystems/Склад/Ext/CommandInterface.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Subsystems/Склад/Ext/CommandInterface.xml new file mode 100644 index 000000000..eab47eb6d --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-differs/Subsystems/Склад/Ext/CommandInterface.xml @@ -0,0 +1,6 @@ + + + + false + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Catalogs/Товары.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Catalogs/Товары.xml new file mode 100644 index 000000000..24289f7ea --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Catalogs/Товары.xml @@ -0,0 +1,91 @@ + + + + + + 51817524-0f51-477b-a7c7-1d138827d74e + 97a1c4d0-6128-45db-ab0c-7266a602316f + + + cbb1f27e-a394-42ba-b66e-62302b91c23e + 797982e6-63e0-4d0a-8864-eba03a24b569 + + + a8195e0f-2517-447d-ae31-9963e54dce59 + 2ea7dad5-4eb4-4357-a778-4cacd99cf6fc + + + 7dee1910-f5a7-4ef8-8627-c2719a9a18a3 + 749266d7-1797-470b-8204-4cf8d8a65395 + + + a1d85fe4-e316-4ab4-9b2b-945d41e93893 + e7a7760f-05d2-4a1b-ba5a-31e71d50662d + + + + Товары + + + ru + Товары + + + + false + HierarchyFoldersAndItems + false + 2 + true + true + + ToItems + 9 + 25 + String + Variable + WholeCatalog + false + true + AsDescription + + Auto + InDialog + false + BothWays + + Catalog.Товары.StandardAttribute.Description + Catalog.Товары.StandardAttribute.Code + + Begin + DontUse + Directly + + + + + + + + + + + false + + + Managed + Use + + + + + + Use + Auto + DontUse + false + false + + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Catalogs/Товары/Ext/ObjectModule.bsl b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Catalogs/Товары/Ext/ObjectModule.bsl new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Catalogs/Товары/Ext/ObjectModule.bsl @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Configuration.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Configuration.xml new file mode 100644 index 000000000..2fa0a5073 --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Configuration.xml @@ -0,0 +1,257 @@ + + + + + + 9cd510cd-abfc-11d4-9434-004095e12fc7 + 0ad62760-b331-4346-8e8b-3e42b90a60c4 + + + 9fcd25a0-4822-11d4-9414-008048da11f9 + 9614422d-809e-4c50-8feb-efef235571fb + + + e3687481-0a87-462c-a166-9f34594f9bba + 41f6317a-5456-43db-97a2-33c31681aee3 + + + 9de14907-ec23-4a07-96f0-85521cb6b53b + 7bbf04ce-053d-4bd1-9502-df44d2c14b6d + + + 51f2d5d8-ea4d-4064-8892-82951750031e + 834b09af-82fa-42ed-9a97-05202b126864 + + + e68182ea-4237-4383-967f-90c1e3370bc7 + 1bdafb28-bc70-4011-8de1-63af7a7ebc07 + + + fb282519-d103-4dd3-bc12-cb271d631dfc + a6e1fc3f-c614-42cf-a681-36646a1f56b7 + + + + ПроверкаВерсий + + + ru + ПроверкаВерсий + + + + + Version8_3_27 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + TextToSpeech + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_27 + + + + Русский + Склад + Товары + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Ext/ClientApplicationInterface.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Ext/ClientApplicationInterface.xml new file mode 100644 index 000000000..e10c2790c --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + cbab57f2-a0f3-4f0a-89ea-4cb19570ab75 + + + + + b553047f-c9aa-4157-978d-448ecad24248 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Languages/Русский.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Languages/Русский.xml new file mode 100644 index 000000000..39e8b5bd6 --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Subsystems/Склад.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Subsystems/Склад.xml new file mode 100644 index 000000000..2eb3c9cee --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Subsystems/Склад.xml @@ -0,0 +1,24 @@ + + + + + Склад + + + ru + Склад + + + + true + true + false + + + + Catalog.Товары + + + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Subsystems/Склад/Ext/CommandInterface.xml b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Subsystems/Склад/Ext/CommandInterface.xml new file mode 100644 index 000000000..eab47eb6d --- /dev/null +++ b/tests/skills/cases/interface-validate/fixtures/ci-version-subsystem-older/Subsystems/Склад/Ext/CommandInterface.xml @@ -0,0 +1,6 @@ + + + + false + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/valid-version-matches-owner.json b/tests/skills/cases/interface-validate/valid-version-matches-owner.json new file mode 100644 index 000000000..1b26a33de --- /dev/null +++ b/tests/skills/cases/interface-validate/valid-version-matches-owner.json @@ -0,0 +1,7 @@ +{ + "name": "Командный интерфейс в версии своей подсистемы и выгрузки — чисто", + "setup": "fixture:ci-version-agree", + "params": { "ciPath": "Subsystems/Склад/Ext/CommandInterface.xml" }, + "noSnapshot": "interface-validate только читает и печатает — эталон зафиксировал бы фикстуру, а не выход проверяемого навыка; проверяется stdout", + "expect": { "stdoutContains": ["=== Validation OK: CommandInterface (Склад)"] } +} diff --git a/tests/skills/cases/interface-validate/warn-version-differs-from-dump.json b/tests/skills/cases/interface-validate/warn-version-differs-from-dump.json new file mode 100644 index 000000000..436460307 --- /dev/null +++ b/tests/skills/cases/interface-validate/warn-version-differs-from-dump.json @@ -0,0 +1,10 @@ +{ + "name": "Подсистема с интерфейсом в 2.18 в выгрузке 2.20 (мерж веток) — только предупреждение: платформа такое грузит", + "setup": "fixture:ci-version-subsystem-older", + "params": { "ciPath": "Subsystems/Склад/Ext/CommandInterface.xml" }, + "noSnapshot": "interface-validate только читает и печатает — эталон зафиксировал бы фикстуру, а не выход проверяемого навыка; проверяется stdout", + "expect": { + "stdoutContains": ["[WARN] 14. Format version 2.18 differs from the dump (2.20) — the platform loads it"], + "stdoutNotContains": ["[ERROR]"] + } +} diff --git a/tests/skills/check-inline-drift.mjs b/tests/skills/check-inline-drift.mjs index 5f6f304b6..10beb2101 100644 --- a/tests/skills/check-inline-drift.mjs +++ b/tests/skills/check-inline-drift.mjs @@ -81,7 +81,7 @@ const FAMILIES = [ 'form-info', 'meta-info', 'mxl-info', 'role-info', 'skd-info', 'subsystem-info', // Валидаторы отличают автономную обработку от конфигурации: тот же корень — якорь выгрузки // для сверки штампа версии (find_dump_anchor) - 'form-validate', 'meta-validate', 'role-validate'] }, + 'form-validate', 'interface-validate', 'meta-validate', 'role-validate'] }, ], }, { @@ -130,19 +130,19 @@ const FAMILIES = [ { name: 'root_version', py: 'root_version', ps1: 'Get-RootVersion', variants: [ - { id: 'base', authority: 'meta-validate', consumers: ['cf-validate', 'form-validate', 'role-validate'] }, + { id: 'base', authority: 'meta-validate', consumers: ['cf-validate', 'form-validate', 'interface-validate', 'role-validate'] }, ], }, { name: 'find_dump_anchor', py: 'find_dump_anchor', ps1: 'Find-DumpAnchor', variants: [ - { id: 'base', authority: 'meta-validate', consumers: ['form-validate', 'role-validate'] }, + { id: 'base', authority: 'meta-validate', consumers: ['form-validate', 'interface-validate', 'role-validate'] }, ], }, { name: 'ext_body_owner', py: 'ext_body_owner', ps1: 'Get-ExtBodyOwner', variants: [ - { id: 'base', authority: 'form-validate', consumers: ['role-validate'] }, + { id: 'base', authority: 'form-validate', consumers: ['interface-validate', 'role-validate'] }, ], }, {