feat: checkpoint compact ordinary source and lossless default preservation
This commit is contained in:
+53
-16
@@ -2,7 +2,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="Docutils 0.22.2: https://docutils.sourceforge.io/" />
|
||||
<meta name="generator" content="Docutils 0.23: https://docutils.sourceforge.io/" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Arcadia Studio OA / SA Language and Editing Contract</title>
|
||||
<style type="text/css">
|
||||
@@ -806,11 +806,11 @@ references may be omitted and then mean <span class="docutils literal">none</spa
|
||||
These omissions are accepted in newly authored source 7, not only in schema-2
|
||||
compatibility input. Earlier schema admission of constructors and fields is
|
||||
still governed by its version rules.</p>
|
||||
<p>Canonical formatting writes the hydrated occurrence references and default
|
||||
<span class="docutils literal">message_kind</span>, <span class="docutils literal">reply_to</span> and <span class="docutils literal">values</span> explicitly. An absent
|
||||
<span class="docutils literal">operation</span> remains omitted in canonical output. Lossless no-op updates and
|
||||
unrelated name edits retain authored omissions; canonical formatting is a
|
||||
different operation. An admitted incomplete occurrence can still produce model
|
||||
<p>Canonical formatting omits optional occurrence references equal to <span class="docutils literal">none</span>,
|
||||
the default Asynchronous <span class="docutils literal">message_kind</span>, empty <span class="docutils literal">values</span>, and absent
|
||||
<span class="docutils literal">operation</span>. Required fields of a selected constructor remain present.
|
||||
Lossless updates retain unchanged explicit defaults and authored omissions;
|
||||
canonical formatting is a different operation. An admitted incomplete occurrence can still produce model
|
||||
checks requesting its missing work, exchange, lifeline or referenced scenario.</p>
|
||||
<table>
|
||||
<caption>Occurrence body constructors</caption>
|
||||
@@ -1569,29 +1569,40 @@ has no explicit default, and does not convey ownership or deletion of the type.<
|
||||
<thead>
|
||||
<tr><th class="head"><p>Constructor</p></th>
|
||||
<th class="head"><p>Required fields</p></th>
|
||||
<th class="head"><p>Optional fields (omission value)</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td><p>Boolean</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p>None</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Integer</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: optional signed 64-bit integers</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: signed 64-bit integers? (none)</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Real</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: optional finite IEEE-754 binary64 values</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: finite IEEE-754 binary64 values? (none)</p></td>
|
||||
</tr>
|
||||
<tr><td><p>String</p></td>
|
||||
<td><p><span class="docutils literal">minimum_length</span>: u32; <span class="docutils literal">maximum_length</span>: optional u32</p></td>
|
||||
<td><p><span class="docutils literal">minimum_length</span>: u32</p></td>
|
||||
<td><p><span class="docutils literal">maximum_length</span>: u32? (none)</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Enumeration</p></td>
|
||||
<td><p><span class="docutils literal">literals</span>: unique nonempty, case-sensitive strings</p></td>
|
||||
<td><p>None</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Record</p></td>
|
||||
<td><p><span class="docutils literal">supertype</span>: same-layer Record ref?</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p><span class="docutils literal">supertype</span>: same-layer Record ref? (none)</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Optional fields may be absent or explicitly <span class="docutils literal">none</span>. Selected String and
|
||||
Enumeration constructors still require <span class="docutils literal">minimum_length</span> and <span class="docutils literal">literals</span>,
|
||||
respectively, including zero and an empty list. Selecting a constructor does
|
||||
not merge fields from the default String definition. Unknown fields reject.</p>
|
||||
<p>Bounds are inclusive and ordered; an absent bound means unbounded within the
|
||||
represented numeric domain. Integer comparisons MUST NOT convert to binary64.
|
||||
NaN, infinities, overflow and reversed bounds reject. String length counts Unicode
|
||||
@@ -2439,10 +2450,27 @@ references, placements, artifacts, trace baselines, and ordered occurrences.
|
||||
Map order is irrelevant. The writer preserves signed coordinate zero and
|
||||
emits decimals that recover the original binary32 value.</p>
|
||||
<p>Canonical output uses LF, four-space indentation, explicit identities,
|
||||
defaults, and JSON-escaped strings. Elements are emitted in UUID order, then
|
||||
and JSON-escaped strings. It omits fields equal to the omission defaults of
|
||||
their actual declaration or selected constructor, as specified in the field
|
||||
tables. This includes an empty project description. It MUST NOT omit a required
|
||||
field merely because its value is zero, false, empty, or <span class="docutils literal">none</span>. Elements are emitted in UUID order, then
|
||||
relations; diagrams and their nodes follow, then artifacts, then traces.
|
||||
Fields use deterministic name order. Output ends with LF. Alias values come
|
||||
from the model, never from regenerating display names.</p>
|
||||
<p>Omission is context-sensitive: Scenario uses the source default MixedLegacy;
|
||||
BoundaryExchange and CommunicationMean have different orientation defaults;
|
||||
state declarations determine their state-kind discriminator. A nonempty or
|
||||
whitespace-only description remains exact. Present-empty optional strings or
|
||||
collections, unbounded multiplicity versus a finite default, selected operation
|
||||
intent, and negative coordinate zero remain distinct values. A nondefault
|
||||
geometry record retains all required coordinates or dimensions.</p>
|
||||
<p>Only specified optional fields inside selected constructors may be omitted.
|
||||
For example, Integer bounds and LegacyPortContract.interface may be absent;
|
||||
String.minimum_length, Signal.items, port-contract payload lists, and historical
|
||||
snapshot name/description fields remain required. A LegacyPortContract record
|
||||
still requires direction. Historical semantic baseline payloads are retained
|
||||
without generic empty/default pruning. Compact output MUST preserve every
|
||||
persistent model field after parsing, including these distinctions.</p>
|
||||
<p>Comments and input whitespace are lexical trivia to the canonical writer.
|
||||
Canonical export does not preserve them. The source-project editor and compiler
|
||||
preserve authored comments and whitespace on Apply while inserting missing
|
||||
@@ -2484,11 +2512,19 @@ independent parent and child moves are resolved together. Leading whitespace
|
||||
adjusts to the destination scope; other token spelling remains authored.</p>
|
||||
<p>Updates MUST NOT canonicalize surviving declarations in full. Header, field and
|
||||
nested value positions are derived from the existing syntax parser. Unchanged
|
||||
fields retain their exact bytes, including field order, omitted defaults, number
|
||||
fields retain their exact bytes, including field order, explicit and omitted defaults, number
|
||||
and string spelling, comments, indentation and line endings. Changed literals and
|
||||
references replace only the required tokens; a reference with comments between
|
||||
<span class="docutils literal">@</span> and its alias retains those comments. A previously omitted default is
|
||||
inserted only if its semantic value changes. New fields use the existing record's
|
||||
<span class="docutils literal">@</span> and its alias retains those comments. A previously omitted field is
|
||||
inserted only when needed to express the requested value in its new declaration
|
||||
context. This includes an unchanged value whose omission default changes with
|
||||
the declaration kind. For example, changing BoundaryExchange to CommunicationMean
|
||||
while retaining orientation true requires <span class="docutils literal">oriented true;</span> if previously
|
||||
implicit. Unchanged explicit defaults MUST survive unrelated sibling edits,
|
||||
including persistence-serializer omissions such as <span class="docutils literal">operation none</span>,
|
||||
<span class="docutils literal">port_anchors []</span> and <span class="docutils literal">baseline.semantic none</span>. New fields and value fragments
|
||||
use compact generation while retaining required selected-constructor payloads.
|
||||
New fields use the existing record's
|
||||
indentation and line-ending style without reformatting its other fields.</p>
|
||||
<p>A constructor tag change retains shared nested fields in place. Removed fields,
|
||||
constructors and declarations remove syntax tokens, retaining their comments
|
||||
@@ -2770,8 +2806,9 @@ This compatibility applies equally to source and JSON. It adds explicit
|
||||
defaults without changing any prior identity, name, reference, order, geometry,
|
||||
artifact or trace field. The original V2 golden source/JSON in
|
||||
<span class="docutils literal"><span class="pre">crates/oa-core/tests/fixtures</span></span> MUST NOT be regenerated from the newer demo;
|
||||
they verify that every old persistent field survives. Canonical output writes
|
||||
the added defaults through explicit migration to the current schema 7.</p>
|
||||
they verify that every old persistent field survives. Canonical output uses
|
||||
the current schema 7 and omits values equal to its specified source defaults;
|
||||
parsing recovers the complete migrated model.</p>
|
||||
<p>The V2 adapter preserves every original identity, alias, prose, parent,
|
||||
placement, trace and artifact. Generic ports become Legacy with their original
|
||||
direction/interface record. Existing FE endpoint IDs remain unchanged. For
|
||||
|
||||
+55
-15
@@ -171,11 +171,11 @@ These omissions are accepted in newly authored source 7, not only in schema-2
|
||||
compatibility input. Earlier schema admission of constructors and fields is
|
||||
still governed by its version rules.
|
||||
|
||||
Canonical formatting writes the hydrated occurrence references and default
|
||||
``message_kind``, ``reply_to`` and ``values`` explicitly. An absent
|
||||
``operation`` remains omitted in canonical output. Lossless no-op updates and
|
||||
unrelated name edits retain authored omissions; canonical formatting is a
|
||||
different operation. An admitted incomplete occurrence can still produce model
|
||||
Canonical formatting omits optional occurrence references equal to ``none``,
|
||||
the default Asynchronous ``message_kind``, empty ``values``, and absent
|
||||
``operation``. Required fields of a selected constructor remain present.
|
||||
Lossless updates retain unchanged explicit defaults and authored omissions;
|
||||
canonical formatting is a different operation. An admitted incomplete occurrence can still produce model
|
||||
checks requesting its missing work, exchange, lifeline or referenced scenario.
|
||||
|
||||
.. list-table:: Occurrence body constructors
|
||||
@@ -933,18 +933,30 @@ DataTypeDefinition has exactly the following constructors:
|
||||
|
||||
* - Constructor
|
||||
- Required fields
|
||||
- Optional fields (omission value)
|
||||
* - Boolean
|
||||
- None
|
||||
- None
|
||||
* - Integer
|
||||
- ``minimum``, ``maximum``: optional signed 64-bit integers
|
||||
- None
|
||||
- ``minimum``, ``maximum``: signed 64-bit integers? (none)
|
||||
* - Real
|
||||
- ``minimum``, ``maximum``: optional finite IEEE-754 binary64 values
|
||||
- None
|
||||
- ``minimum``, ``maximum``: finite IEEE-754 binary64 values? (none)
|
||||
* - String
|
||||
- ``minimum_length``: u32; ``maximum_length``: optional u32
|
||||
- ``minimum_length``: u32
|
||||
- ``maximum_length``: u32? (none)
|
||||
* - Enumeration
|
||||
- ``literals``: unique nonempty, case-sensitive strings
|
||||
- None
|
||||
* - Record
|
||||
- ``supertype``: same-layer Record ref?
|
||||
- None
|
||||
- ``supertype``: same-layer Record ref? (none)
|
||||
|
||||
Optional fields may be absent or explicitly ``none``. Selected String and
|
||||
Enumeration constructors still require ``minimum_length`` and ``literals``,
|
||||
respectively, including zero and an empty list. Selecting a constructor does
|
||||
not merge fields from the default String definition. Unknown fields reject.
|
||||
|
||||
Bounds are inclusive and ordered; an absent bound means unbounded within the
|
||||
represented numeric domain. Integer comparisons MUST NOT convert to binary64.
|
||||
@@ -1840,11 +1852,30 @@ Map order is irrelevant. The writer preserves signed coordinate zero and
|
||||
emits decimals that recover the original binary32 value.
|
||||
|
||||
Canonical output uses LF, four-space indentation, explicit identities,
|
||||
defaults, and JSON-escaped strings. Elements are emitted in UUID order, then
|
||||
and JSON-escaped strings. It omits fields equal to the omission defaults of
|
||||
their actual declaration or selected constructor, as specified in the field
|
||||
tables. This includes an empty project description. It MUST NOT omit a required
|
||||
field merely because its value is zero, false, empty, or ``none``. Elements are emitted in UUID order, then
|
||||
relations; diagrams and their nodes follow, then artifacts, then traces.
|
||||
Fields use deterministic name order. Output ends with LF. Alias values come
|
||||
from the model, never from regenerating display names.
|
||||
|
||||
Omission is context-sensitive: Scenario uses the source default MixedLegacy;
|
||||
BoundaryExchange and CommunicationMean have different orientation defaults;
|
||||
state declarations determine their state-kind discriminator. A nonempty or
|
||||
whitespace-only description remains exact. Present-empty optional strings or
|
||||
collections, unbounded multiplicity versus a finite default, selected operation
|
||||
intent, and negative coordinate zero remain distinct values. A nondefault
|
||||
geometry record retains all required coordinates or dimensions.
|
||||
|
||||
Only specified optional fields inside selected constructors may be omitted.
|
||||
For example, Integer bounds and LegacyPortContract.interface may be absent;
|
||||
String.minimum_length, Signal.items, port-contract payload lists, and historical
|
||||
snapshot name/description fields remain required. A LegacyPortContract record
|
||||
still requires direction. Historical semantic baseline payloads are retained
|
||||
without generic empty/default pruning. Compact output MUST preserve every
|
||||
persistent model field after parsing, including these distinctions.
|
||||
|
||||
Comments and input whitespace are lexical trivia to the canonical writer.
|
||||
Canonical export does not preserve them. The source-project editor and compiler
|
||||
preserve authored comments and whitespace on Apply while inserting missing
|
||||
@@ -1890,11 +1921,19 @@ adjusts to the destination scope; other token spelling remains authored.
|
||||
|
||||
Updates MUST NOT canonicalize surviving declarations in full. Header, field and
|
||||
nested value positions are derived from the existing syntax parser. Unchanged
|
||||
fields retain their exact bytes, including field order, omitted defaults, number
|
||||
fields retain their exact bytes, including field order, explicit and omitted defaults, number
|
||||
and string spelling, comments, indentation and line endings. Changed literals and
|
||||
references replace only the required tokens; a reference with comments between
|
||||
``@`` and its alias retains those comments. A previously omitted default is
|
||||
inserted only if its semantic value changes. New fields use the existing record's
|
||||
``@`` and its alias retains those comments. A previously omitted field is
|
||||
inserted only when needed to express the requested value in its new declaration
|
||||
context. This includes an unchanged value whose omission default changes with
|
||||
the declaration kind. For example, changing BoundaryExchange to CommunicationMean
|
||||
while retaining orientation true requires ``oriented true;`` if previously
|
||||
implicit. Unchanged explicit defaults MUST survive unrelated sibling edits,
|
||||
including persistence-serializer omissions such as ``operation none``,
|
||||
``port_anchors []`` and ``baseline.semantic none``. New fields and value fragments
|
||||
use compact generation while retaining required selected-constructor payloads.
|
||||
New fields use the existing record's
|
||||
indentation and line-ending style without reformatting its other fields.
|
||||
|
||||
A constructor tag change retains shared nested fields in place. Removed fields,
|
||||
@@ -2207,8 +2246,9 @@ This compatibility applies equally to source and JSON. It adds explicit
|
||||
defaults without changing any prior identity, name, reference, order, geometry,
|
||||
artifact or trace field. The original V2 golden source/JSON in
|
||||
``crates/oa-core/tests/fixtures`` MUST NOT be regenerated from the newer demo;
|
||||
they verify that every old persistent field survives. Canonical output writes
|
||||
the added defaults through explicit migration to the current schema 7.
|
||||
they verify that every old persistent field survives. Canonical output uses
|
||||
the current schema 7 and omits values equal to its specified source defaults;
|
||||
parsing recovers the complete migrated model.
|
||||
|
||||
The V2 adapter preserves every original identity, alias, prose, parent,
|
||||
placement, trace and artifact. Generic ports become Legacy with their original
|
||||
|
||||
Reference in New Issue
Block a user