feat(role-compile): порядок прав и узлов как у платформы

Платформа нормализует и то и другое: права внутри <object> идут в
фиксированном для типа порядке, сами <object> — по uuid объекта
метаданных. Навык писал в порядке ввода, поэтому первая же выгрузка из
Конфигуратора давала диф, которого никто не делал.

Замеры (debug/role-edit/FINDINGS.md): канон прав снят с платформы и
сошёлся с топологической сортировкой по корпусу (~290k узлов <right>);
порядок узлов по uuid подтверждён на 363 ролях ACC из 363 и отдельно на
44 ролях с вложенными объектами, где ключ — uuid самого реквизита.
Порядок дерева конфигурации тут ни при чём — прямое сравнение
с ChildObjects даёт скачущие позиции. Проверка: выход обоих портов
совпал с выгрузкой 1С байт в байт.

Сортировка узлов строго ordinal: Sort-Object сравнивает по культуре и
игнорирует дефис, из-за чего порядок разошёлся бы и с платформой, и с
py-портом.

Объект, которого нет в выгрузке (uuid неизвестен), уходит в конец с
предупреждением в stderr — платформа переставит его сама.

Кейсы с несколькими объектами переведены с preRun на фикстуры: uuid,
который meta-compile генерирует заново на каждом прогоне, сделал бы
порядок узлов плавающим. Фикстуры собраны теми же навыками. Двум
фикстурам добавлен документ-регистратор: регистр расчёта без него
платформа не принимает, и verify-snapshots это поймал.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FGkXwoXTuafcu1SXMsauFq
This commit is contained in:
Nick Shirokov
2026-09-13 17:01:54 +03:00
co-authored by Claude Opus 5
parent c23cae39d8
commit bbc3be55a5
162 changed files with 10432 additions and 523 deletions
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.17">
<Document uuid="80a47ade-f7c9-41ad-9160-b287c3a854a8">
<InternalInfo>
<xr:GeneratedType name="DocumentObject.Реализация" category="Object">
<xr:TypeId>101513f9-27fb-4cfe-b793-51606f03d04d</xr:TypeId>
<xr:ValueId>6f3c9363-fa30-440f-9fba-0b7e0a072044</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="DocumentRef.Реализация" category="Ref">
<xr:TypeId>2bd2b256-8141-4c2b-8ace-1bb0c75d68c6</xr:TypeId>
<xr:ValueId>abc85b2c-e21f-4060-9dee-823b11459315</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="DocumentSelection.Реализация" category="Selection">
<xr:TypeId>297bf0c5-9e26-44d9-af30-1a70d9b27841</xr:TypeId>
<xr:ValueId>a43ef486-3bf6-4ff4-a266-c7dbe7a5ea3c</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="DocumentList.Реализация" category="List">
<xr:TypeId>6c567af4-7234-4b42-9a63-3a2878242cf6</xr:TypeId>
<xr:ValueId>8ff44aed-4ea0-4227-8b6a-1b67956aedc0</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="DocumentManager.Реализация" category="Manager">
<xr:TypeId>25f0dd7f-e9a4-4033-a601-05668df892f7</xr:TypeId>
<xr:ValueId>287b6ad5-349b-4941-a4b0-46f664fa95fb</xr:ValueId>
</xr:GeneratedType>
</InternalInfo>
<Properties>
<Name>Реализация</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Реализация</v8:content>
</v8:item>
</Synonym>
<Comment/>
<UseStandardCommands>true</UseStandardCommands>
<Numerator/>
<NumberType>String</NumberType>
<NumberLength>11</NumberLength>
<NumberAllowedLength>Variable</NumberAllowedLength>
<NumberPeriodicity>Year</NumberPeriodicity>
<CheckUnique>true</CheckUnique>
<Autonumbering>true</Autonumbering>
<Characteristics/>
<BasedOn/>
<InputByString>
<xr:Field>Document.Реализация.StandardAttribute.Number</xr:Field>
</InputByString>
<CreateOnInput>Use</CreateOnInput>
<SearchStringModeOnInputByString>Begin</SearchStringModeOnInputByString>
<FullTextSearchOnInputByString>DontUse</FullTextSearchOnInputByString>
<ChoiceDataGetModeOnInputByString>Directly</ChoiceDataGetModeOnInputByString>
<DefaultObjectForm/>
<DefaultListForm/>
<DefaultChoiceForm/>
<AuxiliaryObjectForm/>
<AuxiliaryListForm/>
<AuxiliaryChoiceForm/>
<Posting>Allow</Posting>
<RealTimePosting>Deny</RealTimePosting>
<RegisterRecordsDeletion>AutoDelete</RegisterRecordsDeletion>
<RegisterRecordsWritingOnPost>WriteSelected</RegisterRecordsWritingOnPost>
<SequenceFilling>AutoFill</SequenceFilling>
<RegisterRecords/>
<PostInPrivilegedMode>true</PostInPrivilegedMode>
<UnpostInPrivilegedMode>true</UnpostInPrivilegedMode>
<IncludeHelpInContents>false</IncludeHelpInContents>
<DataLockFields/>
<DataLockControlMode>Managed</DataLockControlMode>
<FullTextSearch>Use</FullTextSearch>
<ObjectPresentation/>
<ExtendedObjectPresentation/>
<ListPresentation/>
<ExtendedListPresentation/>
<Explanation/>
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<DataHistory>DontUse</DataHistory>
<UpdateDataHistoryImmediatelyAfterWrite>false</UpdateDataHistoryImmediatelyAfterWrite>
<ExecuteAfterWriteDataHistoryVersionProcessing>false</ExecuteAfterWriteDataHistoryVersionProcessing>
</Properties>
<ChildObjects/>
</Document>
</MetaDataObject>