Test Plan

This document maps the test suite to the requirements it verifies. Each test file is a traceable [item] referencing the requirements it covers.

Test Coverage

TST-001 — Core Extension Tests

Test file: test/v2-unified-item-architecture.test.ts

Tests the RequirementsTraceabilityExtension orchestrator — initialization, processing, query methods, role statistics, lifecycle. Covers the public API surface of the main extension class. Includes verbatim block handling (listing, literal, and backtick code spans).

Relation

ID

Title

verifies

REQ-087

REQ-087 — Items inside verbatim blocks are not parsed

verifies

REQ-088

REQ-088 — Inline macros inside verbatim blocks are not parsed

verifies

REQ-090

REQ-090 — Verbatim block detection handles standard AsciiDoc fences

verifies

REQ-091

REQ-091 — Inline macros inside verbatim blocks are preserved in rendered output

verifies

REQ-092

REQ-092 — Inline macros inside backtick code spans are not parsed

Relationship graph for TST-001
TST-002 — Antora Extension Tests

Test file: test/antora-extension.test.ts

Tests the AntoraTraceabilityExtension — initialization with default config, preset, config path, and disabled state. Tests event handler registration, content processing via contentClassified event (in-memory only, never touches disk), matrix generation via sitePublished event and matrix registration in the content catalog via contentClassified, and API access patterns. Also tests tracer:outgoing[], tracer:incoming[], and tracer:links[] macro expansion with configurable display style, sort order, collapsible sections, empty-state messages (:traceability-empty:), and opt-in behavior. Tests incoming macro display styles, sort orders, reverse labels, PDF compatibility, and collapsible support. Tests tracer:graph[], tracer:graph-coverage[], and tracer:config-graph[] macro expansion with configurable Kroki image format and Kroki server URL (extension config option and KROKI_SERVER_URL env var override), graph-enabled and graph-disabled modes, including global coverage, explicit target IDs, and header exclusion. Tests automatic matrix registration in the content catalog during contentClassified. Tests the per-version graph.json snapshot registration: snapshot content (items and relationships with scope, no pubUrl), gating by generateMatrices, empty-graph versions, and in-place refresh of a committed copy. Tests role guidance page registration in the content catalog: resolved pages render to traceability/guidance/<role>.html, and a config without roleGuidance registers none. Tests partial file processing including item registration from partials, view URL as sourceFile, and macro expansion in Pass 2. Tests cross-module and cross-component xref prefix generation. Tests git_describe injection into site.keys and asciidoc.attributes, including the non-git fallback and absent-section handling.

Relation

ID

Title

verifies

QA-058

QA-058 — No side effects on source files

verifies

QA-060

QA-060 — PDF compatibility of generated output

verifies

REQ-041

REQ-041 — Source file paths are normalized

verifies

REQ-044

REQ-044 — tracer:outgoing[] macro renders outgoing links

verifies

REQ-045

REQ-045 — Opt-in via AsciiDoc attribute

verifies

REQ-047

REQ-047 — Configurable display style

verifies

REQ-048

REQ-048 — Configurable sort order

verifies

REQ-051

REQ-051 — Relationship graph via image::https://kroki.io/graphviz/svg/eJydmNtu4zYQhu_3KQbubQyIiiQ7LVIgaLbH7R6S7FV2UdDS2CYikwJJeeMtCvQh-oR9koIimRWdZCvyKkEy0qcZzvycmYZtJO22cCNpjXTFWqYP8OcLAEn5XcPk-aur714AcNEg3Kot7fB8Je5PQOlDi-czKXreYHOyZm2LzewE1oJrTnd4PvsZ2z1qVtPZR_MGbDYIt0_92z6k2Gc8J9lgO7u5vplnWT6DW_PiWrRCns—​uTwrLooLZ2__-GnLNJ5AS1fYnvvHPnD3C_z79z9wwbWQFF7ea-SKCQ43qLSyHzW7evlunpfZEai4OMsuz74Cco994O6XAfQ71ZLdQ8v4nQKJSrR7hFpIibVuDyNgVpAUYFYQC8wKMgCvRS9rhDVrETqqtwqoROBC7mjLPgfAIg1YeGAxALVJEvmt6PVGML65_Qg7WksBEnmDMgCWacDSA8sB-KbTc8ZhzyhcqJqxS1ED1VqyVa8x4C3SeAvPWwy8HwRfs00v6apFaJjqWnqwqR7AlmmwpYctH8OUkBqEPApjmZYopU-U0ibKFbZUM8HVlnVg692E1B1nADyuuYnA3ANz59oeJd0g1Fsq9Rhm6CMgKc9SgKQ8s0BSnoWxNG4-cjHwMC0zS5-ZZTkuBcZrsft6KVSnScDq1AGr08fZ8psUdwzYzoR4bep9HNIi6QxJ4c6QFPlzQIVyjxLeX72CAJjkISlOPdB6-IhhDhD5nknBd0EBVmlyVnk5q6yc_eIO7-HoVIe1VtCIuj8CpiVN5ZOmKp8CBgKjAl6Vxqs8r3qK97TGVGnSWXnprBYhayNF3ynoFYLeIkjcowycWyRdt9nCXbfZInvSub7rhNQKatG2gcbkeZKK5rlT0TwPVfTh3EwjY-_cWvAAmFSBeZ57oK3AV-Z_Jh2BCw10vcZaDzEd9G1cgVWSh6RyHpLKeniJa9q3OnAQmBqY2z4ApmlM5TWmsh6-FlCLXcdanGu2Q1jTtl3R-m6MypLShWQuXUjm06VlHG2yqCFbJCqFDXzaIg_k7FHfORHofcu8fpo8VMzIZ8uUng9lDqLXXa_HwLxIugPzwt2BeWHvwJ-GW48p4dK0Qwmm9liQnCRLEk-SFd69oBccut2j209BHQCT2iWSLT1wOW6vTbdr2usNUxolNsC4yc9xPKu0eFY-npWLZ88aymt88IpxLYZaUCzoPvMySa7zsvIDRDU6wF-v37wGxWmntkKb6nO-BsAkzc7LhQdazb72lF6hrfKacsFZTVvYyACYdIZ5ufTA5bGHTMGGamxgdYCdPdoAmHaGvi_MXV_4nrsKwGZQGsGRawWdFE1fj0NKSJrMEC8zxMmMxp2CBteM29zsqNSMtvaeCIBJSUNI5YHVCFhTKQ9fPATKG9iJJtBskpQ0hCw80M1IUig1Ny9vceDUwx8cOwCm9fbE9_bkLBKYNuYSP-YSN-a-tUcGbAitaWT2DD8NLSlVYeeb1BcSP-YSN-ZetK1JyRqVMg1NR5WpR9p17QG0CIBpSVP4pCls0rzcdfowV5pqhB0qZeaI4R40LnsP313Ms_i6t0994Panv-UVaxBw6GAUCA7qy-pCjXBVdBHapyyusiX49vLHoRKoZm6fJdawQY5y0JugjUmbXPxsRtxsdtSKHn1AAEzLUD-5EDe5jDc_pjfciYatmRVTFtz2aZML8ZMLcZPLo5gGjLSk9NMKcdPKc04FrVJS_HJf4bmr8C_LwC3ljWko-tFFEdxDaa28X4jkbiGyYRoaVLVkq6GjNrHsTTYK02AEwKSUzMtTDzz1wD_GQLzvhOl2qQIK4fYzLaSlD2lZ_D8wOMO0DUzuNzC528CsetY2oPq6RmyU6asHkaFDrH3z8rBInn8_Xva69-5RmgxTzxnbRe1k4yLGuIwxXsQYLyOMyxgHh1qYaGwXe5PfHBONQbSnfkYR881FxJvtEmqycZSDVYxxTG4sIpLfrk0mG8fEuYp4s101TDXOIhy0g_5UB4uIfLYz9mTjiIK1s-1U4zIikexMOdk45ptjpMDOYZONIxy0889k45hvjlF-EqP8tt-fYPzQq0-0rWKiHCW4MbJIYmSRxMhiHnMkeczFZhu0ycZRn_FMNP76D5emmn0[Relationship graph for TST-002] macro

verifies

REQ-052

REQ-052 — Coverage chart via image::https://kroki.io/vegalite/svg/eJx1kU1TgzAQhu_8ip3UYy0dp3WUW61XL7Y3p4ctbNNVSCpZGDsd_ruTgAh-XAjZj2ffvHuJANSVS49UoEpAHUVOLonjmjTONMux2s_Yxm1BiF7nLBTXy9mrs0ZNfb-w5OS717amEjUlsN1sr-fzmzafoXj4JQIAUDXmFTmVwEu4QxcPuWfKUdga2J5PgVhTyQcmF0Bd0UZQKg9QGxR2B6ZMddkmnLsIoAmTCyzffOEey1YKmdRmbPS3nI_-F0AdmPLMN4yFfA1X0skytmCDeTu2adPqPCSh1iVplFCe2srIb8p7hUZYULimMSq1uS3_FNY9_l9FfcKlGJYycDezBbIZON_a2Zs4HYaf2DlvVB_bDVZQotH0EzRZzh_ubtdjzOTxfrFarAaY0ar8t4maT-0snvs[Coverage chart for TST-002] macro

verifies

REQ-055

REQ-055 — tracer:incoming[] macro renders incoming links

verifies

REQ-063

REQ-063 — Configurable Kroki image format

verifies

REQ-064

REQ-064 — Incoming macro respects document attributes

verifies

REQ-065

REQ-065 — Incoming macro display styles

verifies

REQ-066

REQ-066 — Incoming macro sort order

verifies

REQ-067

REQ-067 — Incoming groups use the reverse relation type

verifies

REQ-070

REQ-070 — Incoming macro supports collapsible output

verifies

REQ-100

REQ-100 — Inline macros suppressed when links macros are active

verifies

REQ-102

REQ-102 — Collapsible list-style output via document attribute

verifies

REQ-104

REQ-104 — tracer:links[] macro renders combined outgoing and incoming links

verifies

REQ-108

REQ-108 — Matrix files registered in the content catalog

verifies

REQ-110

REQ-110 — Items defined in partials are registered in the graph

verifies

REQ-116

REQ-116 — Items carry component and module context from Antora

verifies

REQ-117

REQ-117 — Cross-module and cross-component xref includes correct prefix

verifies

REQ-119

REQ-119 — Cross-module and cross-component xref resolution

verifies

REQ-142

REQ-142 — Configurable Kroki server URL via extension config

verifies

REQ-143

REQ-143 — Kroki server URL via environment variable

verifies

REQ-144

REQ-144 — Partial items use view URL as source reference

verifies

REQ-145

REQ-145 — All processing passes apply to partial files

verifies

REQ-146

REQ-146 — Empty-state message when item has no outgoing relationships

verifies

REQ-159

REQ-159 — Configuration graph via image::https://kroki.io/graphviz/svg/eJx9kFFLwzAUhd_3Ky71NcKEKQ6pULcHH3wS34aMtPe0vZglNck2p_jfZWuZrHR7TfJ9OeewVF43Nb15XUDnYiTuZs6WUtHPiMhr-8Hi05fXhxGRdQxahFo3SHP3pSjEnUGaeLe2DFalGANOFJXORqtXSJNnmA2iFDp53xvAFWgxdN1CQb6R3owPbxOPz7V4rGBjQou9vHDG-TS5mmTT8XzaMe3htpYIRUbnMOkJ2soYQSrb89yOn-7vZhc8HdUqIkI_yHw6ySbZBcGBGahz_djvd0xeikVQxGhgOSydVVQ4WxopYlhuJdaKwrqBD2CEXruzWs3sEcIgcJzmWPr_5y7OANWt0TEbbYR1BC_z3clcZxNt4KWUVv37B3Xw2CA[Traceability configuration graph] macro

verifies

REQ-161

REQ-161 — Default display name is the humanized type

verifies

REQ-162

REQ-162 — No compile-time fallback

verifies

REQ-163

REQ-163 — Incoming macro PDF compatibility

verifies

REQ-164

REQ-164 — Source file not modified by incoming macro

verifies

REQ-165

REQ-165 — PDF compatibility

verifies

REQ-166

REQ-166 — Source file not modified

verifies

REQ-221

REQ-221 — Relation display names are configurable

verifies

REQ-222

REQ-222 — Labels do not affect the graph

verifies

REQ-244

REQ-244 — Extension handles unversioned components

verifies

REQ-249

REQ-249 — Graph isolation per version

verifies

REQ-250

REQ-250 — Matrix links resolve correctly from site output location

verifies

REQ-252

REQ-252 — git describe is computed once per build

verifies

REQ-253

REQ-253 — git_describe is exposed as a site key

verifies

REQ-254

REQ-254 — git_describe is exposed as a document attribute

verifies

REQ-255

REQ-255 — build succeeds outside a git repository

verifies

REQ-256

REQ-256 — Graph JSON snapshot is registered per component version

verifies

REQ-257

REQ-257 — Snapshot uses the canonical graph format

verifies

REQ-258

REQ-258 — Graph JSON is gated by matrix generation

verifies

REQ-259

REQ-259 — Unversioned components produce a snapshot

verifies

REQ-269

REQ-269 — Guidance renders into the site

TST-003 — CLI Tests

Test file: test/cli.test.ts

Tests the Commander-based CLI — process command (valid content, empty content, invalid paths, malformed macros), matrix command (generation, empty graph), validate command (invalid graph state), export command (empty graph), stats command (empty statistics), preset commands (invalid names, init, listing), help command, and next-id command (sequential ID generation, padding preservation, prefix matching, remote allocation, fail-closed errors, authentication failures, and --local bypass).

Relation

ID

Title

verifies

REQ-056

REQ-056 — CLI next-id command returns next available ID

verifies

REQ-150

REQ-150 — CLI exposes a validate command

verifies

REQ-271

REQ-271 — next-id uses a configured remote allocator

verifies

REQ-272

REQ-272 — next-id fails closed when the allocator is unavailable

verifies

REQ-273

REQ-273 — --local forces a local scan

TST-004 — ConfigLoader Tests

Test file: test/config-loader.test.ts

Tests the ConfigLoader — initialization, built-in preset listing and loading, preset structure validation (including pairwise matrix definitions), configuration loading from file, missing file handling, invalid YAML handling, role and relation validation, matrix definition retrieval, configuration merging (including label overrides), idAllocation validation and environment interpolation, and error messages for invalid configurations and preset names.

Relation

ID

Title

verifies

REQ-083

REQ-083 — Preset defines pairwise requirements-to-design matrix

verifies

REQ-084

REQ-084 — Preset defines pairwise design-to-implementation matrix

verifies

REQ-085

REQ-085 — Preset defines pairwise requirements-to-tests matrix

verifies

REQ-086

REQ-086 — Preset does not define wide multi-column matrices

verifies

REQ-170

REQ-170 — Preset extends a parent by top-level extends

verifies

REQ-171

REQ-171 — Merge semantics match config-file extends

verifies

REQ-172

REQ-172 — Transitive inheritance

verifies

REQ-173

REQ-173 — Missing parent is reported

verifies

REQ-175

REQ-175 — Relations are declared keyed with a mandatory reverse

verifies

REQ-177

REQ-177 — Reverse direction is derived for validation

verifies

REQ-223

REQ-223 — A preset does not extend itself

verifies

REQ-224

REQ-224 — Inheritance cycles are detected and rejected

verifies

REQ-274

REQ-274 — idAllocation config is validated

TST-005 — Graph and API Tests

Test file: test/graph-and-api.test.ts

Tests the TraceabilityGraph (extended queries: merge, getRelatedItems, getItemsWithRelationTo, getRelationshipsByRoles, findPath, getImpactAnalysis) and graph visualization methods (toDot, toVegaLite, toConfigDot). Tests graph integrity validation including circular reference detection (direct, indirect, self-referencing cycles, bidirectional pair exclusion), dangling reference detection with source location and expected-role hints, and invalid relation type reporting with allowed-relations hints. Tests bidirectional relationship merge. Also tests RequirementsTraceabilityExtension API methods (processFiles, validate, export, coverage, config access, preset management, lifecycle).

Relation

ID

Title

verifies

REQ-053

REQ-053 — Graph model supports traversal-bounded subgraph and coverage queries

verifies

REQ-160

REQ-160 — Config graph generator renders configuration as DOT

verifies

REQ-176

REQ-176 — Authoring the reverse name canonicalizes to the primary edge

verifies

REQ-219

REQ-219 — Reverse-authored relationships are detected

verifies

REQ-220

REQ-220 — No second edge is stored for a complementary pair

TST-006 — MatrixGenerator Tests

Test file: test/matrix-generator.test.ts

Tests the MatrixGenerator — basic matrix generation with empty graph, matrix generation with default and named configurations, role-based matrix rows and columns, coverage percentage calculation and status determination (done/partial/missing), coverage relation filtering, CSV export, HTML export, JSON export, coverage report generation, and edge cases (no matching items, missing titles, missing source files, unknown matrix names).

Relation

ID

Title

verifies

REQ-037

REQ-037 — Matrix displays row items as clickable links

verifies

REQ-038

REQ-038 — Matrix displays cell items as clickable links

verifies

REQ-039

REQ-039 — Links include source file tooltip

verifies

REQ-042

REQ-042 — Matrix renders correctly without link resolution configured

verifies

REQ-043

REQ-043 — Non-HTML matrix outputs unchanged

verifies

REQ-105

REQ-105 — Use-case role extends self-traceability preset

verifies

REQ-113

REQ-113 — Matrix template uses partials for structure

verifies

REQ-114

REQ-114 — Dead design-matrix template is removed

verifies

REQ-115

REQ-115 — Dead MatrixGenerator methods are removed

verifies

REQ-128

REQ-128 — Matrix links include module path for module-aware items

verifies

REQ-130

REQ-130 — Matrix links are compatible with Antora indexify URL style

verifies

REQ-167

REQ-167 — Matrix renders one status column per row

verifies

REQ-168

REQ-168 — Coverage summary remains

verifies

REQ-169

REQ-169 — CSV output is unchanged

verifies

REQ-178

REQ-178 — Matrix coverage matches the canonical primary type

TST-007 — Neo4jExporter Tests

Test file: test/neo4j-exporter.test.ts

Tests the Neo4jExporter — empty graph CSV export, items and relationships in CSV, all attributes in export, special character escaping, empty graph Cypher export, items and relationships in Cypher, includeContent option, includeAllAttributes option, output directory creation, multiple role types, and export result counts and file paths.

TST-008 — Relationship Link Substitution Tests

Test file: test/relationship-link-substitution.test.ts

Tests the in-memory regex substitution that replaces relationship macros with Asciidoctor xrefs. Covers same-page xref generation, cross-page xref generation with basename path resolution, dangling reference handling, non-relationship text preservation, hyphenated/dotted IDs, missing sourceFile fallback, and surrounding text preservation.

TST-009 — Query Command Tests

Test file: test/query-command.test.ts

Tests the query CLI subcommand end-to-end — reverse (inbound relationships, empty results, unknown ID), impact (connected items, disconnected items), isolated (relationship-less items, role filter), orphaned (superseded items without incoming functional links), path (chain output, no path, unknown ID), and the --json flag (valid JSON, empty array). Spawns the compiled CLI binary against a temporary fixture directory.

Relation

ID

Title

verifies

REQ-136

REQ-136 — CLI exposes a query subcommand

verifies

REQ-137

REQ-137 — query reverse — find all items that point at a given ID

verifies

REQ-138

REQ-138 — query impact — find all items connected to a given ID

verifies

REQ-139

REQ-139 — query isolated — find items with no relationships

verifies

REQ-140

REQ-140 — query path — find the shortest path between two items

verifies

REQ-141

REQ-141 — JSON output flag

verifies

REQ-227

REQ-227 — query orphaned — find superseded items with no incoming functional links

TST-010 — Vale Extension Tests

Test file: test/antora-vale-extension.test.ts

Tests the bundled Vale prose-lint extension with fake vale and asciidoctor executables on PATH — page and partial findings with source path and line, severity gating (at-or-above fails the build, below is logged), opt-in behavior with no .adoc files, missing-executable failure messages, and that a multi-sentence source line produces no Vale finding.

Relation

ID

Title

verifies

REQ-151

REQ-151 — Vale lints page and partial source content during the build

verifies

REQ-152

REQ-152 — The build gates on a configurable minimum severity

verifies

REQ-153

REQ-153 — The extension reports the Vale configuration source

verifies

REQ-154

REQ-154 — Missing executables fail with an actionable message

verifies

REQ-155

REQ-155 — The extension is opt-in

verifies

REQ-156

REQ-156 — Source layout is out of scope

TST-011 — Supersession Tests

Test file: test/supersession.test.ts

Tests requirement supersession: deriving superseded state and successors from the supersedes relation, split and merge support, self-supersession and cycle validation errors, advisory stale-link warnings, orphaned-state derivation, dangling-reference detection with history/functional classification, and that superseded items are excluded from current-item queries and matrices.

Relation

ID

Title

verifies

REQ-201

REQ-201 — A successor declares a supersedes relationship

verifies

REQ-202

REQ-202 — The reverse superseded_by relationship is derivable

verifies

REQ-203

REQ-203 — Superseded state is derived from relationships

verifies

REQ-204

REQ-204 — Invalid supersession structures are rejected

verifies

REQ-205

REQ-205 — Current-state matrices omit superseded items

verifies

REQ-206

REQ-206 — Functional links to superseded items remain visible

verifies

REQ-207

REQ-207 — History links are excluded from review worklists

verifies

REQ-211

REQ-211 — Validation warns about stale functional links

verifies

REQ-228

REQ-228 — Orphaned state is derived from supersession and incoming functional links

verifies

REQ-234

REQ-234 — Dangling history links are advisory

TST-012 — Graph Diff Tests

Test file: test/graph-diff.test.ts

Tests diffGraphs: added/removed/unmodified classification, field-level modification reporting, suppression of removed items' relationships, relationship deltas on surviving items, and that a superseded pair appears as removed plus added with the supersedes link.

Relation

ID

Title

verifies

REQ-212

REQ-212 — Diff classifies items by stable ID

verifies

REQ-213

REQ-213 — Modified items report changed fields

verifies

REQ-214

REQ-214 — Relationship deltas are limited to surviving items

verifies

REQ-216

REQ-216 — Diff is a public, config-agnostic API

verifies

REQ-225

REQ-225 — The diff does not attempt rename detection

verifies

REQ-226

REQ-226 — A superseded predecessor is reported as removed and its successor as added

TST-017 — Graph Snapshot and Site-Graph Harvest Tests

Test file: test/graph-snapshot.test.ts

Tests serializeSnapshot/deserializeSnapshot round-trips (scope fields preserved, pubUrl dropped, unknown format and malformed snapshots rejected), diffSnapshots over JSON snapshots (same ID in different components not conflated, cross-component superseded pairs), component-qualified diffGraphs identity with bare-ID fallback, and the site-graph harvest resolving a multi-component playbook with component, module, and version scope.

Relation

ID

Title

verifies

REQ-260

REQ-260 — Full cross-source graph is built without site output

verifies

REQ-261

REQ-261 — Harvested items carry component, module, and version scope

verifies

REQ-262

REQ-262 — Graph snapshots serialize to JSON

verifies

REQ-263

REQ-263 — Two snapshots can be diffed without checkouts

verifies

REQ-264

REQ-264 — Diff matches items by component-qualified identity

TST-013 — Item Lifecycle Tests

Test file: test/item-lifecycle.test.ts

Tests the archive and remove CLI commands end-to-end: moving a superseded block to superseded.adoc with content preserved, rejecting non-superseded and unknown IDs, removing an orphaned item after confirmation, declining on a non-y answer, removing an isolated item only after typing the ID, declining on ID mismatch, and rejecting a non-orphaned/non-isolated item.

Relation

ID

Title

verifies

REQ-235

REQ-235 — archive moves a superseded item to the module’s superseded page

verifies

REQ-236

REQ-236 — remove deletes an orphaned item

verifies

REQ-237

REQ-237 — remove deletes an isolated item with a stronger confirmation

verifies

REQ-238

REQ-238 — Block extent is detected before mutation

TST-014 — Supersession Overview and Render Toggle Tests

Test file: test/antora-extension.test.ts (supersession overview and render toggle)

Tests the generated supersession overview content — totals, per-role statistics, and the dangling-reference worklist — the display-only renderSuperseded toggle that omits superseded item blocks from rendered output without affecting the graph, and the full-graph accumulation across components used by the generation passes.

Relation

ID

Title

verifies

REQ-229

REQ-229 — Overview page generation is opt-in and configurable

verifies

REQ-230

REQ-230 — Overview page reports graph totals

verifies

REQ-231

REQ-231 — Overview page reports per-role statistics

verifies

REQ-232

REQ-232 — Overview page lists dangling references

verifies

REQ-233

REQ-233 — Superseded items and links can be hidden

verifies

REQ-239

REQ-239 — Generation passes use the complete graph across all components and versions

TST-015 — Documentation Example Validation Tests

Test file: test/doc-example-validation.test.ts

Tests that every [item] example in the documentation uses known roles and relation types allowed by the traceability configuration.

Relation

ID

Title

verifies

REQ-200

REQ-200 — Doc examples validate against the traceability configuration

TST-016 — Release Consistency Tests

Test file: test/release-check.test.ts

Tests the release-consistency checker’s pure validation logic: a consistent release passes, and a missing tag, missing maintenance branch, missing changelog entry, and nonexistent playbook ref are each reported.

Relation

ID

Title

verifies

REQ-245

REQ-245 — Release consistency is checkable

verifies

REQ-246

REQ-246 — Version is consistent across sources

verifies

REQ-247

REQ-247 — Maintenance branch follows the tag

verifies

REQ-248

REQ-248 — Playbook refs exist in the repository

TST-018 — Role Guidance Tests

Test file: test/role-guidance.test.ts

Tests roleGuidance config resolution via ConfigLoader: preset default guidance, project override per role, extends-chain merging, and the no-guidance case for a role without an entry.

Relation

ID

Title

verifies

REQ-265

REQ-265 — Role guidance is configurable per role

verifies

REQ-266

REQ-266 — Default guidance ships with presets

verifies

REQ-267

REQ-267 — Guidance resolves through the extends chain

TST-019 — ID Allocation Server Tests

Test file: id-server/test/server.test.ts

Tests the standalone allocator service — sequential ID allocation, missing-prefix errors, bearer-token tenancy (default tenant, unknown token), per-tenant counter isolation, padding width (default, configured, overflow), seeded starting values, error responses allocating no ID, concurrent allocation, database reopen persistence, and config parsing.

Relation

ID

Title

verifies

REQ-275

REQ-275 — Allocator returns the next ID

verifies

REQ-276

REQ-276 — Allocation is atomic and monotonic

verifies

REQ-277

REQ-277 — Tenancy is derived from the bearer token

verifies

REQ-278

REQ-278 — Padding honors configured width

verifies

REQ-279

REQ-279 — Server honors a configured starting value per prefix

TST-020 — Seed Export Tests

Test file: test/seed.test.ts

Tests getPrefixMaxima and the seed command — numeric max+1 per prefix with padding width, deduplication of the same ID across files, skipping IDs without a numeric suffix, local-directory YAML output, missing-input error, and playbook harvesting.

Relation

ID

Title

verifies

REQ-280

REQ-280 — seed reports the next numeric ID per prefix

verifies

REQ-281

REQ-281 — seed output matches the allocator seed format

verifies

REQ-282

REQ-282 — seed accepts a local directory or an Antora playbook

verifies

REQ-283

REQ-283 — seed requires an input