From 037062c72853e84705270f9cb2cb638c7021fefd Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sat, 11 Apr 2026 18:01:00 +0300 Subject: [PATCH] fix(role-compile,subsystem-compile): interpolate \$formatVersion in XML output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regression introduced by d155086 (auto-detect XML format version): both scripts emit their root MetaDataObject element via X '...' with single-quoted strings, which PowerShell does NOT interpolate. As a result the literal text \$formatVersion landed in the generated XML, and every load failed with "Неизвестная версия формата \$formatVersion". This was masked for a week because the broken call sites aren't version-dependent by themselves — the platform exits with code 1 on this error, but verify-snapshots hadn't been re-run cleanly since the offending commit (we only did a scoped role-compile smoke test that happened to pass for unrelated reasons). Fixed by switching both single-quoted X '...' calls to double-quoted X "..." with escaped inner quotes. meta-compile / form-compile / epf-add-form / help-add / template-add / interface-edit already used here-strings or \$script:formatVersion with double-quoted wrappers and were unaffected. Bumped role-compile.ps1 to v1.5 and subsystem-compile.ps1 to v1.4. verify-snapshots --skill role-compile now 8/8 green. subsystem-compile re-verification is pending other unrelated fixes (see NEXT-STEPS.md). Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/skills/role-compile/scripts/role-compile.ps1 | 4 ++-- .../skills/subsystem-compile/scripts/subsystem-compile.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.claude/skills/role-compile/scripts/role-compile.ps1 b/.claude/skills/role-compile/scripts/role-compile.ps1 index 01133076..c193a267 100644 --- a/.claude/skills/role-compile/scripts/role-compile.ps1 +++ b/.claude/skills/role-compile/scripts/role-compile.ps1 @@ -1,4 +1,4 @@ -# role-compile v1.4 — Compile 1C role from JSON +# role-compile v1.5 — Compile 1C role from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -551,7 +551,7 @@ X ' xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef"' X ' xmlns:xr="http://v8.1c.ru/8.3/xcf/readable"' X ' xmlns:xs="http://www.w3.org/2001/XMLSchema"' X ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' -X ' version="$formatVersion">' +X " version=`"$formatVersion`">" X " " X ' ' X " $roleName" diff --git a/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 b/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 index ae4f1669..3036f563 100644 --- a/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 +++ b/.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1 @@ -1,4 +1,4 @@ -# subsystem-compile v1.3 — Create 1C subsystem from JSON definition +# subsystem-compile v1.4 — Create 1C subsystem from JSON definition # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$DefinitionFile, @@ -291,7 +291,7 @@ $uuid = New-Guid-String $indent = "`t`t`t" X '' -X '' +X "" X "`t" X "`t`t"