Conformance test catalogue#
The format of the fixtures in
specs/conformance/, the suite every DS runtime is judged by, so
that every runtime's harness reads a fixture the same way; how the
catalogue is versioned; and when a fixture is added.
Paired with:
[LCON] — the categories the fixtures test.
[RTIM] — the harness that runs them.
[LDET] — the determinism guarantee they verify.
What this is not#
Not the test-harness spec (see [RTIM]).
Not a list of tests. The fixtures are the list.
Fixture format [RCTS.1]#
The conformance suite is the set of fixtures at specs/conformance/
([LTES.8.3.1]); a runtime conforms by passing it ([LCON.1.1]). This section
specifies what a fixture is, so that every runtime's harness reads the same
fixture the same way. The obligations the fixtures test are the conformance
categories ([LCON.2], [LCON.3], [LCON.4]).
see also: LCON.1.1, LCON.2, LCON.3, LCON.4, LTES.8.3.1
Fixture ids [RCTS.1.1]#
[RCTS.1.1.1] Fixture ids are spec citations. A fixture's id begins with the citation of the clause it pins ([LTES.8.2.2]). There is no parallel sequence numbering: the id says what the fixture covers.
see also: LTES.8.2.2
[RCTS.1.1.2] Form. A new fixture's id must be the clause citation,
with dots, optionally followed by a suffix ([RCTS.1.1.3]): LCDB.7.8,
LGRA.6.6.2, LFAC.2.5.1_tolerance_bound_inclusive. The fixture's file is
<id>.json.
see also: LCDB.7.8, LFAC.2.5.1, LGRA.6.6.2, RCTS.1.1.3
[RCTS.1.1.3] Several fixtures for one clause. When one fixture cannot
exercise a clause fully (a positive and a negative case, two code paths),
each further fixture appends a suffix to the citation: a lowercase letter
(LCDB.7.8a), or _ and a lowercase name saying what it pins
(LFAC.2.5.1_tolerance_bound_inclusive). Prefer one citation, one fixture.
see also: LFAC.2.5.1
[RCTS.1.1.4] Category routing is by directory, not prefix.
Fixtures live in specs/conformance/<category>/, where
<category> is one of compiler, runtime, temporal, logical,
adapter and cross-tier ([LTES.8.3.1]). One clause may be pinned in
several categories from different angles; the directory disambiguates.
see also: LTES.8.3.1
Fixture fields [RCTS.1.2]#
[RCTS.1.2.1] A fixture is one JSON object, and no object in it, at any depth,
repeats a member name; a harness must refuse a fixture that does
([RCTS.1.2.15]). It must carry id, category,
scenario, rules_ds and expect. Of its optional fields, deprecated,
platform_dependent, libraries, files, clauses, dead_rules_expected
and witnesses have the meaning given below; a stdlib member makes it
malformed ([RCTS.1.2.14]);
any other is advisory to a harness and does not decide whether the fixture passes:
ratified — see also: RCTS.1.2.14, RCTS.1.2.15
[RCTS.1.2.2]
id— the fixture's id ([RCTS.1.1]), equal to its file name without.json. Where the two disagree the file name is authoritative, because every citation of a fixture names its path ([STYL.5.2.8]). A harness must fail a fixture whoseiddisagrees with its file name.
see also: RCTS.1.1
[RCTS.1.2.3]
category— the name of the directory the fixture is in ([RCTS.1.1.4]). A harness must fail a fixture whosecategoryis any other string ([RCTS.1.2.15]), and every fixture in a directory underspecs/conformance/that is not a category of [RCTS.1.1.4], the harness's own directory excepted. It must not report either as skipped.
see also: RCTS.1.1.4, RCTS.1.2.15
[RCTS.1.2.4]
scenario— what the fixture exercises, in a paragraph, naming the code path it drives and, where it cannot pin what its id suggests, saying so ([STYL.5.10.8]).
[RCTS.1.2.5]
rules_ds— the DS program under test, as source. The inputs the harness feeds it (facts, clock steps, mocked responses) are fields ofexpect.
[RCTS.1.2.6]
expect— an object whosekindis one of the names in [RCTS.1.2.10]; the kind decides which of its other fields are read.
see also: RCTS.1.2.10
[RCTS.1.2.7] Passing. A runtime passes a fixture when what it observes satisfies
expect, as its kind defines. A harness must fail a fixture whoseexpect.kindit does not evaluate, not skip it.
[RCTS.1.2.12]
deprecated(optional) — a string giving why the fixture does not apply. A deprecated fixture is not run ([LTES.8.2.3]).
see also: LTES.8.2.3
[RCTS.1.2.13]
libraries(optional) — an object mapping a library's dotted name to its DS source. A harness must make each entry the module that [LIMP.3.1.4] resolves its name to. The program's imports resolve against these modules, then against the standard library ([RCTS.1.2.14]), and against nothing else, as a compiler's search path holds the bundle after every entry an invocation names ([LIMP.3.3.1]).
ratified — see also: LIMP.3.1.4, LIMP.3.3.1, RCTS.1.2.14
[RCTS.1.2.14] The standard library is always there. Every compiler finds its bundled library on every invocation ([LIMP.3.3.1]), so a harness must resolve every fixture's imports against the standard library the repository under test ships under
stdlib/, afterlibraries([RCTS.1.2.13]), andunits.coreis preloaded for every fixture as for every program ([LUNI.4.1.2]). It must read those modules where they ship, never from a copy, and must fail its run, not the fixture, when it cannot read them.A library name that both
librariesand the standard library supply makes the fixture malformed, and a harness must fail it rather than choose between them. A fixture that carries astdlibmember, whatever its value, is malformed too ([RCTS.1.2.15]).
ratified — see also: LIMP.3.3.1, LUNI.4.1.2, RCTS.1.2.13, RCTS.1.2.15
[RCTS.1.2.16]
clauses(optional) — an array of clause ids, each a string: the clauses the fixture tests besides the one itsidleads with. It is the fixture's linking comment ([STYL.5.3.6.3]). A harness does not read it, and it does not decide whether the fixture passes.
[RCTS.1.2.17]
dead_rules_expected(optional) — an array of rule names, each a string: the rules ofrules_dsthe fixture requires never to fire. A harness must fail a fixture whose array names a string that is no rule ofrules_ds. Its firings are judged when itsexpect.kindisruntime_fact_count,temporal_sequence,adapter_calls,adapter_cache_sets,adapter_cache_deletes,adapter_mock, or a kind whose category in [RCTS.1.2.10] islogical: these kinds observe every rule that fires. For such a fixture, with or without the field, a harness must fail it when a rule the array names fires, and when a rule ofrules_dsthe array does not name never fires. A harness must fail a fixture of any other kind whose array is not empty, because nothing it observes can check the array.
ratified — see also: RCTS.1.2.10
[RCTS.1.2.20]
expect.splice_field(optional,rfcs_roundtriponly) — an integer: the field number of the unknown atom a harness splices into the recording after itsStreamHeader. Absent, it is 2000. A harness must fail a fixture whosesplice_fieldis outside the skip band, 256 through 2047 ([RFCS.16.2]), or is a field ofAtom'soneof body, because the spliced atom would then be read as one the reader knows and not skipped ([RFCS.16.3]). A numberproto/atom.protolists asreservedis admitted: a retired or deferred atom's number is what the field is for. A harness must fail a fixture of any otherexpect.kindthat carries the field.
ratified — see also: RCTS.1.2.10, RFCS.16.2, RFCS.16.3
[RCTS.1.2.21]
expect.tamper(optional,runtime_error,replay_determinismandruntime_fact_countonly) — an edit a harness must make to the compiled artefact before the runtime loads it. It is a string, an object of exactly one member from a closed set, or a list of such objects.A string names one byte, whose lowest bit a harness must flip, leaving the stored
dsc_sha256as the compiler wrote it ([RDSC.3.6]):dsc_sha256: the first byte of the header'sdsc_sha256;last_byte: the artefact's last byte.
An object names one structural edit. A harness must make it and then recompute
dsc_sha256over the edited artefact as [RDSC.3.6] states, so that a refusal at load is the edit's and not the hash's. The hash it recomputes is the 32-byte field 7 of the firstDscHeaderatom that a walk of the artefact's frames ([RFCS.19.1]) reaches from its first byte. Where the walk reaches none, or that atom's body does not walk to such a field, there is no hash to recompute, and a harness must hand the runtime the artefact as the edit left it:truncate_tail, an integer N greater than 0 and less than the artefact's length: its last N bytes are removed ([RDSC.9.7]);truncate_to, an integer N of at least 0 and less than the artefact's length: it keeps its first N bytes, so N = 0 leaves it empty ([RDSC.11.1]);bad_wire_type, an atom's field number F: the first byte of the body of the first atom numbered F, which begins a field's key, gets wire type 7 ([RDSC.9.5]);drop_schema_group, a schema name S: the atoms of S's schema group, from its lifecycle atom through itsSchemaDef, are removed ([RDSC.8.1], [RDSC.8.7]);drop_terminal_parent, a rule name R: theBetaNodewhose id theTerminalNoderealizing R carries asparent_beta_idis removed ([RDSC.11.1]);drop_call_operand, a rule name R: in the oneTerminalNoderealizing R, the first action that is anACTION_CALLwhoseexpris acallloses the last of that call'sargs([RDSC.4a.9.3]). The artefact is not refused at load for it, so the fault a fixture names comes from one of its steps.
Four more each make one of [RDSC.11.3]'s load refusals, in the one
TerminalNoderealizing a rule R:drop_action_expr, a rule name R: the first action of kindACTION_CALLloses itsexpr;clear_action_expr, a rule name R: that action'sexpris replaced by anExprwith no field, so no member of itskindis set;drop_assign_expr, a rule name R: the firstSlotAssignof the first action of kindACTION_ASSERTorACTION_LOGICAL_ASSERTloses itsexpr;nest_action_expr, an object of exactly two members,rule, a rule name R, andlevels, an integer N of at least 1: theexprE of the first action of kindACTION_CALLis replaced by anExprwhoseunopis anotof operand E, N times over, so everyExprin E sits N deeper.
Two more each set the
opof oneCallExprto N, in the oneTerminalNoderealizing a rule R, so that the op stands at one of [RDSC.4a.9.3]'s two sites. Each is an object of exactly two members,rule, a rule name R, andop, an integer N of at least 0. A harness must write N as the call'sop, its field 3, after the call's other fields, and drop the one it had:set_action_op: the call that is theexprof the first action of kindACTION_CALLwhoseexpris acall, so N stands as an action'sexpr;set_assign_op: the call that is theexprof the firstSlotAssignof the first action of kindACTION_ASSERTorACTION_LOGICAL_ASSERT, so N stands inside an expression.
For these two, an
exprthat is nocall, or a call with noopwritten, is no site.Two more each make the
DscHeader'scapabilitieslist one [RBND.1.3] refuses at load. A harness must edit the list in place, written packed and every entry one varint byte, so no length moves:duplicate_capability, an integer I of at least 0: entry I + 1 takes entry I's value, so one capability appears twice;swap_capabilities, an integer I of at least 0: entries I and I + 1 swap, so the list is not ascending.
For these two, a list with no entry I + 1, with an entry wider than one byte, or not written packed is no site.
One more sets one field of one atom, as no compiler writes it, so that a body refusal of [RDSC.4a.3], [RDSC.4a.6], [RDSC.4a.6.1], [RDSC.4a.9.1] or [RDSC.9.10] can be a fixture:
set_field, an object of exactly three members: eithernode, an integer N of at least 1, oratom, an array of two integers, an atom number F of at least 1 and an occurrence index I of at least 0;path, an array of integers, a field number of at least 1 and then any number of pairs of an occurrence index of at least 0 and a field number; andvalue, an integer of at least 0, a string, an object of exactly one member,f64, whose value is a string of 16 lowercase hexadecimal digits, ornull. Withnode, the atom is the oneAlphaNode,BetaNodeorTerminalNodewhosenode_idis N; withatom, it is occurrence I, counted from 0, of the atoms numbered F, in the artefact's order. In that atom, each pair of a field number and an index selects that occurrence, counted from 0, of that length-delimited field of the message reached so far, and the path's last field number names a field of the last message reached. A harness must remove every occurrence of that field and then, unlessvalueisnull, write it once after that message's other fields: an integer as a varint; anf64as the 64 bits its digits spell, most significant first, with wire type 1 and the eight octets least significant first, as adoubleis written; and a string as its UTF-8 octets, length-delimited, so""also writes an empty message. A harness must re-frame every message on the path, and the atom.
For
set_field, no node or two nodes with the id N, fewer than I + 1 atoms numbered F, an occurrence the message does not carry, a selected field that is not length-delimited, ornullfor a field the message does not carry is no site.Two more remove or add whole frames, so that [RDSC.11.1]'s rows for an artefact that is not an atom container, and its framing rows, can be fixtures. Each counts the artefact's atoms from 0, by a walk of its frames from its first byte:
drop_atom, an integer K of at least 0: atom K's frame is removed, so K = 0 removes theDscHeader;insert_bytes, an object of exactly two members:at, an integer K of at least 0, andhex, a string of an even number, at least two, of lowercase hexadecimal digits. The octetshexspells, two digits to an octet, most significant digit first, are inserted before atom K, or after the last atom when K is the number of atoms. They need not make a frame, and a fixture's scenario says what they are.
For
drop_atom, a K that is not less than the number of atoms the walk reaches is no site. Forinsert_bytes, a K greater than that number is no site, and so is a walk that stops before the artefact's end.A list names two or more of the objects above, none of them
drop_call_operand, so that one artefact can carry two defects and a fixture can pin which of them a loader refuses first ([RDSC.9.5], [RDSC.8.7]). A harness must make the edits in the list's order, each to the artefact the ones before it left, and then recomputedsc_sha256once, over the result, as [RDSC.3.6] states. Each edit must have a site in the artefact it is made to.On a
replay_determinismfixture,tampermust bedrop_call_operand, and a harness must give the edited artefact to both the engine that records and the engine that replays. The run must halt the engine ([NCBK.2.9]), and a harness must fail a fixture whose run does not; the step during which it halts is the run's outcome ([RCTS.1.2.28]). The replay must reach the end of the recording ([RFCS.6.7]) and leave the replaying engine halted by the fault that halted the recording one. A harness must not read the replaying engine's working memory: on a halted engine it is undefined ([LERR.1.4.7]) and the read is refused ([NCBK.2.9]).On a
runtime_fact_countfixture,tampermust be an object other thandrop_call_operand, or a list, so that a run on an edited artefact that must raise nothing can be a fixture ([RCTS.1.2.31]). A string's artefact is refused at load for its hash, anddrop_call_operand's fault is a step's, which that kind does not observe. A harness must make the edit beforeadd_compiled_code's, and must fail the fixture when the runtime refuses the edited artefact at load.A harness must fail a fixture whose
tampernames no member of the set, gives a member an argument of another type, or has no site in the artefact. It must fail a list of fewer than two members, or one holding a string, a list ordrop_call_operand. It must fail areplay_determinismfixture whosetamperis anything butdrop_call_operand, aruntime_fact_countfixture whosetamperis a string ordrop_call_operand, and a fixture of any otherexpect.kindthat carries the field. The set grows only by a change to this clause.
ratified — see also: LERR.1.4.7, NCBK.2.9, RBND.1.3, RCTS.1.2.28, RCTS.1.2.31, RDSC.11.1, RDSC.11.3, RDSC.3.6, RDSC.4a.3, RDSC.4a.6, RDSC.4a.6.1, RDSC.4a.9.1, RDSC.4a.9.3, RDSC.8.1, RDSC.8.7, RDSC.9.10, RDSC.9.5, RDSC.9.7, RFCS.19.1, RFCS.6.7
[RCTS.1.2.22]
witnesses(optional) — an array of strings, each<path>#<name>: achecksentry with rolewitness, on a clause the fixture links, whose scenario the fixture's steps and expectation are ([STYL.5.3.6.4]). A harness does not read it, and it does not decide whether the fixture passes.
[RCTS.1.2.23] The recording fields (each optional,
rfcs_roundtriponly) — what a harness gives the engine before it records, and what it reads back from the recording, besideexpected_atoms. A harness must fail a fixture whose value for one is not of the type stated here, and a fixture of any otherexpect.kindthat carries one of them.late_startis the one exception: areplay_refusedfixture carries it too ([RCTS.1.2.18]).run_idandtier_id, strings: a harness must give them to the engine through the runtime's own interface before it records anything.""is the same as absent ([NLFC.1.2]). A harness that cannot give the runtime under test an id the fixture names must fail the fixture, and must not run it without the id.late_start, an integer N: a harness must attach the recorder after the first Nsteps, so the recording holds only what the steps after them produce. The field's range, and the refusal of first Nstepsthat put no event on the stream, are [RCTS.1.2.18]'s.expected_event_ids, an array of strings: theevent_idof everyFactAssertin the recording, in stream order ([LFST.5.6], [RFCS.6.8]). A harness must read each from the decoded recording, and must fail the fixture if the counts differ or any entry differs.expected_fact_ids, an array of objects{"atom": A, "fact_id": N}, A one ofFactAssert,FactEmitandFactWithdrawand N a non-negative integer: every atom of those three in the recording, in stream order, as its message's name and itsfact_id([RFCS.6.9]). A harness must read each from the recording, and must fail the fixture if the counts differ or any entry differs.expected_emits, an array of objects{"rule_name": R}, R a string: everyFactEmitin the recording, in stream order, as itsrule_name([RFCS.6a.2]), an absent field read as its protobuf default. A harness must read each from the recording, and must fail the fixture if the counts differ or any entry differs.expected_publishes, an array of objects{"schema_name": S, "rule_name": R}, S and R strings: everyFactPublishin the recording, in stream order, as itsschema_nameand itsrule_name([RFCS.27.1]), an absent field read as its protobuf default. A harness must read each from the recording, and must fail the fixture if the counts differ or any entry differs.expected_cache_seeds, an array of objects{"key": K, "value_json": V, "deadline_ns": N}, K and V strings and N an integer from 0 to 2^63 − 1: everyCacheSeedin the recording, in stream order, as its three fields ([RFCS.26.1]), an absent field read as its protobuf default. A harness must read each from the recording, and must fail the fixture if the counts differ or any entry differs.expected_stream_kinds, an array of event kind names, asevent_sequence'sexpected_kindsnames them ([RCTS.1.2.10]): the events the stream callback receives while the steps run, cut down to the kinds the array names, must be the array, in order. Events of other kinds may come between them. Withexpected_atoms, it holds the recording to the events of the same run ([RFCS.3.6]).expected_slots, an array of objects: everySlotatom of the schemas the objects name inschema_name, in stream order, each as the fields present on it, by theirproto/slot.protonames, an enum by its number ([RFCS.5.1]).expected_withdraw_causes, an array of strings: the cause of everyFactWithdrawin the recording, in stream order, by its name inFactWithdraw.Cause, orCAUSE_<n>for a number the enum does not name ([RFCS.7a.2]).rewrite_withdraw_cause, an object{"index": I, "cause": N}of two non-negative integers: before anything decodes the recording, a harness must re-encode its I-thFactWithdraw, counting from 0 in stream order, with cause N, and keep every other field and atom. A harness must fail a fixture whose run records no I-thFactWithdraw.
ratified — see also: LFST.5.6, NLFC.1.2, RCTS.1.2.10, RCTS.1.2.18, RFCS.26.1, RFCS.27.1, RFCS.3.6, RFCS.5.1, RFCS.6.8, RFCS.6.9, RFCS.6a.2, RFCS.7a.2
[RCTS.1.2.9]
platform_dependent(optional) —truemarks a boundary scenario excluded from cross-platform comparison ([LCON.3]).
see also: LCON.3
[RCTS.1.2.10]
expect.kind |
Category |
A runtime passes when |
|---|---|---|
|
compiler |
the program compiles with no diagnostic |
|
compiler |
compilation fails with the stated code, and with no other error code but those |
|
compiler |
SHA-256 of |
|
compiler |
for each rule |
|
compiler |
the program and |
|
compiler |
the compiler's |
|
compiler |
the compiler's |
|
compiler |
the compiler's |
|
compiler |
the program, compiled from files ([RCTS.1.2.35]), compiles, and its |
|
compiler |
the harness refuses the fixture as malformed under the clause |
|
runtime |
after the stated asserts and optional pump, working memory holds the stated number of facts |
|
runtime |
the load, a cache seed or an input is refused with the stated status code, and the refusal satisfies the fixture's other fields ([RCTS.1.2.25]) |
|
runtime |
a recorded session replayed into a fresh engine reproduces the recorded stream byte for byte |
|
runtime |
a recorded session altered by the stated |
|
runtime |
the runtime's recording of the stated session writes every message's fields in ascending field-number order, a field that is not repeated at most once ([RCTS.1.2.19]) |
|
runtime |
an engine cloned mid-run and driven identically to its source produces the same stream, and either survives the other being freed |
|
runtime |
the framing vectors encode and decode to the stated bytes |
|
runtime |
a recorded session encodes to a fact stream and decodes back unchanged; where |
|
runtime |
a stream decodes with and without the rule artefact, differing only where typed slots need it |
|
runtime |
rule-fire order and fact count are the same for every stated insertion order |
|
temporal |
after a sequence of asserts, pumps and clock steps, working memory holds the stated number of facts |
|
logical |
the stream's events of the stated kinds are exactly the stated kinds, in order; events of other kinds may come between them |
|
logical |
the stream is exactly the stated event kinds |
|
logical |
stream |
|
logical |
none of the stated event kinds appears |
|
logical |
rules begin firing in exactly the stated order |
|
logical |
|
|
logical |
the session header's fields have the stated values |
|
logical |
every stated check holds on the introspection surface it names ([RCTS.1.2.26]) |
|
cross-tier |
each labelled engine holds the stated number of facts |
|
cross-tier |
each labelled engine's stream carries the stated count of each event kind |
|
adapter |
the |
|
adapter |
the cache-set callback receives exactly the stated sets, in order |
|
adapter |
the cache-delete callback receives exactly the stated deletes, in order |
|
adapter |
with the stated |
|
adapter |
with a mock integrator answering hydration requests, the stated outcome follows |
|
adapter |
with an essential callback unregistered, the pump fails with the stated message |
|
adapter |
with no cache persistence callback, the cache verb succeeds and still emits its action |
ratified
[RCTS.1.2.11] The set of kinds is closed. A fixture's expect.kind
must be a name in [RCTS.1.2.10], and adding a kind is a change to that table.
A deprecated fixture ([RCTS.1.2.12]) is not run, and keeps the kind it was
written with, whether or not the table still names it. Each kind's fields — what it reads besides kind, and how it compares them
to what the runtime observes — are to be specified here, one kind at a time.
These kinds' fields are specified whole: malformed_fixture
([RCTS.1.2.15]), replay_refused ([RCTS.1.2.18]), field_order and
dsc_field_order ([RCTS.1.2.19]), runtime_error ([RCTS.1.2.25]),
introspection_assert ([RCTS.1.2.26]), runtime_fact_count and
temporal_sequence ([RCTS.1.2.31]), rule_fire_order,
log_message_sequence, event_sequence, event_sequence_strict and
event_kinds_forbidden ([RCTS.1.2.32]), and event_seq_monotonic and
header_field_eq ([RCTS.1.2.33]). Every other kind's fields are
unspecified, but for those a clause here names, and this clause records the
gap.
see also: RCTS.1.2.10, RCTS.1.2.12, RCTS.1.2.15, RCTS.1.2.18, RCTS.1.2.19, RCTS.1.2.25, RCTS.1.2.26, RCTS.1.2.31, RCTS.1.2.32, RCTS.1.2.33
[RCTS.1.2.15] malformed_fixture: a vector the harness must refuse.
A fixture whose expect.kind is malformed_fixture carries one more field,
expect.reason: the id of the clause of this document under which the fixture
is malformed, as a string (for example "RCTS.1.2.14"). Its subject is the
harness, not a runtime: it pins that a harness refuses what the format makes
malformed.
A harness must check every fixture against the format before it compiles the
program or drives a runtime, and must name, in each such refusal, the clause
the fixture breaks. It passes a malformed_fixture fixture only when it
refuses it under the clause expect.reason names. It must fail the fixture if
it accepts it, or if it refuses it under any other clause. It drives no runtime
for it.
ratified — see also: RCTS.1.2.14
[RCTS.1.2.18] replay_refused: a recording the replayer must refuse.
A fixture whose expect.kind is replay_refused carries steps, the
session's inputs; code, the status the refusal must carry, as the negative
integer in a string; and exactly one of mutation, an object; late_start,
an integer; and replay_cache_cap, an object. A harness must record the
session with the runtime's own recorder, alter the recording as mutation or
late_start says, and replay it into a fresh engine with the runtime's own
replayer, bounded as replay_cache_cap says. The runtime passes only when the
unaltered recording replays with no refusal into a fresh engine with no cache
bound, and the altered one is refused with code. A harness must fail a
fixture with more or fewer than one of the three, and a fixture of any other
expect.kind that carries replay_cache_cap.
replay_cache_cap alters the engine the recording is replayed into, not the
recording. It is an object as [RCTS.1.2.25]'s cache_cap is, and a harness
must set its bounds on that engine before the load, and on no other. The
recording engine has none, so a CacheSeed it recorded can be one the
replaying engine refuses ([RFCS.26.2]).
late_start: N alters when the recording begins, not what it holds. A harness
must run the first N steps on the writer before its recorder is attached and
record only the steps after them, so the recording begins part-way through the
run and its first event's seq is not 0 ([LTIM.2.8.5], [LFST.5.3]). The
unaltered recording is the same session recorded from its first step. A
harness must fail a fixture with a late_start that is not an integer from 1 to one less than the number of steps, or first N
steps that put no event on the stream, after which the recording would
begin at seq 0.
mutation's op is one of a closed set, each member tied to the reader clause
the altered recording breaks. Every member but drop_schema_def, drop_fault
and append_engine_error keeps every length in the recording; those three
remove or add whole atoms and change no byte of any other atom:
rename_schema, withfromandto, two schema names of one length in UTF-8: every occurrence offrom's bytes in the recording is replaced byto's, so the recording asserts a schema the program does not hold ([RFCS.5.4]);retract_unknown_fact_id: thefact_idof the recording's firstFactRetract, one varint byte, is replaced by127, an id noFactAssertorFactEmitin the recording carries ([RFCS.7.3]);merge_timetags, withfirings, two integers i < j: the i-th and j-thRuleFireAnnotations of the recording, counting from 0 in stream order; every occurrence of the j-th'stimetag, in aRuleFireAnnotation,CallIssued,ComputationErrororBoundsError, is replaced by the i-th's, so two firings the engine keeps apart share onetimetagand the pairing breaks ([LFST.9.3.6]);split_timetag, withatom, an integer from 0: thetimetagof theatom-thCallIssuedof the recording, counting from 0 in stream order, is replaced by the least nonzero value of the same varint width that noRuleFireAnnotation,CallIssued,ComputationErrororBoundsErrorin the recording carries, so one firing's atoms carry two recordedtimetags and its one re-derivedtimetagmeets a second recorded one: [LFST.9.3.6]'s second direction, whichmerge_timetagsdoes not reach;unknown_capability: the first entry of the recording'sStreamHeadercapabilitiesis replaced by127, a numberCapabilitydoes not allocate, so the header lists something that is no member ([RBND.1.3]);withdraw_cause, withindex, an integer from 0, andcause, an integer from 1 to 127: theindex-thFactWithdrawof the recording, counting from 0 in stream order, has itscause, one varint byte, replaced bycause, so the recorded withdrawal differs from the one the replayer re-derives. A reader carries a cause the enum does not hold ([RFCS.7a.2]), and the atom is compare class ([RFCS.7a.3]), so the refusal is the comparison's, not the decoder's;publish_name, withindex, an integer from 0;field,schema_nameorrule_name; andto, a string: that field of theindex-thFactPublishof the recording, counting from 0 in stream order, is replaced byto's UTF-8 octets, so the recorded publish differs from the one the replayer re-derives ([RFCS.27.2]);seed_after_event: the recording's firstCacheSeedis moved, its frame whole, to just after the first atom that is neither theStreamHeader, aSchemaDef, aSlotnor aCacheSeed, so a seed follows an event atom, which no recorder writes ([RFCS.26.2]);fault_node, withatom,TypeErrororComputationError: thenode_idof the recording's first such atom, one varint byte, is raised by one, so the recorded fault differs from the one the replayer re-derives ([LFST.9.3.1]);drop_fault, withatom, asfault_node's: the recording's first such atom is removed, its frame whole, so the replayer re-derives a fault the recording lacks ([LFST.9.3.1]);append_engine_error: anEngineErrorwithfault1,seq999 andrule_nameris added after the recording's last atom, so the recording holds a fault the replayer does not raise ([RFCS.6.7]);drop_schema_def, withschema, a schema name S: everySchemaDefatom whoseschema_nameis S, and everySlotatom whoseschema_nameis S, is removed, and everyFactAssertnaming S is kept, so the recording asserts a schema it never announced ([RFCS.5.3], [RFCS.5.4]).
A harness must fail a fixture whose mutation names no member of the set, or
has no site in the recording: no from to rename, no FactRetract, a
fact_id wider than one byte, an id 127 the recording carries, an
ExternalAssert, whose fact_ids the second member does not read, no i-th or
j-th RuleFireAnnotation, two that already share a timetag, two
timetags whose varints differ in width, no atom-th CallIssued, one
whose timetag is not written, no free value of its width, a StreamHeader whose
capabilities are not written packed or begin with an entry wider than one
byte, no index-th FactWithdraw, one whose cause is not written (proto3
writes no default) or is wider than one byte, a cause equal to the one it
would replace, no index-th FactPublish, one whose field is not written, a
to of another length in UTF-8 than the value it would replace or equal to it,
no CacheSeed, no such event atom after the first, no
SchemaDef for S, no FactAssert naming S, no such fault atom, an atom of
another name, a node_id not written, wider than one byte or of 127, a
recording that does not walk to its end for the last two members, or one that
already holds an EngineError for the last. The set grows only by a
change to this clause.
ratified — see also: LFST.5.3, LFST.9.3.1, LFST.9.3.6, LTIM.2.8.5, RBND.1.3, RCTS.1.2.25, RFCS.26.2, RFCS.27.2, RFCS.5.3, RFCS.5.4, RFCS.6.7, RFCS.7.3, RFCS.7a.2, RFCS.7a.3
[RCTS.1.2.19] field_order: a recording's fields in the order its
writer must write them. A fixture whose expect.kind is field_order
carries two more fields: steps, the session's inputs as [RCTS.1.2.28] states
them; and atoms, a list of names of messages the Atom oneof holds. A
harness must fail the fixture when its recording holds no atom of a name
atoms lists, so that each is shown to be walked. A harness must record the session with the runtime's own recorder and
walk the recording from its Stream message by the field types proto/
declares: each length-delimited field whose type is a message is walked as
that message, and each fact body (FactAssert.fact, FactEmit.fact) is
walked as a message of one scalar field per slot ([RDSC.5.8.3]). The runtime
passes only when, in every message the walk reaches, each field's number is
at least the number of the field before it, and a field that is not repeated
appears at most once ([RFCS.19.5]).
Before it judges the recording, a harness must alter a copy of it: in the first atom body whose first two fields have different numbers, those two fields swap places, which keeps every length. A harness must fail the fixture when its walk does not refuse that copy, or when no atom body has two such fields.
A fixture whose expect.kind is dsc_field_order binds the other container
([RFCS.19.1]) and the compiler: it carries atoms and no steps. A harness
must compile rules_ds with the compiler under test and judge the .dsc it
writes as this clause judges a recording, walked from its Dsc message in
place of Stream, and with the same altered copy refused first. The compiler
passes only when every message the walk reaches keeps both rules above.
see also: RCTS.1.2.28, RDSC.5.8.3, RFCS.19.1, RFCS.19.5
Expected results [RCTS.1.3]#
[RCTS.1.3.1] A fixture's expected result is its expect, written from the
clause it pins. Where a category compares runs rather than checking a
stated result — a replay against its recording ([LCON.2]), or one platform
against another ([LCON.1.3]) — expect names that comparison, as
replay_determinism does.
[RCTS.1.2.24]
expect.timetag_offset(optional,replay_determinismonly) — a positive integer N. Before the replay, a harness must add N to every nonzerotimetagthe recording'sRuleFireAnnotation,CallIssued,ComputationErrorandBoundsErroratoms carry, re-frame each atom it changes, and replay the result with the runtime's own replayer. Atimetagis stream-local and compared by its pairing ([RFCS.11.2], [LFST.9.3.6]), so the fixture passes as areplay_determinismfixture without the field does. A harness must fail a fixture whosetimetag_offsetis not a positive integer, or whose recording carries no nonzerotimetag, and must fail a fixture of any otherexpect.kindthat carries the field.
ratified — see also: LFST.9.3.6, RFCS.11.2
[RCTS.1.2.25]
runtime_error's fields — a fixture whoseexpect.kindisruntime_errorpins a refusal. A harness must load the compiled artefact, edited astampersays ([RCTS.1.2.21]), into a fresh engine, seed its cache ascache_seedssays, and give it the inputs in order until one is refused. The runtime passes only when the load, a seed or an input is refused, and the refusal satisfies every field below that the fixture carries.code(required), a string: the status the refusal carries, as the negative integer in a string.message_contains, a string or a non-empty array of strings: the refusal's text contains it, or each of them. A harness for a runtime that reports a refusal's reason as a value, not as text, must map each reason it can report onto one text, and must fail a fixture whose refusal has a reason it does not map.steps, an array of objects, the session's inputs as [RCTS.1.2.28] has them, run on the harness's mock clocks; orasserts, an array of objects, each one assert, andpump, a boolean: those asserts in order, then one pump whenpumpistrue. A fixture with none of the three has the load as its only input.cache_seeds, an array of objects, each{"key": K, "value": V},{"key": K, "text": T}or{"key": K, "text_bytes": H}, K and T strings, V any JSON value and H octets as two hex digits each, none of them00: after the load and before the first input, each is seeded under K, in order ([NLFC.9.1]). T is given to the runtime as the seed's JSON text exactly as written, which states a text no JSON value is read back as, such as an integer literal outside int64 ([LGRA.5.8.9]). H is given as the seed's JSON text, its octets unchanged, which need not be well-formed UTF-8: it states a text [LSTR.8.5] refuses, which no JSON string can. H holds no00octet: a U+0000 is [LSTR.1.5]'s refusal, which a binding makes before the call, so no harness could hand it over unchanged. V is given as JSON text with its members in the fixture's order,,between items,:after a key, and every character outside U+0020 to U+007E escaped:\",\\,\b,\f,\n,\rand\tfor those seven, and\uwith four lower-case hex digits for the rest, as a surrogate pair above U+FFFF. So a limit on the text's length ([LGRA.5.8.6]) is met or broken alike in every harness.runtime_fact_counttakes the field too.cache_cap, an object whose members are amongkeysandbytes, each a non-negative integer: the engine's cache bounds, set before the load. A member that is absent or0sets no bound ([LSTO.4.7.5]).fault_at, a non-negative integer: the input that must be refused, counted from 0, insteps, or inassertswith the pump after the last of them. Every input before it must be accepted. A refusal at the load or at a seed is at no input.no_fault_events, a boolean: whentrue, the stream carries noTypeError,BoundsError,ComputationErrororEngineErrorevent once the refusal has happened ([NCBK.2.8]).fault_events, an array of the namestype_error,bounds_error,computation_errorandengine_error: the stream's events of those four kinds, in stream order, are exactly the array.fact_count_after, a non-negative integer: the facts live in working memory once the refusal has happened ([LERR.1.5]). Working memory is neither defined nor readable on a halted engine ([LERR.1.4.7], [NCBK.2.9]), so a harness must fail a fixture that carries it and whose refusal leaves the engine halted.halted_fault, the name of a member ofEngineFault(proto/engine_fault.proto): once the refusal has happened the engine has halted ([NCBK.2.9]), and its halt latch reports that fault ([NCBK.2.11]).last_event, one of the namesfault_eventstakes: the last event on the stream once the refusal has happened is of that kind. Withengine_errorit pins that the EngineError is the tier's last record ([LERR.1.4.7]).
A harness must fail a fixture with no
code, one whose value for any of these fields is not of the type stated here, one withstepsand either ofassertsandpump, one whosehalted_faultnames no member ofEngineFault, and one that carries bothhalted_faultandfact_count_after. It must fail a fixture of any otherexpect.kindthat carriesfault_at,no_fault_events,fault_events,cache_cap,halted_faultorlast_event.
ratified — see also: LERR.1.4.7, LERR.1.5, LGRA.5.8.6, LGRA.5.8.9, LSTO.4.7.5, LSTR.1.5, LSTR.8.5, NCBK.2.11, NCBK.2.8, NCBK.2.9, NLFC.9.1, RCTS.1.2.21, RCTS.1.2.28
[RCTS.1.2.26]
introspection_assert's fields — a fixture whoseexpect.kindisintrospection_assertcarriessteps, the session's inputs as [RCTS.1.2.28] has them, andchecks, a non-empty array of checks. A harness must run the steps, then read each check through the runtime's introspection surface ([LCON.4.5.1]). The runtime passes only when every check holds.A check is an object whose
surfacenames one member of a closed set, and which carries exactly the members that surface takes:fact_count, withequals, a non-negative integer: working memory holds that many live facts.justifiers, withfact_id, a positive integer, andexpect_rules, an array of rule names: the rules justifying that fact, by name and counted with repeats, are the array's.justifier_count, withfact_idandcount, a non-negative integer: that fact has that many justifications.rete_network, withmin_nodesandmin_edges, non-negative integers: the network has at least that many nodes and at least that many edges.slot_schema_ref, withschemaandslot, strings, andequals, a string ornull: the loaded schemaschema's slotslotnames the schemaequalsas its reference, or none whenequalsisnull([RDSC.5.5.5]). The check fails when no such slot is loaded.
A
fact_idnames a fact by the id the runtime gave it ([RFCS.6.9]).add_schema_ref(optional,introspection_assertonly) is an object of exactly three strings,schema,slotandref. Before the load, a harness must give the compiled artefact's oneSlotatom forschema's slotslotaschema_refofref, written in ascending field order ([RFCS.19.5]), re-frame the atom, and recomputedsc_sha256as [RDSC.3.6] states. No compiler writes aschema_refon a slot that is not a schema slot ([RDSC.5.5.5]), so this is how a fixture gives a runtime one to ignore. A harness must fail a fixture whose artefact holds no suchSlot, more than one, or one that already carries aschema_ref.A harness must fail a fixture whose
checksis not a non-empty array of objects; a check whosesurfacenames no member of the set, or that lacks a member its surface takes, carries one it does not take, or gives one a value of another type; and anadd_schema_refof another shape. It must fail a fixture of any otherexpect.kindthat carriesadd_schema_ref. The set grows only by a change to this clause.
ratified — see also: LCON.4.5.1, RCTS.1.2.28, RDSC.3.6, RDSC.5.5.5, RFCS.19.5, RFCS.6.9
[RCTS.1.2.27] A refused assert (optional,
rfcs_roundtriponly) — anassertstep of anrfcs_roundtripfixture'sstepsmay carryrefused, the status the runtime must refuse that assert with, as the negative integer in a string, asruntime_error'scodeis ([RCTS.1.2.25]). A harness must give the runtime the assert, must fail the fixture unless the runtime refuses it with that status, and must then go on to the next step. A bounds refusal of a host assert is recorded ([RFCS.6.7]), so this is how a fixture holds the recording of one to what follows it. Anassertstep withoutrefusedthat the runtime refuses fails the fixture.A harness must fail a fixture whose
refusedis not a string, one that carriesrefusedon a step that is not anassert, and one of any otherexpect.kindthat carriesrefusedon a step.
see also: RCTS.1.2.25, RFCS.6.7
[RCTS.1.2.28] The session's inputs — wherever a fixture's
expectcarries an array of steps (steps, andclone_determinism'safter_cloneandafter_free), each step is an object whoseopnames one member of a closed set, and which carries exactly the members that op takes. A harness must give the runtime under test each step in order, through the runtime's own interface, on the harness's mock clocks:assert, withschema, a string, and optionallyslots, an object;as, a string;corr_from_call, a non-negative integer; andrefused([RCTS.1.2.27]). It is a host assert of a fact ofschemawhose slots haveslots' values. ABytesvalue is written{"$bytes": H}, H its octets as two hex digits each, and nothing else. AStringvalue may be written{"$text_bytes": H}, H its text's octets as two hex digits each, none of them00([LSTR.1.5]), which need not be well-formed UTF-8: a harness must give the runtime those octets as the slot's text, unchanged, which is how a fixture hands the engine text [LSTR.8.5] refuses, and must fail a fixture that gives the form to a slot of another kind. Withas, the fact the assert answers with is kept under that label. Withcorr_from_callN, thecorrslot takes the correlation the N-th call issued so far carried, counting from 0 in the order the calls were issued ([LCCO.3.4]); a harness must fail the fixture when fewer than N + 1 calls have been issued.retract, withlabel, a string: a host retract of the fact kept under that label. A harness must fail the fixture when no earlierassertkept one under it.pump, with nothing else: one pump.advance, withdelta_ns, a non-negative integer: the mock clock is advanced by that many nanoseconds ([NTST.3.1]).set, withnow_ns, a non-negative integer: the mock clock is set to that instant ([NTST.3.1]).wall_set, withutc_ns, an integer: the wall clock alone is set to that instant ([NTST.3.1]).cache_seed, withkey, a string, andvalue, any JSON value, and optionallyttl_ns, an integer from 0 to 2^63 − 1:valueis seeded underkey([NLFC.9.1]), given as [RCTS.1.2.25] gives acache_seedsentry's, withttl_nsas the seed's TTL in engine-clock nanoseconds, which counts from the engine's first sample ([NLFC.9.4]). An absentttl_ns, or0, is a seed with no expiry.
A harness must fail a fixture when the runtime refuses one of its steps (a
setbelow the current instant, [NTST.3.1]; acache_seedafter the engine's first stream event, [NLFC.9.2]; anassertpast a bound), except a refusal the fixture pins: aruntime_errorfixture's ([RCTS.1.2.25]), anassert's that carriesrefused([RCTS.1.2.27]), a pump's under anadapterkind whose row states the pump's outcome ([RCTS.1.2.10]), a pump's in a fixture that carriesexpected_pump_statuses([RCTS.1.2.30]), and, in areplay_determinismfixture that carriestamper, the step during which the engine halts, which must be the fixture's last ([RCTS.1.2.21]).A cross-tier fixture's steps take more ([RCTS.1.2.29]). A harness must fail a fixture whose array of steps is not an array of objects, and one with a step whose
opnames no member of the set, or that lacks a member its op requires, carries one it does not take, or gives one a value of another type, or gives a slot an object with a$bytesor a$text_bytesmember that is not its form above. A deprecated fixture is not run ([RCTS.1.2.12]), so its steps are not judged. The set grows only by a change to this clause.
ratified — see also: LCCO.3.4, LSTR.1.5, LSTR.8.5, NLFC.9.1, NLFC.9.2, NLFC.9.4, NTST.3.1, RCTS.1.2.10, RCTS.1.2.12, RCTS.1.2.21, RCTS.1.2.25, RCTS.1.2.27, RCTS.1.2.29, RCTS.1.2.30
[RCTS.1.2.29] A cross-tier fixture — a fixture in the
cross-tiercategory ([RCTS.1.1.4]) carriesexpect.engines, an object of at least one member: each member's name is an engine's label, and its value an object ofrules_ds, a string, that engine's program, and optionallywall_clock, the string"unset". A harness must compile and load each program into an engine of its own, on mock clocks of its own and with a stream callback of its own, and must run each step on the engine itsenginemember, a label, names. A harness must leave the mock wall clock of an engine whose entry carrieswall_clockunset, as [RCTS.1.2.32] has it for a logical fixture, until awall_setstep on that engine gives it a value ([LTIM.2.8.3]). Besides [RCTS.1.2.28]'s ops, a step of a cross-tier fixture may be:forward, withfrom, a label: every fact thefromengine published since the lastforwardfrom it to this engine ([NCBK.10.1]) is asserted into this engine, under its schema's name and with its slot values, in publication order. A harness must read the name and the values from the publish event while its callback runs ([NCBK.2.5]): the fact is in no working memory of thefromengine ([LTIE.4.3]). Nothing else crosses ([NCBK.10.3]).forward_external, withfrom, a label: everyFactExternalthefromengine's publications carried ([RFCS.23.1]), since the lastforward_externalfrom it to this engine, is given to this engine's own receiving interface ([NCBK.10.4]), in publication order.
A cross-tier fixture's
expectmay carryexpected_published_asserted_at, an object: each member's name is an engine's label, and its value an array with one entry for each fact that engine published while the steps ran, in publication order. The entry is theasserted_atof theFactExternalthe publication carried ([RFCS.23.1], [RFCS.23.5]), an integer, ornullwhere itshas_asserted_atis false. A harness must read each from the record the publish event carried, and must fail the fixture when one of those publications carried no record, when the counts differ, or when an entry differs.A harness must fail a cross-tier fixture whose
enginesis not such an object, one whoseexpected_published_asserted_atis not such an object or names a labelenginesdoes not, and one with a step that carries noengine, or whoseengineorfromnames no label. It must fail a fixture of any other category that carriesenginesorexpected_published_asserted_at, or a step that carriesengineor takes either op.
see also: LTIE.4.3, LTIM.2.8.3, NCBK.10.1, NCBK.10.3, NCBK.10.4, NCBK.2.5, RCTS.1.1.4, RCTS.1.2.28, RCTS.1.2.32, RFCS.23.1, RFCS.23.5
[RCTS.1.2.30]
expect.expected_pump_statuses(optional,adapter_calls,replay_determinism,cross_tier_fact_countsandcross_tier_per_engine_event_countsonly) — an array of integers, one for eachpumpstep ofsteps, in order:0for a pump the runtime completes with no error, and otherwise the status the pump reports: the negative integer aruntime_errorfixture'scodecarries for it, as a number and not a string ([RCTS.1.2.25]). In a cross-tier fixture ([RCTS.1.2.29]) thepumpsteps are every engine's, in the order ofsteps, and each entry is the status of the engine its step names. With the field, a pump the runtime refuses is not a refused step ([RCTS.1.2.28]): a harness must compare its status with its entry and go on to the next step. A harness must fail the fixture when the array's length is not the number ofpumpsteps, or when a pump's status is not its entry. Without the field, a pump the runtime refuses fails the fixture ([RCTS.1.2.28]).On a
replay_determinismfixture the field states the recorded run's pumps, a status a replay continues past ([RFCS.6.7]). The replay is judged as without the field. Such a fixture carries notamper, whose run ends at the step that halts it ([RCTS.1.2.21]).A harness must fail a fixture whose
expected_pump_statusesis not an array of integers each0or less, areplay_determinismfixture that carries both it andtamper, and a fixture of any otherexpect.kindthat carries the field.
ratified — see also: RCTS.1.2.21, RCTS.1.2.25, RCTS.1.2.28, RCTS.1.2.29, RFCS.6.7
[RCTS.1.2.31]
runtime_fact_count's andtemporal_sequence's fields — a fixture of either kind pins how many facts working memory holds after its inputs. A harness must load the compiled artefact into a fresh engine on the harness's mock clocks and give it the inputs below, in order, through the runtime's own interface. The runtime passes only when working memory then holdsfact_count_afterlive facts.fact_count_after(required), a non-negative integer.runtime_fact_count's inputs, each optional, in this order:cache_seeds, as [RCTS.1.2.25] has it;asserts, an array of objects, each a host assert carryingschema, a string, and optionallyslots, an object, as anassertstep carries them ([RCTS.1.2.28]);generate_asserts, an array of objects ofschemaandslot_name, strings,count, a non-negative integer, and optionallystart, an integer, 0 when absent, each standing forcounthost asserts ofschema, whose slotslot_nameholdsstart,start+ 1, and so on, in that order; and one pump, whenpump, a boolean, istrue. A fixture with none of them has the load as its only input.temporal_sequence's inputs:steps, the session's inputs as [RCTS.1.2.28] has them.tamper(optional,runtime_fact_countonly), an edit a harness must make to the compiled artefact before the load, as [RCTS.1.2.21] has it for this kind.add_compiled_code(optional,runtime_fact_countonly), an object of exactly one member,node, an integer N of at least 1. Before the load, and aftertamper's edit, a harness must append to the compiled artefact, after its last atom, oneCompiledCodeatom for each of thearchvaluesamd64,arm64,rv64gandrv64gc, in that order, each withnode_idN,kindCODE_KIND_RHSand abodyof 64 octets of 0, its fields in ascending order ([RFCS.19.5]), and then recomputedsc_sha256as [RDSC.3.6] states. No compiler of this edition writes the atom ([RDSC.4c.3]), so this is how a fixture gives a runtime one for the architecture it runs on. A harness must fail a fixture whose artefact holds noTerminalNodewhosenode_idis N, or more than one.
A harness must fail a fixture of either kind with no
fact_count_after, and one whose value for any of these fields is not of the type stated here. It must fail a fixture of any otherexpect.kindthat carriesadd_compiled_code.
ratified — see also: RCTS.1.2.21, RCTS.1.2.25, RCTS.1.2.28, RDSC.3.6, RDSC.4c.3, RFCS.19.5
[RCTS.1.2.32] The event-list kinds' fields, and
wall_clock— a fixture whoseexpect.kindisrule_fire_order,log_message_sequence,event_sequence,event_sequence_strictorevent_kinds_forbiddencarries, optionally,steps, the session's inputs as [RCTS.1.2.28] has them, and one required array of strings, which its row in [RCTS.1.2.10] compares with the run:expected_rule_namesforrule_fire_order, the names of the rules in the order they begin firing;expected_messagesforlog_message_sequence, the messages of thelogactions in the order they run;expected_kindsforevent_sequenceandevent_sequence_strict, andforbidden_kindsforevent_kinds_forbidden, each a list of stream event kinds by name. A harness must give the steps to a fresh engine on the harness's mock clocks, then make that comparison. It must fail a fixture of these kinds that lacks its array, or whose array is not an array of strings.A fixture of a kind whose category in [RCTS.1.2.10] is
logicalmay carrywall_clock, the string"unset". A harness must then leave the mock wall clock unset, where it otherwise sets it to the Unix epoch, because the unset wall clock is the fixture's subject ([LTIM.2.8.3]). A harness must fail a fixture whosewall_clockis any other value, and a fixture of a kind of another category that carries it.
ratified — see also: LTIM.2.8.3, RCTS.1.2.10, RCTS.1.2.28
[RCTS.1.2.33]
event_seq_monotonic's andheader_field_eq's fields — a fixture of either kind carries, optionally,steps, the session's inputs as [RCTS.1.2.28] has them. A harness must give them to a fresh engine on the harness's mock clocks, then judge what follows.event_seq_monotonicjudges the stream's events, or, whenfilter_kind, a string, is given, only the events of that kind. The runtime passes only when theirseqstrictly increases; there are at leastmin_events, a non-negative integer, 1 when absent; withexpected_seq_step, a positive integer, eachseqis the one before it plus that step; and withexpected_clocks, an array of non-negative integers, the first events'clock_ns, as many as the array has, are the array.header_field_eqjudges the session header ([RFCS.4.1]) throughchecks, a required, non-empty array of checks. A check is an object offield, one ofds_version,session_id,tier_idanddsc_hash, and exactly one assertion:equals, a string, on a field other thandsc_hash, which holds when the field is that string;present, a boolean, which holds when the field's being non-empty is that boolean; orbyte_len, a non-negative integer, ondsc_hashalone, which holds when the hash has that many bytes. The runtime passes only when every check holds.A harness must fail a fixture of either kind whose value for any of these fields is not of the type stated here, and a
header_field_eqfixture with nochecks, an empty one, or a check of another shape.
ratified — see also: RCTS.1.2.28, RFCS.4.1
[RCTS.1.2.34]
compile_error'sexpected_line([RCTS.1.2.10]) — a positive integer: the line ofrules_ds, counting from 1, at which the refusal carrying the fixture'scodebegins. A code names a class of refusal, andDS_PARSE_GENERICnames nearly every parse refusal, so the code alone holds only that the program is refused. The line holds where. The field is optional, but a fixture whosecodeisDS_PARSE_GENERICmust carry it. A harness must fail the fixture unless the compiler, refusing the program withcode, reports that refusal, or one of its refusals withcode, as beginning on that line. It must fail a fixture of any otherexpect.kindthat carries the field, one whose value is not a positive integer, and aDS_PARSE_GENERICfixture without it.
ratified — see also: RCTS.1.2.10
[RCTS.1.2.35]
files(optional,compilerfixtures only) — an object mapping a path to the text of a.dstestfile, which a harness must place beside the program or a library, so that a fixture can give a module its companion, or put a file beside it that is no module's companion ([LTSL.2.4]). A path is one or more segments joined by/, each one or more ASCII letters, digits and_, not beginning with a digit; the last is followed by.dstest.A harness must compile a fixture that carries
files, and everydsc_test_casesfixture ([RCTS.1.2.10]), from files on disk, with the compiler's owncompile([RCLI.1.2]), so that which.dstestfiles the compile reads is the compiler's choice and not the harness's. In an empty directory D it must write the program asD/main.ds, eachlibrariesentry as the file [LIMP.3.1.4] resolves its name to underD/lib([RCTS.1.2.13]), and eachfilesentry at its path under D. It must then compileD/main.dswithD/libon the search path, the standard library after it ([RCTS.1.2.14]), and its dialects registered ([NDLC.2.1]). The program is compiled as written, with nouseline supplied, so itsuseline is its own ([LDIA.2.10.1]).A harness must fail a fixture that carries
filesand whose category is notcompiler, or whoseexpect.kindis notcompile_ok,compile_errorordsc_test_cases. It must fail one whosefilesis not an object whose every value is a string, or names a path in another form, and a fixture it compiles from files whose program has nouseline.
ratified — see also: LDIA.2.10.1, LIMP.3.1.4, LTSL.2.4, NDLC.2.1, RCLI.1.2, RCTS.1.2.10, RCTS.1.2.13, RCTS.1.2.14
[RCTS.1.2.36]
compile_error'salso_raises([RCTS.1.2.10]) — a non-empty list of codes, none repeated and none the fixture'scode: what the program's one fault raises besidescode. Acompile_errorfixture's program differs from a legal one by that one fault, so the codes it is refused with are exactlycodeandalso_raises. A harness must fail the fixture if the compiler raises an error code the two do not name, or does not raise one they name. Warnings are not error codes. A harness must fail a fixture of any otherexpect.kindthat carries the field, and one whose value is not such a list.
ratified — see also: RCTS.1.2.10
Versioning [RCTS.5]#
Catalogue versions [RCTS.5.1]#
[RCTS.5.1.1] The catalogue's version is the DS version. The fixtures
in specs/conformance/ at a DS release's tag are that release's
catalogue. The suite carries no version of its own, as nothing in DS does
but the DS version ([LDET.1.10]). A change to the suite between releases
lands in the next release's catalogue.
see also: LDET.1.10
Runtime conformance claim format [RCTS.5.2]#
[RCTS.5.2.1] A runtime claims conformance as
DS-Conformance/v<DS version>/<platform-signature>, naming the release
whose catalogue it passes ([RCTS.5.1.1]). Example:
DS-Conformance/v1.0.0/linux-x86_64-glibc-2.41.
see also: RCTS.5.1.1
[RCTS.5.2.2] Multiple claims from one runtime are allowed (one per platform signature it's tested on).
When a test is added [RCTS.6]#
[RCTS.6.1] Tests get added to the catalogue when:
[RCTS.6.2] A real runtime incident reveals a bug the catalogue didn't catch.
[RCTS.6.3] A new language feature lands and needs coverage.
[RCTS.6.4] An ambiguity in the spec is resolved and the resolution warrants a test pinning it down.