feat(skd-decompile): shorthand-render роли + extras без whitelist

- Get-RoleInfo: любой <dcscom:KEY> со строковым значением → extras; whitelist убран
- Render-Role: shorthand-строка "@flag K=V" когда все extras-значения простые
  (regex ^[\w\.\-]+$); иначе object form
- Build-Field: shorthand-роль встраивается в field-shorthand-строку
- v0.9 → v0.10

Новый тест-кейс field-roles-rich (балансовые поля с balanceGroupName/balanceType,
@dimension @required) — bit-perfect round-trip с compile.

На сэмпле 30 ERP-отчётов: 754 → 120 sentinel'ов (-84%), 8/30 clean.
ComplexRole 27 → 0.
This commit is contained in:
Nick Shirokov
2026-05-21 17:43:05 +03:00
parent 009656991f
commit 537adfd3f8
4 changed files with 215 additions and 48 deletions
@@ -0,0 +1,14 @@
{
"dataSets": [
{
"name": "Тест",
"query": "ВЫБРАТЬ * ИЗ РегистрНакопления.Остатки",
"fields": [
"Период: date @period",
"Контрагент: CatalogRef.Контрагенты @dimension @required",
"СуммаНач: decimal(15,2) @balance balanceGroupName=Сумма balanceType=OpeningBalance",
"СуммаКон: decimal(15,2) @balance balanceGroupName=Сумма balanceType=ClosingBalance"
]
}
]
}