fix: formal review fixes — results file directory creation and requirements scope cleanup#47
Merged
Malcolmnixon merged 3 commits intomainfrom Apr 5, 2026
Merged
Conversation
…ents; fix results file directory creation Agent-Logs-Url: https://github.com/demaconsulting/ReviewMark/sessions/0c41f310-04ab-4dc1-8f1e-c297f19312b5 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Malcolmnixon
April 5, 2026 13:22
View session
Malcolmnixon
approved these changes
Apr 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a self-test robustness gap by ensuring the --results output path can be written even when its parent directory doesn’t yet exist, and updates SelfTest requirements traceability accordingly.
Changes:
- Create the parent directory for
--resultsbefore writing TRX/JUnit output. - Add a regression test covering results-file output into a new (non-existent) directory.
- Update the Validation unit requirements to reference the new test.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/DemaConsulting.ReviewMark/SelfTest/Validation.cs | Creates the results file parent directory prior to writing, preventing DirectoryNotFoundException scenarios. |
| test/DemaConsulting.ReviewMark.Tests/SelfTest/ValidationTests.cs | Adds a regression test ensuring --results can target a newly created directory. |
| docs/reqstream/review-mark/self-test/validation.yaml | Links the new regression test to the Validation results-file requirement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/DemaConsulting.ReviewMark.Tests/SelfTest/ValidationTests.cs
Outdated
Show resolved
Hide resolved
Member
|
@copilot apply changes based on the comments in this thread |
…nNewDirectory_CreatesDirectory test Agent-Logs-Url: https://github.com/demaconsulting/ReviewMark/sessions/4b5d1e5d-5412-46c0-a53c-0dc783a2cf7f Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Malcolmnixon
approved these changes
Apr 5, 2026
This was referenced Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Performed formal reviews on all 14 review-sets in
.reviewmark.yamland fixed the issues found.Bug Fix —
Validation.cs: Results file parent directory creationWriteResultsFiledid not create the parent directory before callingFile.WriteAllText. If a user passed--results output/reports/results.trxandoutput/reports/did not exist, the write would fail silently (logged but exit code 0, no file produced).src/DemaConsulting.ReviewMark/SelfTest/Validation.cs— callDirectory.CreateDirectoryon the parent directory before writing the results filetest/DemaConsulting.ReviewMark.Tests/SelfTest/ValidationTests.cs— add regression testValidation_Run_WithResultsFileInNewDirectory_CreatesDirectory, using theTestDirectoryhelper for safe, flake-resistant cleanupdocs/reqstream/review-mark/self-test/validation.yaml— reference the new test inReviewMark-Validation-ResultsFileRequirements Scope Cleanup — CLI and Configuration subsystems
The
cli.yamlandconfiguration.yamlrequirements files referenced self-validation tests (ReviewMark_*fromValidation.cs). These belong to the SelfTest subsystem, not the CLI or Configuration subsystems. Thechildren:links already connect CLI/Configuration requirements to the relevant self-test requirements, so the cross-subsystem test references were redundant and over-reaching.docs/reqstream/review-mark/cli/cli.yaml— removed allReviewMark_*test references; CLI requirements now reference only CLI-level tests (Context/Program/Integration)docs/reqstream/review-mark/configuration/configuration.yaml— removedReviewMark_*references; replaced with proper unit test names fromReviewMarkConfigurationTests.csfor plan generation, report generation, and elaboration requirementsType of Change
Related Issues
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.ReviewMark --configuration Release --framework net10.0--no-build -- --validateCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
cspell "**/*.{md,cs}"markdownlint "**/*.md"yamllint .Testing
Documentation
Additional Notes
The regression test
Validation_Run_WithResultsFileInNewDirectory_CreatesDirectoryusesTestDirectoryas the root temp directory and targets a non-existentoutput/subdirectory within it, exercising the directory creation path. Cleanup is handled safely byTestDirectory.Dispose(), eliminating the risk of test flakiness from transient file-system locks.