0024: Effective alternatives and nullable characteristics
Effective alternatives are ordinary Full data description views derived after established reference composition. They inherit the containing description’s surviving data/common qualities, excluding enum, sdfChoice and Property-only readable/writable/observable characteristics. Each surviving explicit branch quality replaces the shared quality as a whole, including map qualities. Nested alternatives derive after their final inherited context. These meanings follow RFC 9880 Section 4.7.2 and ADR 0005: Nullability and presence.
Reference composition applies its actual Merge Patch deletions first. A branch-local tombstone supplies no explicit override, so a surviving shared quality applies again. The composed branch retains its deletion explanation, while the derived active quality identifies the shared contribution. Ordinary const:null remains an authored value. enum derives text const alternatives with occurrence indices, preserving order, duplicate occurrences, original lexemes and source spans. An enum occurrence is not an invented Given Name or an authored const member.
Inherited qualities retain their donor’s established meaning. Wider Direct items description qualities such as array type, nullable, default, counts and nested items remain opaque and typed-unavailable when inherited; the receiving Full role does not settle them. Established independent bounds and object structure stay accessible. A surviving explicit Full override replaces uncertainty for that quality. Absent direct-item nullable contributes no authored quality, allowing an otherwise established Full alternative’s specified default true. Unsupported optional opaque content does not hide independent base meanings.
EffectiveDataDescription::alternatives() returns an absent, known or unavailable collection. Known collections preserve Choice names or Enum occurrence indices and Field-valued branch handles. Empty, unavailable-container and individually unavailable-branch states remain distinct. A known branch can expose established qualities while other needed meanings or capabilities remain unavailable. nullable_characteristic() shares Declared/SpecifiedDefault states with Property characteristics, retaining source absence and separate contributor origins. Documentary default, required, sdfRequired, null admission and const remain independent; no value is inserted into source, composed JSON or interaction data.
Derived alternatives use a bounded eager arena and dedicated complete-state copying. Copying preserves source/node identity, scalar content, nearest/deleted origins, failure and required-reference evidence, donor meaning and importing consumer/conflict records where applicable. Placement roles, completion and replay eligibility are recomputed after inheritance and overrides. Source observation replay requires its completed source role, source identity, clear feature context and unchanged rule premises. Shared inheritance invalidates whole-map replay and the containing-type premise for required/properties while independent explicit scalar premises can remain unchanged. These guarantees extend ADR 0020: Owned effective views and nearest origins within ADR 0009: Bounded processing and reporting.
Selected samples use that same arena with deferred property work. Root references and raw branch roots settle before final shared qualities and whole explicit replacements; only then do described present entries request child expansion and parameter checks. Copies preserve genuine failures, donor meaning and reference ancestry while resetting interest-dependent completion, exclusion and alternative groups. An absent optional description remains outside the sampled interest, without supplying whole-model capability credit. An unexpected change to a finalized sampled owner fails closed instead of reusing a stale alternative group. One persistent parameter finding store retains its charged capacity across direct checks. Private checking borrows the original operation budget and that separate parameter finding allowance, charging work, derived allocation and pattern resources directly without replenishment. Ordinary finding storage retains its workflow-local policy; effective node and reference allowances remain resolver-owned. Model meaning and Declared-value consistency borrow the same budget, while numeric and equality allowances remain shared across effective model iteration.
Imported alternatives retain the directly captured outer mandatory-root consumer and separate nested importing boundaries from ADR 0023: Supplied global composition and dependency scope. Enum-derived roots carry the donor’s applicable boundary; their const scalars retain the original enum occurrence source. An implicit nullable explanation can carry this consumer context while retaining no authored default source. Conflict storage is precharged when copied, and unavailable nonmap branches prevent complete collection establishment while preserving known identities and independent siblings.
Composed JSON and existing pointer selectors retain their original meaning. Derived alternatives are reached through their collection and direct explanation handles, with semantic coordinates separate from authored source locations. Optional inspection detail reports collection and branch availability, raw derived JSON, per-quality unavailable meanings and nearest/default/consumer explanations. Partial raw JSON preserves opaque values without establishing their meaning. Bounded omission preserves aggregate outcomes and does not imply absence or validity. Check and inspect emit report 1.0 with additive optional fields under ADR 0011: Machine-readable report contracts. This establishes inspection and existing parameter rules, not sample admission, satisfiability or the unfinished full baseline.
Considered Options
A compact overlay could preserve the same public handles with different internal storage. Eager derivation fits the current owned arena and bounds the present implementation; no performance superiority is claimed. Exposing merged parser values would force callers to rebuild donor meanings, origins and unavailable states. Synthesizing pointer-selectable members would change composed JSON and confuse semantic coordinates with authored content. Applying branch tombstones to shared qualities would discard the required shared fallback. Treating every inherited quality as Full would incorrectly settle restricted donor semantics. Copying historical completion or suppressing diagnostics by origin alone would overlook changed rule premises.