Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0001-quality-evidence FR-026
What the quality system reads of a repository to report on itself (commons 0001-quality-evidence FR-026 to FR-030, FR-039), with real git: the proof register, the runs kept on the quality branch with the grade the branch gives each, the ledger of nonconformances and CAPA, the tests the repository holds, and, for each piece of evidence, what in the requirement's chain changed after the revision of its run. It then judges every requirement on the ladder (pure/ladder.ts) and finds the nonconformances to open (FR-015).
The change a run is held against is Git's own: the files that differ between the run's commit and HEAD, and the requirement's line in its specification at the two (FR-030). A run whose commit this repository does not hold is judged by time only, and says so. Nothing is written here; quality.ts writes the events this reports.
Source: commons/quality/src/host/gather.ts
3 of 8 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
GatherOptionstypeno test imports ittype GatherOptions = {
readonly repo: string;
/** The proof register's file; the repository's `commons/spec-kit/enfo… (872 characters)
type GatherOptions = {
readonly repo: string;
/** The proof register's file; the repository's `commons/spec-kit/enforcement.tsv`, else `enforcement.tsv`, where not given. */
readonly register?: string;
/** The day today, `YYYY-MM-DD`: no clock is read here. Where not given, the day of the newest thing on the branch, so that the same branch gives the same judgement. */
readonly today?: string;
/** Whether to hold the evidence against what changed in Git after its run (FR-030); true where not given. The index of the branch does not (FR-024). */
readonly changes?: boolean;
readonly cadences?: Cadences;
readonly verify?: VerifyOptions;
/** The harness's declaration (`ifccm:HarnessDeclaration`): a regulated harness in production needs `E4` for every requirement (FR-016). Read by the caller, never here. */
readonly declaration?: Declaration;
};
GatheredRuntypeno test imports ittype GatheredRun = IndexRun & {
readonly cases: readonly { readonly name: string; readonly requirements: readonly string[]; readonly outcome: string }[];
readonly notRunCases: number;
};
A run as the gatherer read it.
type Gathered = {
readonly register: readonly RegisterRow[];
/** The declaration the judgements were made under, whe… (1237 characters)
type Gathered = {
readonly register: readonly RegisterRow[];
/** The declaration the judgements were made under, where one was given. */
readonly declaration?: Declaration;
readonly judgements: readonly Judgement[];
readonly byRequirement: ReadonlyMap<string, Judgement>;
readonly runs: readonly GatheredRun[];
/** Every piece of evidence read, before the newest run supersedes the older ones. */
readonly evidence: readonly Evidence[];
readonly ledger: LedgerRead;
readonly tests: readonly KnownTest[];
/** The tip of the `quality` branch and the head of its chain, where there is a branch. */
readonly tip?: string;
readonly head?: string;
/** Why the branch's evidence is not counted (a chain that does not verify: every run is `E0` until a new run). */
readonly branchProblem?: string;
/** The day of the newest run or record on the branch: the day the index is as of. */
readonly asOf: string;
/** What changed after each requirement's evidence, for the report: `requirement` to the changed files. */
readonly changed: ReadonlyMap<string, readonly string[]>;
/** Evidence whose revision this repository does not hold: judged by time only. */
readonly unknownRevisions: readonly string[];
};
What was read and judged.
Imported by 6 tests of the run (6 passed, 0 failed): the library's results
GatherErrortypeno test imports ittype GatherError = HostError | LedgerHostError | { readonly kind: "register"; readonly path: string };
formatGatherErrorfunctionno test imports itfunction formatGatherError(e: GatherError): string
A gather error as one sentence.
function gather(options: GatherOptions): Promise<Result<Gathered, GatherError>>
Reads the repository and judges every requirement (FR-026 to FR-030).
Imported by 17 tests of the run (17 passed, 0 failed): the library's results
authorOffunctionno test imports itfunction authorOf(repo: string, revision: string): Promise<Result<string, HostError>>
The author of a commit, as an e-mail address, for the rule that a regulated harness's CAPA is not closed by the author of its change (FR-035).
function isAfter(repo: string, earlier: string, later: string): Promise<boolean>
Whether earlier is an ancestor of, or the same commit as, later (FR-034: the run is at a revision that holds the last commit of the corrective change).
Imported by 6 tests of the run (6 passed, 0 failed): the library's results