Skip to content

fix: formal review fixes — results file directory creation and requirements scope cleanup#47

Merged
Malcolmnixon merged 3 commits intomainfrom
copilot/perform-formal-reviews
Apr 5, 2026
Merged

fix: formal review fixes — results file directory creation and requirements scope cleanup#47
Malcolmnixon merged 3 commits intomainfrom
copilot/perform-formal-reviews

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

Pull Request

Description

Performed formal reviews on all 14 review-sets in .reviewmark.yaml and fixed the issues found.

Bug Fix — Validation.cs: Results file parent directory creation

WriteResultsFile did not create the parent directory before calling File.WriteAllText. If a user passed --results output/reports/results.trx and output/reports/ did not exist, the write would fail silently (logged but exit code 0, no file produced).

  • src/DemaConsulting.ReviewMark/SelfTest/Validation.cs — call Directory.CreateDirectory on the parent directory before writing the results file
  • test/DemaConsulting.ReviewMark.Tests/SelfTest/ValidationTests.cs — add regression test Validation_Run_WithResultsFileInNewDirectory_CreatesDirectory, using the TestDirectory helper for safe, flake-resistant cleanup
  • docs/reqstream/review-mark/self-test/validation.yaml — reference the new test in ReviewMark-Validation-ResultsFile

Requirements Scope Cleanup — CLI and Configuration subsystems

The cli.yaml and configuration.yaml requirements files referenced self-validation tests (ReviewMark_* from Validation.cs). These belong to the SelfTest subsystem, not the CLI or Configuration subsystems. The children: 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 all ReviewMark_* test references; CLI requirements now reference only CLI-level tests (Context/Program/Integration)
  • docs/reqstream/review-mark/configuration/configuration.yaml — removed ReviewMark_* references; replaced with proper unit test names from ReviewMarkConfigurationTests.cs for plan generation, report generation, and elaboration requirements

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Pre-Submission Checklist

Before submitting this pull request, ensure you have completed the following:

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All unit tests pass: dotnet test --configuration Release
  • Self-validation tests pass:
    dotnet run --project src/DemaConsulting.ReviewMark --configuration Release --framework net10.0
    --no-build -- --validate
  • Code produces zero warnings

Code Quality

  • Code formatting is correct: dotnet format --verify-no-changes
  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

Please run the following checks before submitting:

  • Spell checker passes: cspell "**/*.{md,cs}"
  • Markdown linter passes: markdownlint "**/*.md"
  • YAML linter passes: yamllint .

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

The regression test Validation_Run_WithResultsFileInNewDirectory_CreatesDirectory uses TestDirectory as the root temp directory and targets a non-existent output/ subdirectory within it, exercising the directory creation path. Cleanup is handled safely by TestDirectory.Dispose(), eliminating the risk of test flakiness from transient file-system locks.

…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>
@Malcolmnixon Malcolmnixon marked this pull request as ready for review April 5, 2026 13:30
Copilot AI review requested due to automatic review settings April 5, 2026 13:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --results before 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.

@Malcolmnixon
Copy link
Copy Markdown
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants