Repository navigation
SpecLab v0.3.0
SpecLab v0.3.0
A minor release, not a patch: it adds public API and changes the signatures of
RequirementRegistry's accessors. The exported free functions of
speclab.core.requirements are unchanged.
Added
RequirementBuilder::Test(id)andRequirementBuilder::SetEnabled(bool).speclab::core::ClearRequirementTestLinks,NormalizeRiskLevelandNormalizeSafetyClass.- A ThreadSanitizer CI leg (
linux-tsan), which runs the self-tests with
TSAN_OPTIONS=halt_on_error=1.
Fixed
- The
Requirement,FeatureandIEC62304Processbuilders now run tests (#25). Their
Execute()returned an empty vector: nothing ran, and a caller counting failures saw none, so a
suite that looked complete reported no failure. Now:RequirementBuilder::Test(id)attaches a test and returns itsTestBuilder.Execute()runs
each one and returns its result, with the requirement's metadata and id attached.Execute()registers the requirement and its test links (includingAssociateTestids) in the
requirement registry, soExportTraceMatrixCSV/HTMLand theREQUIREMENT_COVERAGEgate see
them.- A requirement with no test of its own returns one
Blockedresult instead of an empty list; a
disabled one returnsSkipped.FeatureandIEC62304ProcessreportBlockedwhen they hold
no requirement.
- The requirement registry is now locked. It is a process-wide singleton that
TestSuitereads
from parallel test threads whileRequirement::Execute()writes to it, which was a data race
on itsunordered_maps (confirmed by ThreadSanitizer). Its accessors that used to return
pointers into those maps (getRequirement,getRequirementsForTest,getAllRequirements,
getUncoveredHighRisk,getUncoveredCritical) now return values; the free functions are
unchanged. RegisterRequirementupdates an existing record instead of keeping the first one. A risk level
raised between two registrations now reaches the coverage gate.- Coverage links are rebuilt from what each execution actually ran. A requirement only counts
as covered by tests that ran and were not skipped, plus the ids given toAssociateTest(which
run elsewhere). This closes three ways a requirement could look covered with nothing verified:
a requirement disabled after an execution kept the links of that earlier run; a disabled
attached test (Test("T").SetEnabled(false)) was linked anyway; and a requirement with no test
at all was linked to its own synthetic result. - Risk levels and safety classes are normalised (
NormalizeRiskLevel,NormalizeSafetyClass).
The builders documentRiskLevel("Critical")andSafetyClass("ClassC"), but the coverage gate
compares againstCRITICALandCLASS_C, so those spellings produced no critical gap. FeatureBuilder::Requirement(),IEC62304ProcessBuilder::Requirement()and the new
RequirementBuilder::Test()return references into their containers, which are nowstd::deque.
Withstd::vector, adding the next requirement or test invalidated a reference the caller still
held.
Important
SpecLab is an experimental project. Its compliance features are conceptual and educational: using it does not make software compliant with IEC 62304, ISO 13485 or ISO 14971, and it is not recommended for production use.
Release tags are immutable. v0.3.0 points at 3985227 and will not be moved. Each package has a matching SHA-256 checksum file. The packages were built by this workflow run.