reqmd Package: verify

Package: verify

approved 46Leaf

46 requirements · 3 items

X Reqmd.source File
X Reqmd.source Line
X Reqmd.symbol Kind

This file is auto-generated by reqmd-code. Do not edit by hand.

IMP-verify-ctrfResults-4b03cf5 ctrfResults

#

missing coverage

CTRF report shape. Only the fields reqmd needs are decoded; the per-testextra extension point carries the reqmd binding fields (id, case,verifies, description). results is kept as raw JSON at first so thetop-level shape can be validated without decoding the (potentially verylarge) test list more than once.

Reference: https://ctrf.io/docs/full-schema

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
18
X Reqmd.symbol Kind
type
Status
approved

IMP-verify-ctrfTest-27e8525 ctrfTest

#

missing coverage

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
23
X Reqmd.symbol Kind
type
Status
approved

IMP-verify-loadCTRFFile-83b6483 loadCTRFFile

#

missing coverage

loadCTRFFile parses one CTRF JSON file into Results.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
33
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-loadCTRFData-8b29165 loadCTRFData

#

missing coverage

loadCTRFData parses CTRF JSON bytes into Results. The path isused only for error messages and evidence attribution.

Binding (extra.x-reqmd):id present → the result binds directly to that requirement ID (patterns A/C); an explicit case is recorded on the result.no id but verifies present → a test case is synthesized under the case key (explicit case, else normalized (suite, name)) with trace edges to each verifies ref (patterns D/E).x-reqmd present but nothing bindable → an "unbound-result" warning.no x-reqmd block → skipped silently.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
52
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-xreqmdFields-938045a xreqmdFields

#

missing coverage

xreqmdFields holds the reqmd binding fields from a CTRF test'sextra.x-reqmd block. present is true when the block exists.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
106
X Reqmd.symbol Kind
type
Status
approved

IMP-verify-extractXReqmd-8f9db16 extractXReqmd

#

missing coverage

extractXReqmd reads the reqmd binding fields from a CTRF test's extraobject. Returns present=false when there is no x-reqmd block.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
116
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-implicitCaseKey-7a20044 implicitCaseKey

#

missing coverage

implicitCaseKey derives a stable case key from the report suite and testname for verifies-only bindings (pattern E): suite + "/" + name, or thebare name when the report has no suite.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
151
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-ctrfStatusToOutcome-a91839e ctrfStatusToOutcome

#

missing coverage

ctrfStatusToOutcome maps CTRF status to reqmd outcome. A flaky test isinconclusive regardless of its (passing) final status.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
160
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-msEpochToTime-ef9cf53 msEpochToTime

#

missing coverage

msEpochToTime converts a CTRF millisecond epoch to time.Time, fallingback to start when stop is 0, then to the zero value.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
179
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-isCTRFFileData-cdbc327 isCTRFFileData

#

missing coverage

isCTRFFileData is a cheap shape check on already-read bytes.Used by the dir walker to distinguish CTRF .json from other.json (coverage reports, etc.) without reading the file twice.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
192
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-looksLikeCTRF-9aaacf6 looksLikeCTRF

#

missing coverage

looksLikeCTRF reports whether the JSON bytes decode to an object with atop-level results object. The probe decodes only the top-level key andkeeps results as raw bytes — the potentially huge test list is NOTdecoded into Go values here (that happens once, in loadCTRFData).

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
200
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-isCTRFResultsObject-6fca12e isCTRFResultsObject

#

missing coverage

isCTRFResultsObject reports whether the raw results value is a non-emptyobject (CTRF's results is an object containing tests[], never an array).This is a byte-level check — no JSON decode of the contents.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/ctrf.go
X Reqmd.source Line
213
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-Outcome-a06c25a Outcome

#

missing coverage

Outcome is the reqmd verdict axis derived from a verification result.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
23
X Reqmd.symbol Kind
type
Status
approved

IMP-verify-OutcomeFail-79e569a OutcomeFail

#

missing coverage

Verification result outcomes.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
26
X Reqmd.symbol Kind
const
Status
approved

IMP-verify-OutcomeInconclusive-35998ae OutcomeInconclusive

#

missing coverage

Verification result outcomes.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
26
X Reqmd.symbol Kind
const
Status
approved

IMP-verify-OutcomePass-adb528b OutcomePass

#

missing coverage

Verification result outcomes.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
26
X Reqmd.symbol Kind
const
Status
approved

IMP-verify-OutcomeSkipped-5962702 OutcomeSkipped

#

missing coverage

Verification result outcomes.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
26
X Reqmd.symbol Kind
const
Status
approved

IMP-verify-Verdict-63c679f Verdict

#

missing coverage

Verdict is the outcome + source for a single measure, ready forconsumption by exporters and reporters. It's the transport typebetween verify (which loads results) and exporter (which rendersthem), avoiding a direct dependency from exporter on verify.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
37
X Reqmd.symbol Kind
type
Status
approved

IMP-verify-Result-d685357 Result

#

missing coverage

Result is one verification result, already mapped to a measure ID (and,for case-keyed runs, to a test-case identity). Multiple results for thesame measure are merged by VerifiedAt (latest wins) before synthesis.

The identity fields (Name, CaseKey, Verifies, Description) back therequirement → test-case → result chain model. Today only MeasureID ispopulated and Name is captured from CTRF; CaseKey/Verifies/Descriptionare the v2 fields parsed in the binding phase that introduces synthesizedtest cases.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
51
X Reqmd.symbol Kind
type
Status
approved

IMP-verify-ResultKey-6769bce ResultKey

#

missing coverage

ResultKey identifies a merged verification slot: the binding target(an authored requirement ID, or a synthesized test-case ID "TC:")plus the test-case key. Case is empty for the degenerate single-resultmodel (patterns A/B/F); two results sharing a key collapse into one vialatest-wins merging.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
87
X Reqmd.symbol Kind
type
Status
approved

IMP-verify-resultKeyFor-e5f7a05 resultKeyFor

#

missing coverage

resultKeyFor computes the merge key for a result.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
93
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-MergeLatest-79e3025 MergeLatest

#

missing coverage

MergeLatest returns, for each (target, case) key, the result with thelatest VerifiedAt. Ties are broken by lexical order of Source fordeterminism. The ~N pin is stripped from the key so results pinned todifferent versions of the same measure collapse to one entry (the pin ispreserved on the synthesized trace edge, not the result identity).

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
103
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-LoadMerged-bff839e LoadMerged

#

missing coverage

LoadMerged is a convenience wrapper that loads results from thegiven paths and merges them by (target, case) key (latest verdict wins).Returns the merged map, any warnings, and an error. When pathsis empty/nil, returns (nil, nil, nil) — callers should check fornil before calling Synthesize.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
125
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-LoadVerdicts-8fd7b04 LoadVerdicts

#

missing coverage

LoadVerdicts loads results, merges by (target, case) key, and convertsto a per-target Verdict map for exporters that render per-measure badgesbefore roll-up semantics land. For targets with several cases the verdictis the latest result across those cases (by VerifiedAt); rolled-up verdictcomputation is a graph concern in the evidence-set phase. This is theshared results-loading path for check, serve, and export csv/html/graph.Returns all nil when paths is empty.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
143
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-latestVerdict-52bcba6 latestVerdict

#

missing coverage

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
149
X Reqmd.symbol Kind
type
Status
approved

IMP-verify-LoadResults-e444d2c LoadResults

#

missing coverage

LoadResults walks the given paths and loads verification results fromeach. A path may be:a directory: walked; .ctrf.json and CTRF-shaped .json files are parsed as CTRF, directories containing schema.yaml are loaded as manual results via parser.Discover, other files are skipped.a file: parsed as CTRF if .ctrf.json or CTRF-shaped .json.

Returns the merged set of results and any warnings (e.g. unmapped CTRFtests). Warnings are returned as CheckResult-shaped messages via thereturned warning slice; errors abort loading.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
179
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-readInRoot-a08ae61 readInRoot

#

missing coverage

readInRoot reads one file from the walked results tree through the walkroot, refusing paths that escape it.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
212
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-loadDir-5073ff5 loadDir

#

missing coverage

loadDir walks a results directory. CTRF files (.ctrf.json orCTRF-shaped .json) are parsed directly. Subdirectories with aschema.yaml are loaded as manual-results document dirs viaparser.Discover. Non-CTRF files (coverage.json, junit.xml, etc.) areskipped silently.

Each .json file is read once: the bytes are used for the CTRFshape check and, if it passes, for the full parse. This avoidsthe double-read that occurred when isCTRFFile and loadCTRFFileeach opened the file independently.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
239
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-ctrfPending-e93263c ctrfPending

#

missing coverage

CTRF files pending load: (path, data) pairs. The data isalready read during the walk for the shape check, so we passit to loadCTRFData to avoid a second read.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
246
X Reqmd.symbol Kind
type
Status
approved

IMP-verify-loadManualDir-d23cee7 loadManualDir

#

missing coverage

loadManualDir parses a manual-results document dir via the standardparser pipeline and extracts result attrs from each requirement.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
321
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-resultFromReq-660ae11 resultFromReq

#

missing coverage

resultFromReq builds a Result from a parsed manual-results requirement.Returns ok=false if the requirement has no x-reqmd.outcome attr (not aresult). Result attributes are tool-owned and namespaced under x-reqmd.*.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results.go
X Reqmd.source Line
342
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-TestLoadManualDir_ResultFields-28467e0 TestLoadManualDir_ResultFields

#

missing coverage


Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results_internal_test.go
X Reqmd.source Line
20
X Reqmd.symbol Kind
function
Status
approved

Manual-results loading (loadManualDir)

TestLoadManualDir_ResultFields creates a temp results dir with a schema.yamland a .md file holding a manual-results requirement (outcome, trace,verifier, evidence, verified-at), then asserts loadManualDir returns oneResult with every field populated correctly.

IMP-verify-TestResultFromReq_HappyPath-e8440e3 TestResultFromReq_HappyPath

#

missing coverage


Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results_internal_test.go
X Reqmd.source Line
100
X Reqmd.symbol Kind
function
Status
approved

resultFromReq — direct construction tests

IMP-verify-TestResultFromReq_NoOutcomeNotAResult-7a130a2 TestResultFromReq_NoOutcomeNotAResult

#

missing coverage

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results_internal_test.go
X Reqmd.source Line
140
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-TestResultFromReq_EmptyTraceFallsBackToReqID-3e4e555 TestResultFromReq_EmptyTraceFallsBackToReqID

#

missing coverage

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/results_internal_test.go
X Reqmd.source Line
155
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-resultDocLevel-7e4b4f3 resultDocLevel

#

missing coverage

resultDocLevel is the x-reqmd level assigned to synthesizedverification-result documents. The graph uses levels to infer V-modelboundaries; results are the bottom of the V (leaves), so they must notbe treated as roots.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
16
X Reqmd.symbol Kind
const
Status
approved

IMP-verify-testCasePrefix-eb83fce testCasePrefix

#

missing coverage

testCasePrefix prefixes the ID of a synthesized test-case node("TC:"). Case-keyed CTRF entries (patterns D/E) synthesize onesuch node per case; it carries the verifies trace edges to therequirements it exercises and the Markdown description body.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
22
X Reqmd.symbol Kind
const
Status
approved

IMP-verify-Synthesize-d4769b6 Synthesize

#

missing coverage

Synthesize builds one model.Document (marked Synthetic) holding thepseudo-requirements derived from merged results:One result node per merged (target, case) key: ID RESULT:[#], trace: [], plus outcome / status:approved / verifier / evidence / verified-at.One test-case node per synthesized case target (ID TC:) whose ID starts with testCasePrefix: trace: [verifies...] (pins allowed), Body = the Markdown description of the winning run, Title = the test name.

The returned Document is appended to the spec docs before graph.New soall existing graph machinery (broken-ref, circular, version-pin) works onresult→measure and case→requirement edges with no new traversal code.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
38
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-synthesizeTestCase-6f1bfc2 synthesizeTestCase

#

missing coverage

synthesizeTestCase builds the synthesized test-case node for acase-keyed CTRF result. Its trace edges go to the requirements itexercises (extra.x-reqmd.verifies, pins allowed); its body is theMarkdown description taken from the winning run.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
87
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-synthesizeResult-703c47f synthesizeResult

#

missing coverage

synthesizeResult builds a single pseudo-requirement node from a mergedresult. The binding target (with its ~N pin preserved for id-boundresults) becomes the trace target; a case-keyed result gets a distinctnode ID so several cases can attach to the same authored measure.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
105
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-resultNodeID-3c86e9a resultNodeID

#

missing coverage

resultNodeID is the synthetic ID of a result node:RESULT: for the single-result model, RESULT:# whenthe run is case-keyed.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
136
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-outcomeTitle-63d650c outcomeTitle

#

missing coverage

outcomeTitle returns a short human-readable title for the pseudo-req.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
144
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-toAny-7409ad3 toAny

#

missing coverage

toAny converts a []string into a []any for attribute maps.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
152
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-IsResultNode-1bd2c9b IsResultNode

#

missing coverage

IsResultNode reports whether a requirement ID belongs to a synthesizedverification-result pseudo-requirement (i.e. produced by Synthesize).Used by graph checks to distinguish result nodes from authored ones.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
163
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-IsTestCaseNode-5f32cca IsTestCaseNode

#

missing coverage

IsTestCaseNode reports whether a requirement ID belongs to a synthesizedtest case ("TC:..."). Used to recognize case nodes independently of theRESULT prefix.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
170
X Reqmd.symbol Kind
function
Status
approved

IMP-verify-ResultOutcome-43be5fd ResultOutcome

#

missing coverage

ResultOutcome extracts the outcome attribute from a synthesized resultnode's requirement attrs. Returns "" if not present.

Details
X Reqmd.imported
true
X Reqmd.source File
internal/verify/synth.go
X Reqmd.source Line
176
X Reqmd.symbol Kind
function
Status
approved