personDecoderconstno test imports itconst personDecoder: Decoder<ObjectOf<{ name: Decoder<string>; }, { role: Decoder<string>; }>>A named person and, where stated, the role they act in: what a record says of who, and nothing more.
The events of Tier 2 of the quality system (commons 0001-quality-evidence FR-041 to FR-044), kept in the ledger beside those of Tier 1 as append-only, chained files on the quality branch: a test plan registered before the run it governs, a sample drawn by a rule and a seed, a person's attestation of that sample, and a mutation run.
plan-registered) names its cases and the acceptance criterion of each; a run that follows it records the plan's hash.sample-drawn) is chosen from a population by a named rule and a recorded seed, so that anyone can draw it again and get the same items; a person's attestation (sample-attested) gives the verdict on each item, with the person's name and role.mutation-run) is the record of a run made by a tool the record names; this system does not run it.Only decoders and types here, so that pure/ledger.ts can take them into its union of events without a cycle: the rules that judge them are in the files beside this one. The person in a record is data: a name and, where stated, a role, never inferred from anything else.
personDecoderconstno test imports itconst personDecoder: Decoder<ObjectOf<{ name: Decoder<string>; }, { role: Decoder<string>; }>>A named person and, where stated, the role they act in: what a record says of who, and nothing more.
PersonReftypeno test imports ittype PersonRef = Decoded<typeof personDecoder>;A person as a record names them.
planCaseDecoderconstno test imports itconst planCaseDecoder: Decoder<ObjectOf<{ name: Decoder<string>; requirements: Decoder<readonly Brand<string, "RequirementId">[]>; acceptance: Decoder<string>; }, { file: Decoder<string>; }>>One case of a test plan: its name, the requirements it proves and the criterion that makes it pass (FR-042).
planDecoderconstno test imports itconst planDecoder: Decoder<ObjectOf<{ title: Decoder<string>; cases: Decoder<readonly ObjectOf<{ name: Decoder<string>; requirements: Decoder<readonly Brand<string, "RequirementId">[]>; acceptance: Decoder<string>; }, { file: Decoder<string>; }>[]>; }, Record<never, never>>>A test plan: what will be run, written down before it is run (FR-042).
TestPlantypeno test imports ittype TestPlan = Decoded<typeof planDecoder>;A test plan as the record holds it.
SAMPLE_SUBJECTSconstno test imports itconst SAMPLE_SUBJECTS: readonly ["runs", "records", "agent-reviews"]What a sample is drawn from.
SampleSubjecttypeno test imports ittype SampleSubject = (typeof SAMPLE_SUBJECTS)[number];What a sample is drawn from: the runs kept as evidence, the files of the ledger, or the reviews that agents made (FR-044).
SAMPLE_RULEconstno test imports itconst SAMPLE_RULE: "hash-ranked/1"The rule that chooses a sample: the items ranked by the SHA-256 of the seed and the item, the first of them taken.
mutationRowDecoderconstno test imports itconst mutationRowDecoder: Decoder<ObjectOf<{ requirement: Decoder<Brand<string, "RequirementId">>; mutants: Decoder<number>; killed: Decoder<number>; survived: Decoder<number>; }, { timeout: Decoder<number>; noCoverage: Decoder<number>; equivalent: Decoder<number>; }>>One row of a mutation run: the mutants made for a requirement's tests and what became of each (FR-043).
MutationRowtypeno test imports ittype MutationRow = Decoded<typeof mutationRowDecoder>;A row of a mutation run.
TIER2_EVENTSconstno test imports itconst TIER2_EVENTS: { readonly "plan-registered": Decoder<ObjectOf<{ kind: Decoder<"plan-registered">; id: Decoder<strin… (1907 characters)const TIER2_EVENTS: { readonly "plan-registered": Decoder<ObjectOf<{ kind: Decoder<"plan-registered">; id: Decoder<string>; plan: Decoder<ObjectOf<{ title: Decoder<string>; cases: Decoder<readonly ObjectOf<{ name: Decoder<string>; requirements: Decoder<readonly Brand<string, "RequirementId">[]>; acceptance: Decoder<string>; }, { file: Decoder<string>; }>[]>; }, Record<never, never>>>; by: Decoder<ObjectOf<{ name: Decoder<string>; }, { role: Decoder<string>; }>>; day: Decoder<Day>; }, Record<never, never>>>; readonly "sample-drawn": Decoder<ObjectOf<{ kind: Decoder<"sample-drawn">; id: Decoder<string>; subject: Decoder<"agent-reviews" | "records" | "runs">; rule: Decoder<"hash-ranked/1">; seed: Decoder<string>; population: Decoder<ObjectOf<{ count: Decoder<number>; sha256: Decoder<Brand<string, "Sha256">>; }, Record<never, never>>>; size: Decoder<number>; items: Decoder<readonly string[]>; by: Decoder<ObjectOf<{ name: Decoder<string>; }, { role: Decoder<string>; }>>; day: Decoder<Day>; }, { ratePermille: Decoder<number>; }>>; readonly "sample-attested": Decoder<ObjectOf<{ kind: Decoder<"sample-attested">; sample: Decoder<string>; results: Decoder<readonly ObjectOf<{ item: Decoder<string>; verdict: Decoder<"fail" | "pass">; }, { note: Decoder<string>; }>[]>; person: Decoder<ObjectOf<{ name: Decoder<string>; }, { role: Decoder<string>; }>>; day: Decoder<Day>; }, {}>>; readonly "mutation-run": Decoder<ObjectOf<{ kind: Decoder<"mutation-run">; id: Decoder<string>; tool: Decoder<ObjectOf<{ name: Decoder<string>; }, { version: Decoder<string>; }>>; revision: Decoder<string>; results: Decoder<readonly ObjectOf<{ requirement: Decoder<Brand<string, "RequirementId">>; mutants: Decoder<number>; killed: Decoder<number>; survived: Decoder<number>; }, { timeout: Decoder<number>; noCoverage: Decoder<number>; equivalent: Decoder<number>; }>[]>; day: Decoder<Day>; }, Record<never, never>>>; }The events of Tier 2, as decoders by kind: the ledger puts them in its union.