В шапке ссылочных объектов (справочники, документы, перечисления, ПВХ/ПВР,
планы счетов, планы обмена, бизнес-процессы, задачи) теперь выводится строка
«Представление типа» — имя ссылочного типа в диалогах выбора типа, с fallback
ObjectPresentation -> Synonym -> Name. В режиме full дополнительно выводятся
заданные сырые представления (объекта/списка и расширенные).
Тесты: раннер принимает stdoutContains строкой или массивом, добавлен
stdoutNotContains. Добавлены кейсы meta-info (ед.ч. ПВХ, full со всеми
представлениями, fallback на синоним) и негативная проверка у регистра.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Категория C — закрыта для однородных шаблонов с custom appearance.
Refactor fingerprint → preset shape (11 полей: font/fontSize/bold/italic/
hAlign/vAlign/wrap/bgColor/textColor/borderColor/borders). vAlign теперь
учитывается в matching (раньше игнорировался).
Алгоритм:
1. При -OutputPath загружается existing skd-styles.json рядом (если есть);
user presets накладываются на built-in по той же логике что и compile.
2. Каждая ячейка → Extract-CellPreset → Match-PresetByShape против
effectivePresets (built-in + user).
3. Если не match — Allocate-CustomStyle: новый customN, регистрируется
в effectivePresets и accumulator.
4. По окончании Save-UserStyles пишет skd-styles.json рядом с outputPath
(preserved existing + новые customN).
5. Compile подхватит файл по своим search-путям (cwd/dirname/scan-up).
В SKILL.md не добавляем (custom стили — для round-trip, не для написания
модель с нуля; built-in `data/header/subheader/total/none` остаются
основным интерфейсом для модели).
- runner.mjs: новый preRun step `writeFile` для подготовки fixture-файлов
в workDir (нужен для теста с предзаписанным skd-styles.json).
- Новый тест template-custom-style: preRun пишет myHeader preset,
скомпилирует темплейт, decompile reverse'ит → переиспользует имя
myHeader (не создаёт customN).
- v0.14 → v0.15.
Метрики:
- ERP-сэмпл 30: 24 → 0 sentinel'ов, clean 26 → 30/30
- Целевой корпус 40 отчётов: 39 → 25 sentinel'ов (часть закрыта), clean
19 → 20/40. Остаточные — шаблоны с разными стилями в разных ячейках
одного шаблона (нужно per-cell style override — отдельная задача).
Раньше PS1-порт делал `Join-Path (Get-Location) $OutFile` без проверки,
что приводило к невалидным склейкам типа `C:\cwd\C:\abs\path.txt`, и
запись падала с «The given path's format is not supported».
Теперь: если путь абсолютный — нормализуется через `Path::GetFullPath`,
если относительный — резолвится против CWD. Python-порт уже был корректен,
только version bump.
Дополнительно: `args_extra` в runner.mjs теперь поддерживает подстановку
`{workDir}` — нужно для тестов с абсолютными путями внутри workspace.
Тесты: `skd-info/outfile-absolute-cyrillic` (PS + Python).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
XmlDocument round-trip искажал Template.xml даже при отсутствии правок:
декодировал " в <query>/<expression>, схлопывал многострочный xmlns
корня, добавлял пробел перед /> и записывал файл при [WARN] not found.
Дирти-флаг ($script:Dirty / dirty) ставится только на успешной мутации;
финальный save пропускается с [INFO] No changes -- file untouched, если
ни одна операция в batch ничего не изменила. Post-process после OuterXml
восстанавливает raw-форматирование корневого xmlns из исходного файла,
re-escape `"` в текстах <query>/<expression> с anchored regex (не задевая
xsi:type="..."), и нормализует <foo .../> к <foo.../>.
Замеры на реальной схеме после modify-field: diff упал с 423 строк до 37
(94% шума устранено), повторный прогон byte-identical.
В runner.mjs добавлен caseData.idempotent: re-run + byte-equality на всех
файлах workDir. Три новых кейса (NO-OP, entity-preserve, xmlns-multiline)
+ общий fixture roundtrip-base. Все 33 ранее существовавших snapshot
перегенерированы под корректное форматирование (восстанавливают то, что
старый skd-edit ломал).
skd-edit v1.18 -> v1.19. PS и PY порты синхронизированы.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
После платформенных тестов (db-create/db-load-xml/db-update) Windows
держит файловые хэндлы 1cv8 ещё несколько сотен миллисекунд. rmSync без
ретраев падал EBUSY на Roles/.../Rights.xml, и uncaught-ошибка в finally
рушила весь node-процесс — теряли результат теста.
Теперь rmSync с maxRetries: 10, retryDelay: 200 (≈2с буфер) и try/catch
вокруг — в худшем случае warning + лишняя tmp-папка вместо краша.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The bottom-up flow (compile child with -Parent pointing at parent's
XML — skill creates the real child file AND registers it in parent's
ChildObjects) has been the documented canonical way to build nested
subsystems since forever. It's in SKILL.md Примеры:58 and implemented
in subsystem-compile.ps1:430-506. But zero test cases exercised it —
all 7 pre-existing cases used the top-down `children: [...]` shortcut
that aa93031 made honest with stubs.
Two problems with the status quo:
1. A model reading SKILL.md saw `"children": ["ДочерняяА", "ДочерняяБ"]`
right in the main JSON-definition example and took it as the
canonical way to create nested structure. It's a trap — the
shortcut creates placeholder stubs with empty Synonym/Content that
the model almost never actually wants. The natural flow (one
subsystem-compile call per real subsystem) wasn't visible where
the model looks first.
2. The canonical flow had no test safety net — nothing caught regressions
in the register-in-parent code path (lines 430-506).
Fix, minimal surface:
- SKILL.md: remove `"children": [...]` from the JSON-definition example.
Leave the `-Parent` example in the Примеры section (already there).
The children field stays fully supported in the scripts (aa93031 stub
behavior unchanged) for legacy JSON — just not advertised.
- New test case `nested-parent.json`: preRun compiles "Продажи" parent,
main run compiles "Настройки" child with `-Parent Subsystems/Продажи.xml`.
Verifies the real bottom-up flow: snapshot shows full child file with
real Synonym/Explanation AND parent's `<ChildObjects>` updated to
reference the child. verify-snapshots confirms platform accepts it.
- Runner plumbing: `_skill.json` gains `{ "flag": "-Parent", "from":
"workPath", "field": "parent", "optional": true }`. Required extending
both `tests/skills/runner.mjs` and `tests/skills/verify-snapshots.mjs`
(they each have their own copy of buildArgs) to support `optional: true`
on workPath mappings — otherwise existing cases without params.parent
would get the flag pushed with an empty value.
Verification:
- runner --filter subsystem-compile (PS1): 8/8 (was 7/7 +1)
- runner --filter subsystem-compile --runtime python: 8/8 (dual-port clean)
- verify-snapshots --skill subsystem-compile: 8/8
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- runner.mjs v0.4: --with-validation flag runs validators on real output
- postValidate config in 20 _skill.json files (maps skill → validator)
- validatePath in ~100 positive test cases
- skipValidation for 5 cross-reference cases (isolated workspace limitation)
- Integration tests: build-config (19 steps), build-epf (6), build-cfe (4)
- base-config cache from build-config for downstream tests
- Fix chart-of-calculation-types test data (DependenceOnCalculationTypes)
- 285/285 unit + 3/3 integration, all green with validation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Script logic fixes (PY mirroring PS1):
- skd-compile: fix (?i) regex flag placement for Python 3.11+
- mxl-compile: handle list-of-lists row format (PS1 silently ignores)
- subsystem-compile: add "objects" → "content" synonym alias
- role-compile: add "rights" → "objects" synonym alias
- meta-compile: sort HTTP/Web service method/operation iteration
- form-edit: insert ChildItems after Events/AutoCommandBar (not at end)
- mxl-compile: sort colWidthMap iteration in both PS1 and PY for
deterministic format indices
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add parallel test execution with worker pool (default: CPU count).
New --concurrency N option (--concurrency 1 for sequential).
Pre-warm shared fixtures before parallel run.
Skip snapshot update/compare for external (read-only) workspaces —
prevents accidental copying of large config dumps.
Fix normalizeUuids for cf-info/cf-validate (false→true).
Result: 283 tests, 329s→84s (4x speedup).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- mxl-compile, mxl-validate, mxl-info, mxl-decompile: 4 cases
- runner: cwd option in _skill.json and preRun steps for skills
that resolve OutputPath relative to current directory
- Finding: mxl-compile only accepts relative OutputPath
21 tests across 9 skills, all passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fixture: paths now resolve relative to skill's cases/ dir, not global.
Each validate skill keeps its broken fixtures locally.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Compact mode shows "cases/meta-compile/catalog-basic" next to failed
test name — model can open the file, rerun, or update snapshot.
Verbose mode shows id for all cases.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Default shows one line per skill: "✓ meta-compile 6/6 (3.3s)"
Failed tests expanded with details automatically.
--verbose/-v shows full tree with every case.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- cf-init: 3 cases (basic, with-vendor, error-already-exists)
- runner: args_extra for optional CLI params per case
- runner: params.field takes priority over caseData.field in case.<field> mapping
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reduces clutter when a skill has many test cases — all .json cases
are visible at top level, snapshots tucked away in one folder.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Snapshot-based test runner (tests/skills/runner.mjs) for verifying
skill script output. Zero dependencies, runs on any machine with
Node.js — no 1C platform needed for daily regression.
Pilot: meta-compile with 6 cases (4 positive with snapshots, 2 negative).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>