From dc4ffa1fc82f219d07db98a226e8d21f7c60a126 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sat, 11 Apr 2026 18:59:26 +0300 Subject: [PATCH] fix(form-compile): interpolate \$script:formatVersion in
header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Third victim of the d155086 single-quote regression that 037062c missed. Both header emissions at lines 1130 and 1140 used `X '...version="$($script:formatVersion)"...'` — single-quoted, so the literal text `$($script:formatVersion)` landed in the output XML instead of the detected version number. The bug was masked for a week because: 1. form-compile runner tests weren't rerun against the broken script after d155086 (snapshots still showed the pre-regression `version="2.17"` hardcode) 2. verify-snapshots was already red on form-compile for other reasons (P2 XDTO errors in some cases), so nobody noticed the wholesale script breakage 3. The .py port uses an f-string and was never broken Found while auditing whether 037062c was complete — the earlier grep for `'...\$formatVersion...'` single-line patterns had missed this because `$($script:formatVersion)` is a subexpression-in-string form that wasn't in the grep pattern. Fix: convert both X calls to double-quoted strings with backtick- escaped inner quotes, matching the 037062c pattern for role-compile/subsystem-compile. Same approach, same precedent. Bumped form-compile.ps1 v1.2→v1.3. Verification: - runner --filter form-compile (PS1): 0/10 → 10/10 - runner --filter form-compile --runtime python: 10/10 (dual-port clean) - verify-snapshots --skill form-compile: surfaced from fully-masked to 9/10 (only catalog-form still fails — real P2 XDTO issue, not \$formatVersion) Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/skills/form-compile/scripts/form-compile.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1 index 847530c8..dbb4c6a1 100644 --- a/.claude/skills/form-compile/scripts/form-compile.ps1 +++ b/.claude/skills/form-compile/scripts/form-compile.ps1 @@ -1,4 +1,4 @@ -# form-compile v1.2 — Compile 1C managed form from JSON +# form-compile v1.3 — Compile 1C managed form from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -1127,7 +1127,7 @@ if ($def.title) { # Header X '' -X '' +X "" # Oops — Title was emitted before header. Need to fix the order. # Actually, let me restructure: build the body into a separate buffer, then assemble @@ -1137,7 +1137,7 @@ $script:xml = New-Object System.Text.StringBuilder 8192 $script:nextId = 1 X '' -X '' +X "" # 12a. Title (from def.title or properties.title — must be multilingual XML) $formTitle = $def.title