Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0001-quality-evidence FR-024
The index of the quality branch (commons 0001-quality-evidence FR-024, FR-036): one deterministic JSON file derived from the branch alone and rebuilt from it alone, for search, trends and the public page. It lists the runs, each requirement with its grade, day and freshness, the review debt beside the count of proved requirements, every nonconformance and CAPA from the moment it is opened, closed ones kept, and the objectives with their budgets. It is never a source of evidence: nothing in it is read back as evidence, and --check says whether the file on disk is what the branch gives.
Pure: it is given what was read from the branch. The text has sorted keys and no clock: asOf is the day of the newest thing on the branch.
Source: commons/quality/src/pure/index-file.ts
0 of 6 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
IndexRuntypeno test imports ittype IndexRun = {
readonly traceId: string;
readonly path: string;
readonly day: string;
readonly revision?: string;
/** What the branch gives the run's evidence (`E3`, `E4`). */
readonly grade: string;
readonly tests: number;
readonly passed: number;
readonly failed: number;
readonly notRun: number;
};
One run kept on the branch, as the index lists it.
IndexInputtypeno test imports ittype IndexInput = {
/** The tip of the `quality` branch, or none where there is none. */
readonly tip?: string;
/** The SHA-256 of the last evidence file, the head of the chain. */
readonly head?: string;
readonly asOf: string;
readonly runs: readonly IndexRun[];
readonly judgements: readonly Judgement[];
readonly ledger: Ledger;
readonly objectives: readonly Evaluation[];
};
What the index is built from.
INDEX_FILEconstno test imports itconst INDEX_FILE: "quality.index.auto.json"
The file's name in a repository.
INDEX_COMMANDconstno test imports itconst INDEX_COMMAND: "bun commons/quality/src/quality.ts index --out quality.index.auto.json"
The command that writes it.
buildIndexfunctionno test imports itfunction buildIndex(input: IndexInput): Result<string, string>
The index as text (FR-024): JSON with sorted keys, two spaces and a final newline, so that the same branch gives the same bytes.
indexIsCurrentfunctionno test imports itfunction indexIsCurrent(onDisk: string, built: string): boolean
Whether the file on disk is what the branch gives (line endings compared as LF, as .gitattributes makes generated files).