The chain from a change request to the run that proved it (commons 0020-ifccmFR-014, FR-015): for each requirement a Done when names, the stages issue, requirement, ontology term, code, test and quality run, each linked by the annotation it already has (Done when, the specification's FR-nnn, mz:definedBy, // Spec:, proves, a run's case), and the first stage with no link.
Pure: the specifications, the ontology's citations, the source and test files and the cases of a run are arguments. It reuses the readers of kernel/trace.ts for the specifications, the // Spec: lines and the proves calls, so that no stage needs an annotation of its own. A citation of a whole specification (no requirement named) does not link a requirement to a term; for code and tests it does not either: a stage links a requirement only by naming it, alone or in a range.
import { firstBreak, traceOf } from"./trace.ts";
constt=traceOf("0020-ifccm FR-005", { specs: [], terms: [], sources: [], tests: [], cases: [] });
firstBreak(t); // "StageRequirement": the specification has no such requirement
The chain of one requirement NNNN-slug FR-nnn: every stage, linked or not, so that a report ends where the chain breaks. The first stage, the change request, is linked by the caller's naming it.
type TraceInput = {
readonly specs: readonly SpecSource[];
/** The ontology's citations: each term and the requireme…(496 characters)
typeTraceInput= {
readonlyspecs:readonlySpecSource[];
/** The ontology's citations: each term and the requirements it cites (`mz:definedBy`). */readonlyterms:readonlyOntologyCitation[];
/** The source files, read for their `// Spec:` lines. */readonlysources:readonlySourceFile[];
/** The test files, read for their `proves` calls. */readonlytests:readonlySourceFile[];
/** The cases of the quality run at the revision. */readonlycases:readonlyRunCase[];
};
The chain of one requirement NNNN-slug FR-nnn: every stage, linked or not, so that a report ends where the chain breaks. The first stage, the change request, is linked by the caller's naming it.
type TraceInput = {
readonly specs: readonly SpecSource[];
/** The ontology's citations: each term and the requireme…(496 characters)
typeTraceInput= {
readonlyspecs:readonlySpecSource[];
/** The ontology's citations: each term and the requirements it cites (`mz:definedBy`). */readonlyterms:readonlyOntologyCitation[];
/** The source files, read for their `// Spec:` lines. */readonlysources:readonlySourceFile[];
/** The test files, read for their `proves` calls. */readonlytests:readonlySourceFile[];
/** The cases of the quality run at the revision. */readonlycases:readonlyRunCase[];
};