Files
ARCADIA-Studio/harness/release-constructor-defaults-review-20260911.md
T

5.5 KiB

Source-7 constructor omission compatibility — 2026-09-11

Codex-9e8r6t /root/release_audit. Root assigned a bounded independent check of other-host issue 1 comment 122. Read current issue/comments/Wiki, source parser, typed model and relevant specification sections before testing. No production Rust, Cargo, schema/grammar, GUI or HTML edits were made. Only the constructor wording/table and contradictory Scenario default-table entry in docs/language.rst were corrected; root owns HTML regeneration/publication.

Finding and executed evidence

The former blanket statement that every explicitly selected constructor field must be supplied, with a schema-2-only Exchange exception, contradicts current source 7. The declaration parser merges declaration-level defaults, but replaces an explicit constructor payload and deserializes that payload through its own typed contract (language.rs, around the final serde_json::from_value of an ElementBody). The OccurrenceBody definition has nullable references and explicit serde defaults, so some fields may be absent without copying the payload of the factory's default constructor.

The independent handwritten probe in harness/experiments/constructor-defaults-20260911/probe.rs passed 54 accepted comparisons and 12 missing-required-field refusals, in both OA and SA source 7. Fixed explicit UUIDs ensure a full Project equality comparison; no generated identities are normalized away. Expected occurrence bodies are literal typed values, not obtained from a UI producer or inferred from the omitted result. The same accepted cases also pass core command admission.

Constructor Omission admitted with this meaning Omission rejected
Exchange exchange/sender/receiver/reply_to/operation → None; message_kind → Asynchronous; values → empty list None of these fields is required to be present.
Action action/lifeline → None —
State state/lifeline → None —
SequenceReference sequence → None —
ScenarioUse scenario → None bindings
Control — kind
Fragment — operator, branches
Branch — guard, occurrences

Each nullable/default field is omitted individually and all optional fields are also omitted together. Required-field failures must identify the actual missing field, not merely fail unrelated semantic validation. For each of the 52 admitted occurrence fixtures, exact stabilization/no-op source bytes remain unchanged, a Rename changes only the subject's quoted name, and canonical format/reparse returns the complete identical Project. Incomplete admitted records can still have model-check warnings; no completeness claim is made.

Canonical Exchange output explicitly contains Asynchronous, reply_to none and values [], while operation None is absent because its serializer omits that value. This distinction is verified, not a general claim that canonical output prints every field. Lossless name/no-op editing preserves the authored omissions instead of forcing canonical expansion.

Two further fresh source-7 cases, one per layer, omit Scenario viewpoint and compare exactly with explicit MixedLegacy. The authored omission is retained and canonical formatting reparses identically. This confirms the Scenario default table needed the same source-7 clarification already present in section 4.3.

Provenance and reproducibility

  • Matching core: .local/target-gnullvm/debug/deps/liboa_core-3e81c616fea1d901.rlib, SHA256 5018A1FD7286ED9DFEDCBBF5B68B399AD5D143F2A9AAAED3078CFC934C9589C4. All listed current core sources were rehashed against the frozen verified GUI manifest before compilation; none differed.
  • Probe SHA256: FAA1A98BEA7A87E24047991D72A54919AE9C66F84B6EB465E24B13FDC82EE040.
  • Results TSV SHA256: 2C1BB97234EDFAC386A5DDCA46C28B5B46972CC879B7CC2B1C4179066BAB8AEF.
  • provenance.json records compiler details, core inputs, executable hash and all 121 result artifacts. run.log records the final successful run.
  • Build/run instructions are in the experiment README. The only initial failure was a harness compile typo using struct syntax for tuple Command::Rename; it was corrected before any counted execution. Both build attempts remain logged under .local/constructor-defaults-20260911/.

The successful direct-rustc build used edition 2024 and -D warnings; the writer slot was released immediately afterward. No Cargo or native test is claimed by this experiment.

Specification correction and limits

The constructor paragraph now distinguishes declaration defaults, a selected constructor's own contract, nullable values and optional presence. The OccurrenceBody table explicitly lists required fields and current source-7 omission values, including operation. It documents canonical versus retained authored spelling and removes the false schema-2-only restriction. The Scenario declaration table now agrees with section 4.3.

This is compatibility clarification: it neither changes admitted syntax nor silently rejects source already accepted by the application. Unknown omission contracts in other constructor/record families remain a separate audit. In particular, this experiment does not establish complete defaults for nested MessageKind payloads, MessageValue/OperationUse records, DataTypeDefinition, DataValue, PortContract, EventBody, contextual endpoints, projections or history facets, and does not test every older schema. Their defaults must not be inferred from the OccurrenceBody table. Root owns subsequent broader normative coverage.