Add root-tags orphan detection with ReqStream 1.11.0 - #75
Conversation
Upgrade demaconsulting.reqstream 1.10.0 -> 1.11.0 and adopt the root-tags orphan-detection feature to guarantee every requirement traces to either a product-facing system requirement or a documented quality/process outcome. - Tag all 29 FileAssert-System-* requirements with [system]. - Add docs/reqstream/quality.yaml (8 categories: build integrity, traceable versions, static analysis, peer review, documentation generation, test infrastructure, requirements traceability, architecture traceability) tagged [quality], covering process/tooling OTS and the Shared-FileAssert-* self-dogfooding requirements. - Set root-tags: [system, quality] in requirements.yaml. - Close ~20 traced orphan gaps across cli, program, configuration, modeling, selftest, and utilities requirement trees by wiring subsystem/unit-level requirements up to their real System-level parents (all links verified against actual call sites in src/, not fabricated). - Link genuine product-library OTS dependencies (YamlDotNet, FileSystemGlobbing, HtmlAgilityPack, PdfPig) to the specific feature/unit that consumes them, since these are directly used by production code rather than being process/tooling dependencies. Dead-code discovery and removal (found via orphan tracing): - FileAssert-Cli-ScopedContext (IContext.WithPrefix / Context.ScopedContext) could not be honestly linked to any System requirement. Git history (PR #54) confirmed WithPrefix was removed from FileAssertZipAssert.Run's production path in the same commit that introduced it, to fix a duplicated-breadcrumb bug, and was never reinstated. Removed the now-superseded WithPrefix/ ScopedContext code, its dedicated test file, and rewrote the FileAssert-IContext-OutputContract requirement and companion design/ verification docs to describe the current (correct) breadcrumb mechanism, which is ZipFileContainer.GetDisplayPath string interpolation. Result: dotnet reqstream --requirements requirements.yaml reports 0 orphans. Full build, all 987 tests (net8.0/net9.0/net10.0), lint.ps1, and reviewmark --lint all pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The removal of WithPrefix/ScopedContext is consistently reflected across code, tests, requirements, and companion artifacts, and the updated ReqStream root-tag structure is coherently integrated.
Pull request overview
This PR upgrades the pinned ReqStream tool and adopts the new root-tags orphan-detection approach to ensure every requirement traces up to a system-level outcome ([system]) or an explicit process/quality outcome ([quality]). As part of enforcing that traceability, it removes the now-unreferenced IContext.WithPrefix / Context.ScopedContext breadcrumb-scoping implementation and updates requirements and documentation to reflect the breadcrumb mechanism provided via IFileContainer.GetDisplayPath/ZipFileContainer.
Changes:
- Upgraded
demaconsulting.reqstreamfrom 1.10.0 to 1.11.0 and configuredroot-tags: [system, quality]with a newdocs/reqstream/quality.yamlroot for quality outcomes. - Removed
IContext.WithPrefix,Context.ScopedContext, and the associatedScopedContextTests, and updated test helper contexts accordingly. - Updated ReqStream requirement links plus design/verification/SysML2 artifacts to match the new traceability structure and the updated breadcrumb strategy.
File summaries
| File | Description |
|---|---|
| test/DemaConsulting.FileAssert.Tests/Modeling/FileAssertZipAssertTests.cs | Removes test-only WithPrefix scaffolding from the capturing context helper. |
| test/DemaConsulting.FileAssert.Tests/Modeling/FileAssertYamlAssertTests.cs | Drops no-op WithPrefix implementation from a test context to match the updated interface. |
| test/DemaConsulting.FileAssert.Tests/Modeling/FileAssertJsonAssertTests.cs | Drops no-op WithPrefix implementation from a test context to match the updated interface. |
| test/DemaConsulting.FileAssert.Tests/Modeling/FileAssertHtmlAssertTests.cs | Drops no-op WithPrefix implementation from a test context to match the updated interface. |
| test/DemaConsulting.FileAssert.Tests/Cli/ScopedContextTests.cs | Removes the dedicated test coverage for the deleted WithPrefix/scoped context behavior. |
| src/DemaConsulting.FileAssert/Cli/IContext.cs | Removes WithPrefix from the IContext contract and updates remarks accordingly. |
| src/DemaConsulting.FileAssert/Cli/Context.cs | Deletes Context.WithPrefix and the nested ScopedContext wrapper implementation. |
| requirements.yaml | Adds root-tags: [system, quality] and includes the new quality requirements file. |
| docs/verification/file-assert/cli/i-context.md | Updates verification approach to reflect IContext as a minimal contract verified via ContextTests. |
| docs/verification/file-assert/cli.md | Removes WithPrefix/ScopedContext verification section from CLI verification overview. |
| docs/sysml2/model/file-assert/cli/i-context.sysml | Updates SysML2 metadata/comments to reference the correct test artifact and revised purpose text. |
| docs/reqstream/quality.yaml | Adds a new quality-outcome requirements set tagged [quality] to serve as a root for traceability. |
| docs/reqstream/file-assert/utilities.yaml | Adds/adjusts child links to close orphan gaps and improve traceability for utility units. |
| docs/reqstream/file-assert/selftest.yaml | Adds/adjusts child links to close orphan gaps for self-test/validation requirements. |
| docs/reqstream/file-assert/program.yaml | Wires program-level requirement(s) up to their correct system-level parent(s). |
| docs/reqstream/file-assert/modeling/file-assert-test.yaml | Adds/adjusts modeling requirement child link(s) for traceability closure. |
| docs/reqstream/file-assert/modeling/file-assert-file.yaml | Adds/adjusts child links (including OTS and interface contract linkage) for traceability closure. |
| docs/reqstream/file-assert/modeling.yaml | Adds/adjusts modeling requirement child links to close traceability gaps. |
| docs/reqstream/file-assert/configuration/file-assert-config.yaml | Links configuration behavior to the relevant OTS dependency requirement. |
| docs/reqstream/file-assert/cli/i-context.yaml | Updates IContext requirements justification and test references after removing scoped contexts. |
| docs/reqstream/file-assert/cli.yaml | Removes the orphaned “ScopedContext” requirement node and updates traceability accordingly. |
| docs/reqstream/file-assert.yaml | Tags system-level requirements with [system] and adjusts child links to ensure root traceability. |
| docs/design/file-assert/modeling/file-assert-zip-assert.md | Updates design narrative to describe breadcrumb reporting via display paths rather than WithPrefix. |
| docs/design/file-assert/modeling.md | Updates architecture narrative around error/breadcrumb reporting for nested zip assertions. |
| docs/design/file-assert/cli/i-context.md | Removes WithPrefix from interface design docs and simplifies rationale to the minimal contract. |
| docs/design/file-assert/cli/context.md | Removes WithPrefix/ScopedContext from Context design documentation and method tables. |
| docs/design/file-assert/cli.md | Removes WithPrefix from the CLI interface overview table. |
| .config/dotnet-tools.json | Bumps pinned demaconsulting.reqstream tool version to 1.11.0. |
Review details
- Files reviewed: 28/28 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Upgrades demaconsulting.reqstream 1.10.0 → 1.11.0 and adopts the root-tags
orphan-detection feature (same playbook as ReqStream #211/#212 and
DictionaryMark #39) to guarantee every requirement traces up to either a
product-facing System requirement or a documented Quality/process outcome.
Changes
docs/reqstream/quality.yaml— 8 quality-outcome categories (buildintegrity, traceable versions, static analysis, peer review, documentation
generation, test infrastructure, requirements traceability, architecture
traceability), tagged [quality].
oot-tags: [system, quality] in
equirements.yaml.
(Cli, Program, Configuration, Modeling, SelfTest, Utilities) up to their
real System-level parents — every link verified against actual call sites
in src/, none fabricated.
FileSystemGlobbing, HtmlAgilityPack, PdfPig) to the specific feature/unit
that consumes them in production code, distinct from process/tooling OTS
which lives under quality.yaml.
Notable finding: dead code removed
Tracing orphans surfaced FileAssert-Cli-ScopedContext
(IContext.WithPrefix / Context.ScopedContext), which could not be
honestly linked to any System requirement. Design docs claimed
FileAssertZipAssert.Run used it for breadcrumb error paths, but grep
showed WithPrefix was never called in production code.
git log -S"WithPrefix" traced this to PR #54, which introduced
IContext/WithPrefix and removed its only production call site in the
same commit, with an explicit message: "Fix duplicated breadcrumb in
ZipAssert error messages ... Remove WithPrefix from ZipAssert.Run and rely
solely on GetDisplayPath." This confirmed the code was genuinely
superseded, not speculative or in-progress.
Removed the dead WithPrefix/ScopedContext code, its dedicated test file
(ScopedContextTests.cs), and updated the requirement, design, and
verification docs to describe the actual (correct) breadcrumb mechanism —
ZipFileContainer.GetDisplayPath string interpolation.
This is exactly the class of problem root-tags was built to catch: a
low-level feature, good in isolation, with no path back to any
user-visible functionality.
Validation
dotnet reqstream --requirements requirements.yaml→ 0 orphansdotnet reqstream --requirements requirements.yaml --lint→ passdotnet build -c Release→ 0 warnings, 0 errorsdotnet test(net8.0/net9.0/net10.0) → 987/987 passedpwsh ./lint.ps1→ passdotnet reviewmark --lint→ passdotnet sysml2tools lint→ no errorsCo-authored-by: Copilot 223556219+Copilot@users.noreply.github.com