!!id:"https://tson.io/2026/38/m/meta-kernel-resolved.tn" !!schema:"https://tson.io/2026/38/m/meta-kernel.tn" @doc:""" Resolver-output fixture for meta-kernel.tn (2026 Revision 38 draft). Parse the source schema, run the resolver, canonicalise, compare. Conventions: - Every entry is its value: a name maps to the body it resolves to, `!record { ... }`, `!integer_type { ... }`, `!reference { ... }`, `!template { ... }`. Output is source with sugar expanded, bodies flattened and chains computed, and an entry written as a constructor application resolves to itself. - Fields at their default values are omitted (`optional: false`, `voidable: false`, `role: FREE`), and so are empty chains. - A type body carries `type`'s one field, `chain`, a `type_chain`. `supertypes` is the complete IS-A chain, every element a bare name, closed to a fixed point through applied parents; `subtypes` is its inverse over the entries of this map only (inverse edges from schemas that import this one are not represented here); `parents` is a record template's, the parents as written. Both name lists are written lexically sorted; a resolver's native ordering is implementation-defined, so comparison tools canonicalise both lists before comparing. Set-typed fields are compared as written, in source declaration order (Part 2 Sections 7.5, 8). An empty chain is omitted. - A `!reference` and a `!template` compose `top` and carry no chain. - A record's `fields` are flattened: a composition's fields are its operands' and its own, merged, so every record composing `type` (through `atom`, `product` or `sum`) states `chain` among its fields first. - `top`, `type`, the three base kinds and `namespace` are `abstract`, so each states `extension: ABSTRACT`. - Source annotations are preserved in their authored positions, except `@doc`: a conforming resolver carries every source @doc verbatim, and these fixtures, which exist to be compared, leave entry docs out and substitute this conventions note for the document-level one. - Reference-kind names at type positions are stated as written: a reference is a hop, not a rewrite, so a use site naming an alias names the alias. A processor collapses the chain when it compiles readers, after linking, not in resolved output. - A slot that names a type (`record_field.type`, `tuple_element.element_type`, a container's type slots, choice variants, a parameter's `type` and `bound`) is typed `type_kind`, the kind of the types, and holds a bare name: a type's name, judged a member of the kind when the schema links. `type_ref` is the application form and stands only where one may: `type_chain.parents`, `type_argument.name`, the `application` annotation, held text, and `reference.target`, which may name a constructor (Part 2 Section 8.1). - The container constructors carry no parameters: their type slots are plain required `type_kind`-typed fields, filled by the construction (or by a sugar form's desugaring) like any other required field. Within a template body `value` also carries a parameter, unlabelled: a token there is a parameter exactly when its text resolves into the enclosing entry's `parameters` (Part 2 Section 5.10's shadowing rule), and a closed entry has none for one to resolve into. A parametric `= P` is FIXED and `~ P` DEFAULT where it is written, the parameter in `value`; materialisation substitutes the argument into `value` and changes no other fact, and `optional` is the name's mark as written (Part 2 Section 5.7). - `arguments` elements are type_argument records: `{ name: ... }` is a reference — including, in template bodies, parameter references of either kind, read against `parameters` — and `{ value: ... }` is a concrete literal. - An open entry is one of two values (Part 2 Sections 5.10, 8.1). A record template is a `!record` with `parameters`, read as the vocabulary and not held: a parameter stands at a field's type, a field's value or an application's argument, and its `chain` holds `parents` as written, one of which may be an application. Every other open entry is held: a `!template` carrying its `parameters` and, as text in `template`, the constructor application as written — a container as `!array`/`!map`/`!tuple`/`!choice`, an atom constructor as `!integer_type`, an alias as `!reference` — unread until materialisation substitutes the parameters away. An entry that closes a template application carries the derived `@application` at its schema-map key, the application it is the instantiation of, read as stated on ingest; none appear here, as nothing in this schema applies a non-constructor template. - Synthetic entries — the closed forms the sugar lifts to (Part 2 Section 5.3) — are instances of the constructor they build, are referenced by the field that wrote the sugar, and carry the derived `@synthetic` marker at their schema-map keys (Part 2 Sections 6, 8.2); on ingest the marker is discarded and recomputed. Their internal names here follow the convention `__xxhash`, where the trailing `xxhash` is a placeholder for a content hash of the resolved binding record: the *shape* of the data — one internally named, `@synthetic`-marked entry per distinct concrete form — is the conformance point; the hash spelling is an implementation's own business and the placeholder is deliberately not a real digest. - Bare parameter names (e.g. T) in bodies are read against the enclosing entry's `parameters` list. """ !schema { top => !record { chain: { subtypes: [array atom choice enum enum_type field_map identifier_type integer_type iri_type kind_type map namespace product record ref_type reference regex_type schema set_type sum template text_type tuple type value_type void_type] } fields: {} extension: ABSTRACT } type_chain => !record { fields: { parents => !record_field { type: array_type_ref_xxhash optional: true } supertypes => !record_field { type: array_type_name_xxhash optional: true } subtypes => !record_field { type: array_type_name_xxhash optional: true } } } type => !record { chain: { supertypes: [top] subtypes: [array atom choice enum enum_type identifier_type integer_type iri_type kind_type map product record ref_type regex_type set_type sum text_type tuple value_type void_type] } fields: { chain => !record_field { type: type_chain optional: true } } extension: ABSTRACT } atom => !record { chain: { supertypes: [top type] subtypes: [enum enum_type identifier_type integer_type iri_type kind_type ref_type regex_type text_type value_type void_type] } fields: { chain => !record_field { type: type_chain optional: true } } extension: ABSTRACT } product => !record { chain: { supertypes: [top type] subtypes: [array map record set_type tuple] } fields: { chain => !record_field { type: type_chain optional: true } access_pattern => !record_field { type: product_access_type } size_type => !record_field { type: product_size_type } } extension: ABSTRACT } sum => !record { chain: { supertypes: [top type] subtypes: [choice] } fields: { chain => !record_field { type: type_chain optional: true } } extension: ABSTRACT } namespace => !record { chain: { supertypes: [top] subtypes: [field_map schema] } fields: { key_type => !record_field { type: identifier_kind } value_type => !record_field { type: type_kind } ordered => !record_field { type: boolean optional: true role: DEFAULT value: false } } extension: ABSTRACT } reference => !record { chain: { supertypes: [top] } fields: { target => !record_field { type: type_ref } } } template_param => !record { fields: { name => !record_field { type: param_name } type => !record_field { type: type_kind } bound => !record_field { type: type_kind optional: true } } } template => !record { chain: { supertypes: [top] } fields: { parameters => !record_field { type: array_template_param_xxhash } template => !record_field { type: text } } } value_type => !record { chain: { supertypes: [atom top type] } fields: { chain => !record_field { type: type_chain optional: true } } } value => !value_type {} void_type => !record { chain: { supertypes: [atom top type] } fields: { chain => !record_field { type: type_chain optional: true } } } void => !void_type {} boolean => !enum { members: [true false] } integer_size => !record { fields: { bits => !record_field { type: non_negative_integer } signed => !record_field { type: boolean } } } integer_type => !record { chain: { supertypes: [atom top type] } fields: { chain => !record_field { type: type_chain optional: true } size => !record_field { type: integer_size optional: true } min => !record_field { type: integer optional: true } exclusive_min => !record_field { type: integer optional: true } max => !record_field { type: integer optional: true } exclusive_max => !record_field { type: integer optional: true } multiple_of => !record_field { type: non_negative_integer optional: true } members => !record_field { type: integer_member_set optional: true } } groups: [ !field_group { members: [[min] [exclusive_min]] optional: true } !field_group { members: [[max] [exclusive_max]] optional: true } ] } integer => !integer_type { chain: { subtypes: [non_negative_integer] } } text_member_set => !set_type { element_type: text min_items: 1 } text_type => !record { chain: { supertypes: [atom top type] subtypes: [identifier_type iri_type regex_type] } fields: { chain => !record_field { type: type_chain optional: true } min_length => !record_field { type: non_negative_integer optional: true } max_length => !record_field { type: non_negative_integer optional: true } length => !record_field { type: non_negative_integer optional: true } pattern => !record_field { type: regex optional: true } members => !record_field { type: text_member_set optional: true } normalization => !record_field { type: normalization optional: true role: DEFAULT value: NONE } } } text => !text_type {} atom_specification => !record { chain: { subtypes: [identifier_type iri_type regex_type] } fields: { spec => !record_field { type: iri } } } identifier_base => !enum { members: [XID ID ASCII NONE] } normalization => !enum { members: [NONE NFC NFKC NFKC_CASEFOLD ASCII_CASEFOLD] } identifier_type => !record { chain: { supertypes: [atom atom_specification text_type top type] } fields: { chain => !record_field { type: type_chain optional: true } min_length => !record_field { type: non_negative_integer optional: true } max_length => !record_field { type: non_negative_integer optional: true } length => !record_field { type: non_negative_integer optional: true } pattern => !record_field { type: regex optional: true } members => !record_field { type: text_member_set optional: true } normalization => !record_field { type: normalization optional: true role: DEFAULT value: NFC } spec => !record_field { type: iri optional: true role: FIXED value: "https://www.unicode.org/reports/tr31/" } start => !record_field { type: identifier_base optional: true role: DEFAULT value: XID } continue => !record_field { type: identifier_base optional: true role: DEFAULT value: XID } start_add => !record_field { type: text optional: true } continue_add => !record_field { type: text optional: true } medial => !record_field { type: text optional: true } exclude => !record_field { type: text optional: true } } } identifier => !identifier_type { continue_add: "-" } iri_type => !record { chain: { supertypes: [atom atom_specification text_type top type] } fields: { chain => !record_field { type: type_chain optional: true } min_length => !record_field { type: non_negative_integer optional: true } max_length => !record_field { type: non_negative_integer optional: true } length => !record_field { type: non_negative_integer optional: true } pattern => !record_field { type: regex optional: true } members => !record_field { type: text_member_set optional: true } normalization => !record_field { type: normalization optional: true role: FIXED value: NONE } spec => !record_field { type: iri optional: true role: FIXED value: "https://www.rfc-editor.org/rfc/rfc3987" } schemes => !record_field { type: scheme_set optional: true } allow_relative => !record_field { type: boolean optional: true role: DEFAULT value: true } allow_fragment => !record_field { type: boolean optional: true role: DEFAULT value: true } } } scheme_set => !set_type { element_type: scheme_name min_items: 1 } scheme_name => !identifier_type { start: ASCII continue: ASCII continue_add: "+-." exclude: "_" normalization: ASCII_CASEFOLD } iri => !iri_type { allow_relative: false } regex_type => !record { chain: { supertypes: [atom atom_specification text_type top type] } fields: { chain => !record_field { type: type_chain optional: true } min_length => !record_field { type: non_negative_integer optional: true } max_length => !record_field { type: non_negative_integer optional: true } length => !record_field { type: non_negative_integer optional: true } pattern => !record_field { type: regex optional: true } members => !record_field { type: text_member_set optional: true } normalization => !record_field { type: normalization optional: true role: FIXED value: NONE } spec => !record_field { type: iri optional: true role: FIXED value: "https://www.rfc-editor.org/rfc/rfc9485" } } } regex => !regex_type {} type_name => !reference { target: identifier } field_name => !reference { target: identifier } param_name => !reference { target: identifier } type_ref => !record { fields: { name => !record_field { type: type_name } arguments => !record_field { type: array_type_argument_xxhash optional: true } } } type_argument => !record { fields: { name => !record_field { type: type_ref optional: true } value => !record_field { type: value optional: true } } groups: [ !field_group { members: [[name] [value]] } ] } product_access_type => !enum { members: [INDEX NAMED] } product_size_type => !enum { members: [FIXED VARIABLE] } field_role => !enum { members: [FREE DEFAULT FIXED] } record_extension_type => !enum { members: [ABSTRACT FINAL OPEN] } annotation => @annotation !reference { target: void } doc => @annotation !reference { target: text } synthetic => @annotation !reference { target: void } application => @annotation !reference { target: type_ref } record_field => !record { fields: { type => !record_field { type: type_kind } optional => !record_field { type: boolean optional: true role: DEFAULT value: false } voidable => !record_field { type: boolean optional: true role: DEFAULT value: false } role => !record_field { type: field_role optional: true role: DEFAULT value: FREE } value => !record_field { type: value optional: true } } } tuple_element => !record { fields: { element_type => !record_field { type: type_kind } voidable => !record_field { type: boolean optional: true role: DEFAULT value: false } } } field_group => !record { fields: { members => !record_field { type: array_array_text_1_3600e7d5_1_xxhash } optional_members => !record_field { type: array_text_1_xxhash optional: true } optional => !record_field { type: boolean optional: true role: DEFAULT value: false } } } field_map => !record { chain: { supertypes: [namespace top] } fields: { key_type => !record_field { type: identifier_kind optional: true role: DEFAULT value: field_name } value_type => !record_field { type: type_kind role: FIXED value: record_field } ordered => !record_field { type: boolean optional: true role: FIXED value: true } } } record => !record { chain: { supertypes: [product top type] } fields: { chain => !record_field { type: type_chain optional: true } access_pattern => !record_field { type: product_access_type optional: true role: FIXED value: NAMED } size_type => !record_field { type: product_size_type optional: true role: FIXED value: FIXED } fields => !record_field { type: field_map } groups => !record_field { type: array_field_group_xxhash optional: true } extension => !record_field { type: record_extension_type optional: true role: DEFAULT value: OPEN } discriminators => !record_field { type: array_text_1_xxhash optional: true } name_type => !record_field { type: identifier_kind optional: true } parameters => !record_field { type: array_template_param_xxhash optional: true } } } array => !record { chain: { supertypes: [product top type] subtypes: [set_type] } fields: { chain => !record_field { type: type_chain optional: true } access_pattern => !record_field { type: product_access_type optional: true role: FIXED value: INDEX } size_type => !record_field { type: product_size_type optional: true role: FIXED value: VARIABLE } element_type => !record_field { type: type_kind } voidable => !record_field { type: boolean optional: true role: DEFAULT value: false } ordered => !record_field { type: boolean optional: true role: DEFAULT value: true } unique_items => !record_field { type: boolean optional: true role: DEFAULT value: false } min_items => !record_field { type: non_negative_integer optional: true } max_items => !record_field { type: non_negative_integer optional: true } } } set_type => !record { chain: { supertypes: [array product top type] } fields: { chain => !record_field { type: type_chain optional: true } access_pattern => !record_field { type: product_access_type optional: true role: FIXED value: INDEX } size_type => !record_field { type: product_size_type optional: true role: FIXED value: VARIABLE } element_type => !record_field { type: type_kind } voidable => !record_field { type: boolean optional: true role: FIXED value: false } ordered => !record_field { type: boolean optional: true role: FIXED value: false } unique_items => !record_field { type: boolean optional: true role: FIXED value: true } min_items => !record_field { type: non_negative_integer optional: true } max_items => !record_field { type: non_negative_integer optional: true } } } map => !record { chain: { supertypes: [product top type] } fields: { chain => !record_field { type: type_chain optional: true } access_pattern => !record_field { type: product_access_type optional: true role: FIXED value: NAMED } size_type => !record_field { type: product_size_type optional: true role: FIXED value: VARIABLE } key_type => !record_field { type: type_kind } value_type => !record_field { type: type_kind } voidable => !record_field { type: boolean optional: true role: DEFAULT value: false } ordered => !record_field { type: boolean optional: true role: DEFAULT value: false } min_items => !record_field { type: non_negative_integer optional: true } max_items => !record_field { type: non_negative_integer optional: true } } } tuple => !record { chain: { supertypes: [product top type] } fields: { chain => !record_field { type: type_chain optional: true } access_pattern => !record_field { type: product_access_type optional: true role: FIXED value: INDEX } size_type => !record_field { type: product_size_type optional: true role: FIXED value: FIXED } elements => !record_field { type: array_tuple_element_xxhash } } } enum_set => !set_type { element_type: text min_items: 1 } non_negative_integer => !integer_type { chain: { supertypes: [integer] } min: 0 } integer_member_set => !set_type { element_type: integer min_items: 1 } enum_type => !record { chain: { supertypes: [atom top type] subtypes: [enum] } fields: { chain => !record_field { type: type_chain optional: true } name_type => !record_field { type: identifier_kind } members => !record_field { type: enum_set } } } enum => !record { chain: { supertypes: [atom enum_type top type] } fields: { chain => !record_field { type: type_chain optional: true } name_type => !record_field { type: identifier_kind optional: true role: FIXED value: identifier } members => !record_field { type: enum_set } } } choice => !record { chain: { supertypes: [sum top type] } fields: { chain => !record_field { type: type_chain optional: true } variants => !record_field { type: array_type_kind_xxhash } disjoint => !record_field { type: boolean optional: true } } } kind_type => !record { chain: { supertypes: [atom top type] } fields: { chain => !record_field { type: type_chain optional: true } of => !record_field { type: type_name } members => !record_field { type: array_type_name_xxhash optional: true } } } kind => !template { parameters: [{ name: T type: type_name }] template: "!kind_type { of: T }" } identifier_kind => !kind_type { of: identifier_type members: [field_name identifier param_name scheme_name type_name] } atom_kind => !kind_type { of: atom members: [ annotation atom_kind boolean doc field_name field_role identifier identifier_base identifier_kind integer iri non_negative_integer normalization param_name product_access_type product_size_type record_extension_type regex scheme_name synthetic text type_kind type_name value void ] } ref_type => !record { chain: { supertypes: [atom top type] } fields: { chain => !record_field { type: type_chain optional: true } of => !record_field { type: type_name } } } ref => !template { parameters: [{ name: T type: type_name }] template: "!ref_type { of: T }" } type_kind => !kind_type { of: type members: [ annotation application array_array_text_1_3600e7d5_1_xxhash array_field_group_xxhash array_template_param_xxhash array_text_1_xxhash array_tuple_element_xxhash array_type_argument_xxhash array_type_kind_xxhash array_type_name_xxhash array_type_ref_xxhash atom_kind atom_specification boolean doc enum_set field_group field_map field_name field_role identifier identifier_base identifier_kind integer integer_member_set integer_size iri namespace non_negative_integer normalization param_name product_access_type product_size_type record_extension_type record_field regex schema scheme_name scheme_set synthetic template_param text text_member_set top tuple_element type_argument type_chain type_kind type_name type_ref value void ] } schema => !record { chain: { supertypes: [namespace top] } fields: { key_type => !record_field { type: identifier_kind role: FIXED value: type_name } value_type => !record_field { type: type_kind role: FIXED value: top } ordered => !record_field { type: boolean optional: true role: DEFAULT value: false } } } @synthetic array_type_name_xxhash => !array { element_type: type_name } @synthetic array_template_param_xxhash => !array { element_type: template_param } @synthetic array_type_ref_xxhash => !array { element_type: type_ref } @synthetic array_type_kind_xxhash => !array { element_type: type_kind } @synthetic array_type_argument_xxhash => !array { element_type: type_argument } @synthetic array_array_text_1_3600e7d5_1_xxhash => !array { element_type: array_text_1_xxhash min_items: 1 } @synthetic array_text_1_xxhash => !array { element_type: text min_items: 1 } @synthetic array_field_group_xxhash => !array { element_type: field_group } @synthetic array_tuple_element_xxhash => !array { element_type: tuple_element } }