Unreleased documentation. These pages follow the main branch and can change before the next release. For supported guidance, use v0.48.0.
Project fixtures are sanitised inputs to the production bundle loader, script runtime, request materialiser, source projection, output gate, evidence construction, signer, verifier and privacy checks. Evaluation does not start the HTTP server, authenticate a JWT, write audit, resolve source credentials or contact a provider. Package and HTTP-path tests cover those boundaries. Unknown keys, unknown mutation names and an expectation the harness cannot execute fail fixture evaluation.
Focused adapter directories may keep separate JSON input and output files. Complete deployment projects use the YAML format on this page, so you can review one case matrix beside the requirement.
When a fixture is required
Section titled “When a fixture is required”A requirement may omit its fixture reference only while its immutable bundle declares
assuranceProfile: local.
A local bundle may also reference a focused synthetic suite that covers only the cases its project
declares.
A successful local fixture run proves those cases, not readiness for production promotion.
Local serving still uses the ordinary authenticated, authorised, source-bounded, minimum-disclosure,
signed and fail-closed audit path.
Production and evidence-grade bundles require complete fixture coverage and fail to load when a
reference is absent or its captured suite is incomplete.
For production compilation, each editable question names one regular, project-relative
fixtures/<name>.yaml file.
The build copies that file into the package and delegates its execution to evidence evaluate; it
does not reinterpret fixture semantics or manufacture cases.
Missing, symlinked, outside-project, duplicate or incomplete fixture references stop the build before
publication.
The build’s private validation secrets and runtime are not fixture inputs and never appear in the
package.
File shape
Section titled “File shape”apiVersion: id.registrystack.org/formats/evidence/fixture/v1alpha1kind: EvidenceFixturesyntheticOnly: truecommon: observedAt: "2026-08-02T00:00:00Z" selectors: {} derivationSelectorInputs: {} expectedRequestParts: query: [] body: null expectedTransport: path: /v1/search fixedHeaders: - name: Accept value: application/jsoncases: []privacyExpectation: evidenceContains: [] evidenceExcludes: [] diagnosticsExclude: []apiVersion(required):id.registrystack.org/formats/evidence/fixture/v1alpha1.kind(required):EvidenceFixture.syntheticOnly(required): must be the literaltrue. Live values are forbidden.common(required): deterministic inputs inherited by every case.cases(required): a non-empty ordered array of 1 to 256 cases with unique case ids.privacyExpectation(required): tokens and canaries that must be present or absent at the public and diagnostic boundaries.
The bundle loader reads every referenced fixture with the shared configuration reader.
It refuses a missing or unknown envelope, the retired fixture identifier key and a ${...}
expression.
It also refuses a fixture that is not synthetic, or that does not cover every required case category
under production or evidence-grade assurance.
Local suites keep the same envelope, synthetic-data, case-count, unique-id and unresolved-outcome
checks at load, with the same evaluator and privacy checks when the suite runs.
Each refusal names the file, the member, its line and column, and the fix, and never repeats a value
from the file.
The evaluator runs a fixture that declares coequalAcceptanceDefinition: true as a coequal
acceptance definition, and every other fixture under this contract.
Both forms close their root, common, case and expectation control keys at the shared YAML decoding
boundary.
Case ids are local identifiers and unique within the file.
Source, selector, fact and expected-value trees keep their reviewed payload keys and nulls; the
existing source, selector and output contracts check those trees.
The coequal form uses source or sources, optional expectedFacts, expectedValue or
expectedValues, expectedLookup, expectedPublicProblem, derivationRuns and signedSuccess.
Its rejection controls are sourceFailure, injectedDerivation and companionBundle.
Form-specific combinations, source-stage rules, coverage and privacy are runtime semantic checks.
Retired snake_case control spellings are refused with the replacement named; no aliases are accepted.
Production Rhai context members such as legal_local_date keep their ABI spelling.
Common inputs
Section titled “Common inputs”observedAt is required and a case may override it.
Rust derives legal_local_date and legal_local_time from that instant and the requirement’s
configured IANA timezone exactly as it does in production.
A fixture cannot inject those derived values.
A boundary case chooses an observation instant that produces the required local date or time.
selectors contains the complete authorised role map for the requirement.
derivationSelectorInputs, when present, states the exact minimised role map the harness expects
Rust to supply to derive/3.
It must equal the bundle’s closed derivation selector-input declaration.
Omit it when derivation receives an empty map.
purpose names which of the requirement’s declared purposes a case exercises.
You can state it in common, in a case, or in both.
A requirement that declares exactly one purpose may omit it.
A requirement that declares more than one must state it, so offline evaluation reaches every
authorised purpose and none is silently skipped.
An omitted declaration is a fixture contract failure, not an authorisation denial.
A declared purpose the requirement does not list is denied exactly as the served path denies it.
SQLite extract seeds
Section titled “SQLite extract seeds”extract is required of a fixture whose source reads a SQLite extract, and forbidden of one whose
source answers over a network.
It states the world the cases run against as the SQL that builds it, not as a database file, so it
is reviewable in a diff.
The harness materialises it into a temporary read-only file and binds that file in place of the
operator’s path before the project’s own runtime document loads.
It carries the reserved evidence_extract metadata row that any extract must carry, because the
fixture builds a real one and startup refuses a file without it.
The seed is trusted executable project input and is not sandboxed as untrusted code. Run only reviewed project seeds in an isolated local environment. Never import or evaluate a foreign bundle as a fixture.
common: observedAt: "2026-08-02T00:00:00Z" selectors: subject: profile: record-reference-v1 values: record_reference: REC-0001 extract: | CREATE TABLE evidence_extract ( published_at TEXT NOT NULL, publisher TEXT NOT NULL, extract_id TEXT NOT NULL ); INSERT INTO evidence_extract (published_at, publisher, extract_id) VALUES ('2026-08-01T00:00:00Z', 'urn:example:publisher', '2026-08-01-snapshot'); CREATE TABLE records (reference TEXT NOT NULL); INSERT INTO records (reference) VALUES ('REC-0001'), ('REC-0002'); expectedRequestParts: parameters: {} expectedTransport: statement: queries/source-b-lookup.sqlEvery case of that fixture answers from the one extract and picks its subject with selectors,
because a published snapshot is one file holding many records, not one file per outcome.
The statement runs for real against it, which is the one asymmetry in the harness.
An HTTP call needs a network, a credential and a live third party, so it cannot run offline, and its
cases carry the response the provider returned.
Reading a local SQLite file needs none of those, so fixtures stay hermetic, deterministic and
offline while executing the statement for real.
Expected request parts and transport
Section titled “Expected request parts and transport”common.expectedRequestParts is compared structurally after ABI normalisation.
Query-pair order is significant; JSON object order and source whitespace are not.
The harness passes those parts and the resolved authorised selectors through the production request
materialiser and compares the path, the encoded query and the JSON body.
There is no case-level expectedRequestParts override.
query and body are the channels an HTTP request is prepared into.
A statement request has neither, so its fixture states parameters instead: the map preparation
produced, which is {} for a source with no preparation script.
Stating the empty map proves that no script added a parameter of its own.
The two shapes are exclusive, so a fixture cannot state the parts of a transport its source does not
have, and an HTTP fixture that omits query fails to parse instead of defaulting to empty.
A search-then-fetch fixture also supplies common.expectedFetchRequestParts and
common.expectedFetchTransport.
The harness validates them only after the search returns a unique schema-valid FactSet, using that
exact FactSet as the fetch adapter context and the declared prior-fact path input.
common.expectedTransport contains the exact fixed path or expanded path and the exact configured
non-secret headers.
Dedicated redacted transport assertions check authentication and Rust-owned framing headers; they
are never copied into fixture YAML.
A case-level expected.expectedTransport may add an exact encoded query and normalised body for an
encoding-focused case.
A statement source crosses its boundary as a statement and the values bound into it, so its
expectedTransport states statement, the bundle-relative artifact the source declares.
The statement is named, not restated, because its text is a reviewed artifact hashed with the rest of
the bundle.
A case-level expected.expectedTransport may add parameters, the exact map bound into that
statement, which is where a case pins what a caller-supplied value became.
Rust binds the reserved evidence_now at execution time and it is not part of that map.
Case forms
Section titled “Case forms”Every case has a required id and exactly one tagged form.
A case that names no form, or two, fails with a closed-form error.
The forms are:
acquisition: the exact transcript the Adapter pack would send, as recorded packinterceptsand orderedexchanges. Rust replays it through the pack’s real route, so the fixture never pre-projects a response or synthesises an envelope. A casesourcethat still holds a provider response, the retired Source form, is refused with a message naming the replacement.selectors: the authorised role map this case picks out of the fixture’s own extract, replacingcommon.selectorsfor the case. The statement runs, so the case states which record it is about rather than what the source returned.sourceFailure: one closed source failure from the list under Source failure names.declaredUnresolved: true: the data-free outcome of the requirement’s initial HTTP source returning its exact configuredunresolvedProblem. It carries no response body and is refused for an undeclared or statement source.bundleMutation: one named startup mutation.statementMutation: one named mutation of a disposable copy of the reviewed statement, checked while the source compiles.requestMutation: one named authorisation or request mutation.derivationMutation: one named script-output mutation.derivationParameterMutation: one closed mutation of a disposable copy of the requirement’s derivation parameters before startup validation.selectorOverrides: one closed selector-input replacement that exercises preparation rejection or exact transport materialisation.
A form belongs to the transport its source has.
selectors and statementMutation describe an extract and the statement that reads it, and are
refused for a source that answers over a network.
declaredUnresolved belongs only to an HTTP source that declares the tuple.
The remaining forms describe the bundle or the authorised request and read the same on either
transport.
An HTTP source that declares unresolvedProblem uses one declaredUnresolved: true case for the
configured data-free outcome.
That case requires exactly publicProblem: evidence.unavailable, derivationRuns: false,
signed: false and sourceRequestCount: 1, with no lookup expectation.
It covers both the mandatory no-match and ambiguous categories because the provider collapsed those
hidden states before Evidence could observe either one.
No fixture may restate the Problem Details body or pass it to extraction.
A fixture executes a SQLite statement only when that source is the initial acquisition stage. The evaluator refuses a later SQLite stage and cannot represent an initial SQLite search together with later recorded HTTP responses. Treat such a project as local authoring only, and do not bypass the fixture gate to present it as deployable assurance. Replaying a recorded statement result is not evidence for reviewed SQL.
The optional inputs shared by applicable forms are observedAt, and purpose, which selects one of
the requirement’s declared purposes and overrides any common.purpose.
Mutation names
Section titled “Mutation names”The closed mutation names are:
bundleMutation: duplicate-disclosure-family: gives two enabled requirements the same unsafe disclosure family and requires startup rejection.statementMutation: attach-external-database: compiles a disposable statement that attaches a second database and requires the authoriser to refuse it.requestMutation: swap-subject-roles: exchanges the child and candidate-parent role assignments without changing their profiles or origins.requestMutation: supply-grant-derived-candidate: adds caller material for a role whose configured origin is the authenticated grant.derivationMutation: return-raw-reference: replaces the disposable fixture derivation with one that returns the synthetic raw reference as a public value.
Mutation cases never alter the reviewed project files on disk.
Source failure names
Section titled “Source failure names”The closed sourceFailure names are per transport.
A refused connection is not a statement about a local file, and a refused SQL statement is not a
statement about a network.
Naming a failure the source cannot have fails the fixture instead of passing a case that could never
occur:
timeout(both transports): the source exhausted its declared end-to-end timeout.oversized(both): the assembled result exceeded the declared response size.connection-refused(http-json): the origin could not be reached.invalid-media-type(http-json): the response carried a media type the source does not accept.malformed-json(http-json): the response body was not the JSON the source requires.extract-too-old(sqlite-extract): the extract’s published instant is older than the declared bound.statement-parameter(sqlite-extract): a declared prepared parameter was not supplied at request time.statement-budget(sqlite-extract): statement execution exceeded its virtual-machine step budget.statement-result(sqlite-extract): the result exceededmaximumRows,maximumCellBytesormaximumResponseBytes, or result typing or execution failed.statement-unavailable(sqlite-extract): the statement could not be used.
Every one of them collapses into the same source.unavailable public class: what a caller learns
from a source that did not answer is that it did not answer.
Extract opening, metadata, statement-authorizer, column-agreement and static parameter-agreement
failures are startup failures, not request-time sourceFailure cases.
They belong in bundle and statement mutation cases.
SQLite uses one timeout deadline across concurrency admission, blocking-worker queueing and
execution; the separate statement-budget name covers the virtual-machine step ceiling.
A sourceFailure case proves only the closed public-problem mapping for an injected transport
failure.
It is not evidence that the acquisition path reached that failure, and a complete-project fixture
must execute every successful acquisition stage instead of substituting a sourceFailure value for
it.
Expected vocabulary
Section titled “Expected vocabulary”Each case has a required expected object.
Unknown keys and keys irrelevant to the selected tagged form are rejected.
Success, unresolved and failure cases must state their exact lookup, derivation, signing and public
outcome where those stages apply.
Omission is not a wildcard.
lookup:match,no_matchorambiguous; the exact closed extraction outcome.facts: a JSON object; the exact complete fact object after fact-schema validation, never a partial match.value: a supported scalar; the exact value of the requirement’s only concept, for a one-concept requirement.values: a concept map; the exact complete set of disclosed concepts, keyed by concept id, for a requirement disclosing more than one concept.entityReferenceCount: an integer from 0 through 64; the exact number of audience-scoped entity references in the public value.rawReferencesDisclosed: a boolean; whether any configured raw reference appears in evidence. These projects requirefalse.signed: a boolean; whether a flattened JWS success is returned. A validfalseconcept still requirestrue.publicProblem: a problem code; the exact safe public failure code.error: an adapter signal; the exact value-free internal fixture signal, one ofadapter_input_error,source_protocol_errororderivation_input_error.derivationRuns: a boolean; whetherderive/3is invoked.bundle:acceptedorrejected; the startup bundle result.outputGate:acceptedorrejected; the derived-value gate result.rejectedBefore:credential,source,derivationorsigning; the latest boundary that must not be crossed.sourceRequestCount: an integer; the exact number of evidence-data operations in the offline pack replay, excluding OAuth work. The reference evaluator permits 0 through 5, matching the offline runner’s default acquisition budget. Runtime deployments keep their separately configured limits, and this expectation does not configure them. For an injectedsourceFailure, the count is modelled and does not prove source execution.expectedTransport: an object; the exact expanded path, encoded query string and normalised body bytes for a transport-focused case, or the exact statement artifact and bound parameters where the source reads an extract.
expectedTransport is accepted only for the selectorOverrides form.
Successful cases require lookup: match, derivationRuns: true and signed: true.
The harness creates a fresh in-memory P-256 key for the evaluation, signs the constructed Evidence
and verifies the JWS and the exact payload policy.
The private key is never read from deployment secrets, written to disk or included in output.
Unresolved and failing cases require signed: false and the exact derivationRuns value.
A declaredUnresolved case is not a sourceFailure.
It is a configured source outcome and maps to evidence.unavailable, not source.unavailable.
Its explain trace records the neutral unresolved result, never no-match, ambiguous or upstream
problem members.
Every facts expectation is exact.
If a test cares about only two of four facts, it must still list all four, which stops a fixture
from silently accepting a new or leaked fact.
value and values are mutually exclusive, and values is exact in the same way: it states every
concept the requirement discloses, so a new or leaked concept cannot pass unnoticed.
Recorded facts
Section titled “Recorded facts”The coequal form spells the facts expectation expectedFacts.
When present it must be an object valid under the selected source route’s final-facts schema.
The offline runner compares it exactly with the actual final Match facts before derivation; any
non-match, pack failure, or case path that performs no acquisition refuses the expectation.
Keys and nulls keep the source-owned vocabulary.
Omission means the facts are not checked.
Record the object from the offline pack runner’s final Match, never by copying or inferring fields
from a raw provider response.
For an editable project, record the maintained fact assertions explicitly:
evidencectl fixtures record-facts PROJECT \ --target TARGET \ --fixture fixtures/requirement.yaml \ --writeThe command accepts only an exact project-referenced fixture with syntheticOnly: true and
coequalAcceptanceDefinition: true.
It compiles the selected target, delegates the complete fixture evaluation to the matching Evidence
runtime, and writes facts only for final Adapter pack Match outcomes.
A non-match, ambiguous, unresolved or source-failure case, or a case with no acquisition, has no
expectedFacts member.
Existing expectedFacts values are ignored only while this command refreshes them; ordinary fixture
evaluation continues to compare them exactly.
--write is the explicit mutation and private-value opt-in.
Fact keys and values are captured between Evidence and Evidencectl and appear only in the updated
synthetic fixture, never in the human or JSON command report, the explain trace, a diagnostic, an
error or the command line.
Review the fixture diff and rerun the ordinary fixture suite after recording.
Every case is evaluated before the file is atomically replaced, so a partial refresh cannot leave a
mixed fact record behind.
Error classes and public problems
Section titled “Error classes and public problems”Fixtures distinguish unresolved evidence from a broken dependency or bundle contract. Do not choose a public code based only on the stage where a value was noticed.
no_match:evidence.unavailable, HTTP 422. The authoritative lookup found no unique record.ambiguous:evidence.unavailable, HTTP 422. The lookup found several records and no candidate is selected.- The exact configured source-declared unresolved outcome:
evidence.unavailable, HTTP 422. The provider returned its governed data-free unresolved outcome at the initial singular or search stage, and Evidence does not claim whether it was no-match or ambiguous. - Host-private
required_fact_missing:evidence.unavailable, HTTP 422. A uniquely matched record legitimately lacks a fact that the derivation marks required. adapter_input_error:service.unavailable, HTTP 503. Trusted preparation or its closed inputs violate the adapter contract. Credential acquisition and source access must not occur.source_protocol_error:source.unavailable, HTTP 503. The projected provider response violates its protocol, type, count, completeness or fact-shape contract.derivation_input_error:evidence.unavailable, HTTP 422. Matched facts, returned-subject binding, the governed namespace or contract, or derivation parameters are inconsistent. A returned-child mismatch is this class. It collapses publicly with the unresolved classes so a caller cannot learn that a record exists, and it is never an authoritative no-match or a signedfalse.- Source transport failure:
source.unavailable, HTTP 503. A credential, concurrency, timeout, redirect, status, media type, size, JSON, projection or source transport failure stopped the lookup. An unopenable or too-old extract, and a statement the authoriser refused, that lacked a parameter, that exceeded a budget or whose result exceeded a declared bound, are this class. - Audit, signing, output-gate or other script failure:
service.unavailable, HTTP 503. Evidence failed closed within the Evidence service or one of its required release dependencies. A script fault raised while derivation runs reports the internalderivation_input_errorcategory and stays in this public class.
Each 503 class is pinned by the fixture’s exact publicProblem expectation.
The two 503 codes have distinct static, value-free titles and disclose no provider, selector, fact,
script or comparison detail.
no_match, ambiguous, the host-private required-value outcome, and derivation-input inconsistency
over a uniquely found record all collapse into the same 422 public shape, so a fixture can never
make the status code an existence oracle.
A script must not throw source_protocol_error to represent an ordinary missing optional fact, and
it must not convert malformed or incomplete provider data into no_match.
Harness-wide assertions
Section titled “Harness-wide assertions”The harness applies these assertions to every case whether or not they appear under expected:
- preparation happens after authorisation and durable access audit, and before credential acquisition;
- no request-parts failure acquires credentials or reaches the source;
- zero or multiple provider results never run derivation or sign evidence;
- no case performs more calls than its acquisition permits, follows pagination, redirects, retries or response-provided URLs; a single source permits one call and a search-then-fetch source permits at most its fixed two;
- an error, failed audit, failed output gate or failed signing never returns an unsigned success;
- expected facts and values are compared with redacted failure messages;
- selector values, source facts, supported values, secrets and privacy canaries never appear in test names, snapshots, panic output, logs, audit, metrics, traces, HTTP problems or diff diagnostics; and
- the privacy expectation is checked against the verified JWS payload and every captured diagnostic sink.
The harness may report the case id, stage, expected type, actual type and a value-free mismatch code. It never prints the mismatching protected value.
Explain a failing run
Section titled “Explain a failing run”A fixture failure names the contract that broke and nothing else, which says that a case failed but
not which one or why.
evidence evaluate --fixture <path> --explain additionally prints, for every case, the stages it
reached and how each one ended.
The trace reports shapes only: response and fact member names, response and value counts, source and
concept identifiers, and the declared form a concept requires.
It never prints a response value, a fact value, a derived value or a selector value.
It is offline-only and no other subcommand accepts the flag; serve cannot reach it.
It changes no outcome, exit code or message, and without the flag the command’s output is unchanged.
The line that ends a case is the one to read first. An unresolved lookup lists the response members the extraction script saw, which is the whole diagnosis when a script recognised nothing in a response it was given. An output-gate rejection lists each declared concept, its form and whether it is required, which is what the gate checked the derived values against.
Adding --explain-format json renders the same trace for a machine reader.
The document is the whole of standard output, so it pipes without a trailing summary line to strip.
The verdict and the evaluated-case count that line carries move inside the document as passed and
evaluatedCases.
The exit code and the operator message on standard error are the same in both forms.
Each case can also carry a closed expected-versus-observed diagnosis.
A result has one of match, no-match, ambiguous, evidence-unavailable, source-unavailable,
service-unavailable, bundle-refused or selector-refused.
A matched value is reduced to a bounded classification such as boolean-true, integer or
structured.
reasonCode says which closed evaluator outcome produced the observation, and findingCodes says
which authored expectation disagreed.
None of these fields carries a source, selector, SQL, credential or governed result value.
For a controlled-category concept only, categoryClasses identifies an allowed result by its
zero-based concept position in the requirement and its zero-based value position in that concept’s
captured governed codelist.
The field appears only after the output is proven to belong to that codelist.
An arbitrary string remains only the shape string; the trace never substitutes raw category text or
a concept identifier for an ordinal.
evidence evaluate --runtime-config "<deployment-target>/runtime.yaml" \ --fixture "<path>" --explain --explain-format json \ | jq -r '.cases[] | "\(.id)\t\(.failure // "passed")"'evidencectl test <editable-project> --target <deployment-target> --explain asks the same of every
fixture a project references, using the JSON form.
The human report pretty-prints each value-free document under its step line.
--format json places the same document at that fixture’s trace field.
The driver totals evaluatedCases from those documents and does not interpret Evidence semantics.
A fixture’s own diagnosticsExclude canaries are checked against both rendered forms of the trace on
every run, including a run that stopped on an error.
A stage line that ever interpolated a protected value instead of its shape therefore fails the
fixture that declared that value, before the trace is printed.
Case identifiers are part of that surface: the trace puts one on a line of its own, so an identifier
carrying a control character is refused rather than rendered.
Cookies on Registry Stack
We use optional cookies to understand how you use the main Registry Stack website and this documentation. If you contact us, we may link this activity to your enquiry. You can change your choice at any time. Read the privacy policy.
Your browser asks sites not to track you, so optional tracking stays off.
We could not use or save that choice. Optional tracking remains off.