SpecSheriffIn progress
rule · _guidelines/tools/7.1.16 · s-c2r9jndrjbtbsv6

What a RecordType variant must agree with

Checkedconfirmed by its owner

sheriff validate checks that each RecordType variant agrees with the RecordType it refines, found by the variant's refines link:

  • the fields the variant answers to are those the nearest RecordType up its refines links names as choosing it;
  • each value it answers to is among the values of its choosing field, collected from the field's one source (§s-5nf87c3e3jg9v7c);
  • the variant stands in the part of the specification where its value is declared (§s-xfwuvd3funutmsw);
  • the variant declares at least one field that no RecordType up its refines links holds, the fields their fields of type variant hold included;
  • at most one field of type variant stands along those links;
  • no other variant of the same RecordType answers to the same values.

A variant failing any of these is refused.

The links it makes

The decisions taken on it

2026-10-31 · textual
Problem

The check of data record variants checked a value only where its choosing field held a list of values, so a variant whose field held none passed with any value; nothing held a variant to the domain declaring its value, and the fields a field of type variant holds were not counted among those a variant inherits.

Ruling

The owner: before the first release, 0.1.0, the tools read such values from the choosing field's own list alone, refuse a value not found there, and hold a variant to the part of the data record holding that field; how a project's own guidelines name another place for such values waits past 0.1.0, and the todo stays. Following the rows of §s-jau82aq9juv9zzh on variants, the row says all the check does.

2026-10-31 · textual
Problem

The check of data record variants read a value from its choosing field's own list alone, held a variant to the part of the data record, and counted no fields of type variant, and no check followed an identifier to the field it takes its type from.

Ruling

Following the owner's rulings of that day: the row reads the lists rules of domains define for a field of a data record in contracts (§s-xfu2gpzddjnmgks), holds a variant to the part declaring its value, and counts the fields of type variant; a row follows each identifier to the field identifying its data record. The todo on the other place is settled.