Reorganize docs/design, docs/reqstream, and docs/user_guide into subsystem subfolders; implement --results and all YAML acceptance criteria - #14
Conversation
…er updated standards Agent-Logs-Url: https://github.com/demaconsulting/FileAssert/sessions/182fe08c-93d6-4e93-8f5e-4970dd534140 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot There seem to be review-sets which don't contain the full set of requirements, design, code, and tests. |
…FileAssertData, Platform-Support, OTS-Dependencies Agent-Logs-Url: https://github.com/demaconsulting/FileAssert/sessions/4de1d10f-138c-4562-b29e-8aaaad8f1bfa Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Fixed in commit 3c00da1. The three incomplete review-sets were:
|
…ependencies review-set Agent-Logs-Url: https://github.com/demaconsulting/FileAssert/sessions/81c997ab-f80b-4077-a242-a548eb8a6f96 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Reorganizes design and requirements documentation into subsystem/unit subfolders to comply with updated .github/standards, and updates review tracking to match the new structure.
Changes:
- Restructured
docs/reqstream/into subsystem/unit/ots subfolders and updated the rootrequirements.yamlinclude list. - Restructured
docs/design/into subsystem/unit subfolders and updateddocs/design/definition.yamlinput paths. - Updated
.reviewmark.yamlpatterns and review-set paths to reflect the new documentation hierarchy.
Reviewed changes
Copilot reviewed 4 out of 38 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| requirements.yaml | Updates requirement include paths to new docs/reqstream/** hierarchy. |
| docs/reqstream/system.yaml | Adds system-level requirements file at new standardized location/name. |
| docs/reqstream/program.yaml | Adds top-level unit requirements for Program at root per standards. |
| docs/reqstream/cli/cli.yaml | Adds Cli subsystem requirements under subsystem folder. |
| docs/reqstream/cli/context.yaml | Adds Context unit requirements under Cli subsystem folder. |
| docs/reqstream/configuration/configuration.yaml | Adds Configuration subsystem requirements under subsystem folder. |
| docs/reqstream/configuration/file-assert-config.yaml | Adds FileAssertConfig unit requirements under Configuration folder. |
| docs/reqstream/configuration/file-assert-data.yaml | Adds FileAssertData DTO unit requirements under Configuration folder. |
| docs/reqstream/modeling/modeling.yaml | Adds Modeling subsystem requirements under subsystem folder. |
| docs/reqstream/modeling/file-assert-test.yaml | Adds FileAssertTest unit requirements under Modeling folder. |
| docs/reqstream/modeling/file-assert-file.yaml | Adds FileAssertFile unit requirements under Modeling folder. |
| docs/reqstream/modeling/file-assert-rule.yaml | Adds FileAssertRule unit requirements under Modeling folder. |
| docs/reqstream/utilities/utilities.yaml | Adds Utilities subsystem requirements under subsystem folder. |
| docs/reqstream/utilities/path-helpers.yaml | Adds PathHelpers unit requirements under Utilities folder. |
| docs/reqstream/selftest/selftest.yaml | Adds SelfTest subsystem requirements under subsystem folder. |
| docs/reqstream/selftest/validation.yaml | Adds Validation unit requirements under SelfTest folder. |
| docs/reqstream/ots/mstest.yaml | Moves MSTest OTS requirements into ots/ folder. |
| docs/reqstream/ots/reqstream.yaml | Moves ReqStream OTS requirements into ots/ folder. |
| docs/reqstream/ots/buildmark.yaml | Moves BuildMark OTS requirements into ots/ folder. |
| docs/reqstream/ots/versionmark.yaml | Moves VersionMark OTS requirements into ots/ folder. |
| docs/reqstream/ots/sarifmark.yaml | Moves SarifMark OTS requirements into ots/ folder. |
| docs/reqstream/ots/sonarmark.yaml | Moves SonarMark OTS requirements into ots/ folder. |
| docs/reqstream/ots/reviewmark.yaml | Moves ReviewMark OTS requirements into ots/ folder. |
| docs/design/definition.yaml | Updates design doc build inputs to new docs/design/** hierarchy. |
| docs/design/cli/cli.md | Adds/moves Cli subsystem design doc into subsystem folder. |
| docs/design/cli/context.md | Adds/moves Context unit design doc into Cli folder. |
| docs/design/configuration/configuration.md | Adds/moves Configuration subsystem design doc into subsystem folder. |
| docs/design/configuration/file-assert-config.md | Adds/moves FileAssertConfig unit design doc into Configuration folder. |
| docs/design/configuration/file-assert-data.md | Adds/moves FileAssertData DTO design doc into Configuration folder. |
| docs/design/modeling/modeling.md | Adds/moves Modeling subsystem design doc into subsystem folder. |
| docs/design/modeling/file-assert-test.md | Adds/moves FileAssertTest unit design doc into Modeling folder. |
| docs/design/modeling/file-assert-file.md | Adds/moves FileAssertFile unit design doc into Modeling folder. |
| docs/design/modeling/file-assert-rule.md | Adds/moves FileAssertRule unit design doc into Modeling folder. |
| docs/design/utilities/utilities.md | Adds/moves Utilities subsystem design doc into subsystem folder. |
| docs/design/utilities/path-helpers.md | Adds/moves PathHelpers unit design doc into Utilities folder. |
| docs/design/selftest/selftest.md | Adds/moves SelfTest subsystem design doc into subsystem folder. |
| docs/design/selftest/validation.md | Adds/moves Validation unit design doc into SelfTest folder. |
| .reviewmark.yaml | Updates needs-review patterns and review-set paths to match new structure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot The docs/guide should be docs/user_guide and its guide.md should be introduction.md - and you may need to update README.md to handle this. |
… update all references Agent-Logs-Url: https://github.com/demaconsulting/FileAssert/sessions/f42a88e4-c1e7-4090-8f40-b54a8004630a Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Done in commit 800ae22. |
|
@copilot Please add the missing requirements from #14 (comment) Note that these requirements may flow down and update other subsystem and unit requirements, and in turn may result in design, code, and test changes. Please do this additional work as necessary. |
…tering Agent-Logs-Url: https://github.com/demaconsulting/FileAssert/sessions/04984bcb-56c4-4555-8399-20c6c1c26f3d Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Done in commit 4cfe8a9. Here's what was added and why: Three new system requirements (
Two new program-level requirements (
Design document updates:
All 95 tests pass across .NET 8/9/10; all linters pass. |
|
@copilot So given this, do you feel confident the tool actually implements the functionality it tells the user is available? How well is this functionality demonstrated in integration tests? Do we actually test by producing files, running .fileassert.yaml checks, and verifying the TRX/JUnit result files contain the expected pass/fail results? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 46 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
.github/workflows/build.yaml:1
- The workflow now references
docs/user_guide/definition.yaml, but the changes shown include an update todocs/guide/definition.yaml(old path). If the file wasn’t actually moved/renamed todocs/user_guide/definition.yaml, this workflow step will fail at runtime. Align the repo paths by either renaming/moving the defaults file todocs/user_guide/definition.yamlor updating the workflow to point at the actual file location.
---
requirements.yaml:1
- The root
requirements.yamlnow includesdocs/reqstream/system.yamlanddocs/reqstream/program.yaml, but the diffs shown add new requirements todocs/reqstream/fileassert-system.yamlanddocs/reqstream/unit-program.yaml. If those files were not actually renamed/moved to matchsystem.yaml/program.yaml, the requirements aggregation will miss the updated content (or fail if the new paths don’t exist). Ensure the physical file names/paths match the includes, or update the includes to match the actual files.
test/DemaConsulting.FileAssert.Tests/IntegrationTests.cs:1 - This test only asserts the exit code. It can become a false positive if the tool exits 0 for other reasons (e.g., test discovery failure, config not loaded, or filters being ignored but failures not surfaced). Strengthen the assertion by capturing the tool output and verifying that the smoke test is reported as executed while the regression test (or
missing.txt) is not mentioned, or by asserting an expected run-count/summary if the CLI emits one.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…on tests with TRX/JUnit verification Agent-Logs-Url: https://github.com/demaconsulting/FileAssert/sessions/28cb8e14-d057-4871-8dd6-3e7f1d338a2c Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
The review identified a real gap, now fixed in commit a7a9e00. What was missing: The user guide (and system requirements added in the previous commit) documented What was implemented:
End-to-end tests that create actual files and verify result file content:
All 100 tests pass across .NET 8/9/10. |
|
@copilot Are there system requirements and integration tests for all types of acceptance criteria identified in the README.md? |
… acceptance criteria Agent-Logs-Url: https://github.com/demaconsulting/FileAssert/sessions/49e2fe61-d1cc-4350-b0c2-90f1bbacde82 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Addressed in commit 6168cbe. The README lists 9 acceptance criteria in the YAML format table (under the "Proposed" disclaimer). Of those, 4 are currently implemented in code:
The remaining 5 criteria ( Added for the two missing ones:
|
|
@copilot I want you to implement them - that means removing the "Proposed: not yet implemented." and actually putting in requirements (flowing down from system to subsystem to unit, then doing the design, then the code, then the tests (system, subsystem, and unit). |
…in-regex acceptance criteria Agent-Logs-Url: https://github.com/demaconsulting/FileAssert/sessions/30d3a1d6-0e20-4815-8e65-3f64d7adab35 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Done in commit f1354c4. All 5 remaining criteria are now fully implemented end-to-end:
Each criterion has the full traceability chain:
The "Proposed: not yet implemented" disclaimer is removed from both |
Brings the repository into compliance with updated
.github/standardsfor design documentation, requirements management, and file review tracking. The flat file layout indocs/design/anddocs/reqstream/is replaced with a hierarchy that mirrors the source code subsystem structure.docs/guide/is renamed todocs/user_guide/with its content file renamed tointroduction.md. Review-sets are updated to include the full set of requirements, design, code, and test files. All system capabilities are now captured in requirements with full traceability through design, code, and tests. The--resultsflag is fully implemented for the main file assertion path (not just--validate). All nine YAML acceptance criteria are fully implemented — the "Proposed: not yet implemented" disclaimer has been removed from the user guide and README.Description
docs/design/ — subsystem subfolders
Moved subsystem and unit design docs into kebab-case subfolders; root-level files (
introduction.md,system.md,program.md) remain at root:cli/—cli.md,context.mdconfiguration/—configuration.md,file-assert-config.md,file-assert-data.mdmodeling/—modeling.md,file-assert-test.md,file-assert-file.md,file-assert-rule.mdutilities/—utilities.md,path-helpers.mdselftest/—selftest.md,validation.mddocs/design/definition.yamlupdated with new input-file paths.docs/design/system.mdupdated to add "Configuration file path" and "Test filtering" responsibilities, and to expand the execution flow with explicit steps for--config, positional filter arguments, and--resultsoutput.docs/design/program.mdupdated to name--configandcontext.Filtersexplicitly in theRunToolLogicdescription.docs/design/cli/context.mdupdated to addErrorCountto the properties table and design decisions.docs/design/configuration/file-assert-config.mdupdated to document results serialization in the execution method and design decisions.docs/design/modeling/file-assert-file.mdupdated to documentCount,MinSize, andMaxSizeproperties and the size-enforcement execution phase.docs/design/modeling/file-assert-rule.mdupdated to documentFileAssertDoesNotContainRuleandFileAssertDoesNotMatchRuleclasses and their YAML keys.docs/design/configuration/file-assert-data.mdupdated to document all new DTO properties.docs/reqstream/ — subsystem and ots subfolders
Reorganized from prefixed flat files (
subsystem-*.yaml,unit-*.yaml,ots-*.yaml) into a mirrored hierarchy:system.yaml(renamed fromfileassert-system.yaml)program.yaml(renamed fromunit-program.yaml, top-level unit stays at root)cli/,configuration/,modeling/,utilities/,selftest/subfolders for subsystem + unit YAMLsots/subfolder for all OTS dependency YAMLsconfiguration/file-assert-data.yamlrequirements file for the FileAssertData DTOsrequirements.yamlupdated with new include paths.System requirements added to
docs/reqstream/system.yaml:FileAssert-System-ConfigFile— The tool shall load the YAML test suite from--configor the default path.FileAssert-System-Results— The tool shall write TRX or JUnit XML results when invoked with--results, covering both the--validatepath and the main assertion path.FileAssert-System-TestFiltering— The tool shall run only tests matching the positional name/tag filters.FileAssert-System-MaxCountConstraint— The tool shall return a non-zero exit code when the file count exceeds the declared maximum.FileAssert-System-RegexRule— The tool shall apply amatchesregex rule and return non-zero when content does not match.FileAssert-System-ExactCountConstraint— The tool shall return a non-zero exit code when the file count does not equal the declared exact count.FileAssert-System-FileSizeConstraints— The tool shall return a non-zero exit code when a file's size violates amin-sizeormax-sizeconstraint.FileAssert-System-DoesNotContainRule— The tool shall return a non-zero exit code when a file contains the text specified in adoes-not-containrule.FileAssert-System-DoesNotContainRegexRule— The tool shall return a non-zero exit code when a file matches the pattern specified in adoes-not-contain-regexrule.Downstream requirements added to
docs/reqstream/program.yaml:FileAssert-Program-Config— Program dispatchesRunToolLogicusingcontext.ConfigFile.FileAssert-Program-FilterTests— Program passescontext.Filterstoconfig.Run.New unit and context requirements:
FileAssert-Context-ErrorCount— TheContextclass shall expose a monotonically incrementing error count.FileAssert-FileAssertConfig-Results— TheFileAssertConfigclass shall write per-test pass/fail results to TRX or JUnit XML.FileAssert-FileAssertFile-ExactCount— TheFileAssertFileclass shall enforce an exact file count constraint.FileAssert-FileAssertFile-SizeConstraints— TheFileAssertFileclass shall enforcemin-sizeandmax-sizeper matched file.FileAssert-FileAssertRule-DoesNotContainRule— TheFileAssertDoesNotContainRuleclass shall report an error when content contains the forbidden substring.FileAssert-FileAssertRule-DoesNotContainRegexRule— TheFileAssertDoesNotMatchRuleclass shall report an error when content matches the forbidden pattern.--results implementation for main assertion path
Context.ErrorCount(Cli/Context.cs) — newinternal int ErrorCountproperty incremented by everyWriteErrorcall.FileAssertConfig.Run(Configuration/FileAssertConfig.cs) — whencontext.ResultsFileis set, records aTestResultper test (Passed/Failed based on error count delta) and serializes to TRX or JUnit XML.All YAML acceptance criteria now implemented
Previously five criteria were marked "Proposed: not yet implemented." All are now fully implemented:
count— Exact file count constraint (FileAssertFile.Runenforces exact match after min/max checks)min-size/max-size— Per-file size enforcement usingFileInfo.Lengthbefore content rulesdoes-not-contain— NewFileAssertDoesNotContainRuleclass; reports error when content contains the forbidden substring (ordinal comparison)does-not-contain-regex— NewFileAssertDoesNotMatchRuleclass; reports error when content matches the forbidden pattern (compiled regex, 10-second timeout)The "Proposed: not yet implemented" disclaimer is removed from both
README.mdanddocs/user_guide/introduction.md. Pre-existing YAML key errors in the examples (path→pattern,count-min→min,count-max→max,contains-regex→matches, addedrules:nesting) are also corrected.docs/user_guide/ — renamed from docs/guide/
docs/guide/renamed todocs/user_guide/docs/user_guide/guide.mdrenamed todocs/user_guide/introduction.mddocs/user_guide/definition.yamlupdated with newresource-pathandinput-filespathsREADME.md[link-guide]URL updated to point todocs/user_guide/introduction.md.github/workflows/build.yamlPandoc and Weasyprint step paths updated to new location.reviewmark.yaml — updated per reviewmark-usage.md standard
requirements.yamlanddocs/design/**/*.mdtoneeds-reviewpatternsIntegrationTests.csas test evidence proving multi-platform executiondocs/reqstream/ots/**/*.yamlglob pattern; no test file referenceNew and updated tests
IntegrationTest_TestFiltering_OnlyRunsMatchingTests— smoke filter skips a failing regression testIntegrationTest_PassingAssertions_WritesTrxWithPassedResults— verifies TRXoutcome="Passed"for a passingcontainsassertionIntegrationTest_FailingAssertions_WritesJUnitWithFailedResults— verifies JUnitfailures="1"for a failingcontainsassertionFileAssertConfig_Run_WithResultsFile_WritesTrxWithPassedOutcomeandWritesJUnitWithFailedOutcome— unit-level equivalentsContext_ErrorCount_IncrementsOnEachWriteError— verifies the newErrorCountpropertyIntegrationTest_MaxCountConstraint_TooManyFiles_ReturnsNonZero—max: 1with 2 filesIntegrationTest_RegexRule_MatchingContent_ReturnsZeroandNonMatchingContent_ReturnsNonZero—matches:ruleIntegrationTest_ExactCountConstraint_WrongCount_ReturnsNonZero—count: 1with 2 filesIntegrationTest_FileSizeConstraints_TooSmall_ReturnsNonZero—min-size: 10with empty fileIntegrationTest_FileSizeConstraints_TooLarge_ReturnsNonZero—max-size: 5with large fileIntegrationTest_DoesNotContainRule_ForbiddenTextPresent_ReturnsNonZero—does-not-contain:with matching fileIntegrationTest_DoesNotContainRegexRule_ForbiddenPatternMatches_ReturnsNonZero—does-not-contain-regex:with matching fileFileAssertFileTests.csandFileAssertRuleTests.csfor all new criteriaType of Change
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
dotnet build --configuration Releasedotnet test --configuration Releasedotnet run --project src/DemaConsulting.FileAssert --configuration Release --framework net10.0--no-build -- --validateCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
./lint.sh(Unix/macOS) orcmd /c lint.bat/./lint.bat(Windows)Testing
Documentation
Additional Notes
All 117 tests pass across .NET 8, 9, and 10. Source code changes are in
Context.cs(newErrorCountproperty),FileAssertConfig.cs(results serialization inRun),FileAssertData.cs(five new DTO properties),FileAssertFile.cs(exact count and size enforcement), andFileAssertRule.cs(two new rule classes and updated factory). Most documentation changes are performed viagit mvto preserve history.