Fix all formal review-set findings: REQTEST traceability, colour safety, doc accuracy, PathHelpers test, review-set consolidation#72
Conversation
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…equired (REQDOC-01) Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot Could you investigate merging the SarifMark-Integration-Review files into the SarifMark-CLI-Review. Integration testing really tests the command-line; but more than that there are no source files in the SarifMark-Integration-Review set, so the review is a little sparse. If it's a good idea then please merge and then use the code-review agent to execute the updated SarifMark-CLI-Review |
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Done in commit 145082a. The Ran the formal code-review-agent on the merged set — all 22 applicable checks (REQ, DOC, CODE, TEST, REQDOC, REQIMP, REQTEST, CODEDOC) pass. |
There was a problem hiding this comment.
Pull request overview
This PR addresses findings from formal reviewmark review-sets by fixing REQTEST traceability (pointing requirements at the correct unit tests), adding colour safety to WriteError, improving documentation accuracy, adding an explicit design-intent test for PathHelpers, and consolidating review-set configuration.
Changes:
- Replaced incorrect test citations in
validation.yaml, addedtry/finallyfor console colour restoration inContext.WriteError, and updatedcommand-line.mdto reflect silent-mode behaviour. - Changed
Program.Mainfromprivatetointernalto allow direct invocation from tests (removing reflection-basedInvokeMainhelper), and added tests for unsupported results file extensions and embedded-dot filenames. - Merged
SarifMark-Integration-ReviewintoSarifMark-CLI-Reviewin.reviewmark.yamland added aSarifMark-Sarif-Processingcitation insarif.md.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/DemaConsulting.SarifMark/Context.cs |
Wrapped console colour change in try/finally for safety |
src/DemaConsulting.SarifMark/Program.cs |
Changed Main from private to internal for testability |
test/.../ProgramTests.cs |
Replaced reflection-based InvokeMain with direct Program.Main calls |
test/.../ValidationTests.cs |
Added test for unsupported results file extension |
test/.../PathHelpersTests.cs |
Added design-intent test for embedded-dots rejection |
docs/design/command-line.md |
Corrected WriteError description to note silent-mode suppression |
docs/design/sarif.md |
Added SarifMark-Sarif-Processing citation and CLI integration section |
docs/reqstream/validation.yaml |
Fixed REQTEST traceability to reference correct unit tests |
.reviewmark.yaml |
Consolidated integration review-set into CLI review-set |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
@copilot Please run the code-review agent to review all code-review sets one after the other and show the results. The revies to run are [SarifMark-CLI-Review, SarifMark-SARIF-Review, SarifMark-Validation-Review, SarifMark-Utilities-Review] |
All four review sets have been executed. Results summary: SarifMark-CLI-Review — ✅ Pass (28 checks)All REQ, DOC, CODE, TEST, REQDOC, REQIMP, REQTEST, CODEDOC checks pass across 11 files (source, docs, unit tests, integration tests, platform/OTS requirements). Three non-blocking observations:
SarifMark-SARIF-Review — ✅ Pass (22 checks)All checks pass across
SarifMark-Validation-Review — ✅ Pass (26 checks)All checks pass. Three non-blocking observations:
SarifMark-Utilities-Review — ✅ Pass (8 applicable checks, 12 N/A — no requirements files in set)All DOC, CODE, TEST, and CODEDOC checks pass. One non-blocking observation:
Overall: all four review sets pass with zero failures. The OBS items are documented in the individual report files ( |
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/b31bff0b-a781-47c9-b634-2dd5bdf3acd8
* Initial plan * Apply TemplateDotNetTool PRs #65-#72 to SarifMark Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/b31bff0b-a781-47c9-b634-2dd5bdf3acd8 * Apply TemplateDotNetTool PR #73: correct agent tools frontmatter; fix build_notes.html filename Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/41247d22-7fe7-408c-a93e-676b4104124a * Apply TemplateDotNetTool PR #74: fix repo-consistency agent to fetch most recently merged PRs Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/8650a2a8-adf1-4738-a4e0-34b540e46d6d --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/8d9bc3e5-e4ae-45e3-b4f6-8f1e5919cf0b Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…#83) * Initial plan * chore: align with TemplateDotNetTool template (PRs #66, #72-#76, #80) Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/8d9bc3e5-e4ae-45e3-b4f6-8f1e5919cf0b Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * Update .github/workflows/build.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/agents/code-review.agent.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * docs: rename docs/guide to docs/user_guide and guide.md to introduction.md Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/2fcc24c8-25e2-4d47-91b3-318e14ffb6d1 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * chore: remove legacy agents removed from TemplateDotNetTool template Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/0162c9bb-1dbc-457e-b5ce-b1b2600688e3 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * chore: align AGENTS.md structure with TemplateDotNetTool template Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/510afeec-654d-468a-9da0-532e2bdfbb21 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * chore: revert code-review.agent.md step 4 to exact template wording Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/3f6495f1-09cd-4ab3-9809-0fba0a28ef78 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> Co-authored-by: Malcolm Nixon <Malcolm.nixon@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Addresses all findings from the formal
reviewmarkreview-sets (CLI, SARIF, Validation, Utilities, Integration). The SARIF REQDOC-01 gap and the unsupported-extension test were fixed in earlier commits; this PR completes the remaining issues and consolidates the review-set configuration.Description
docs/reqstream/validation.yaml— REQTEST failures (Validation-Review)SarifMark-Val-ResultFiles,SarifMark-Val-TrxFormat, andSarifMark-Val-JUnitFormatall citedIntegrationTest_ValidateFlag_RunsSelfValidation, which never passes--resultsand therefore never exercisesWriteResultsFile. Replaced with the unit tests that actually prove each format:SarifMark-Val-ResultFiles→Validation_Run_WithTrxResultsFile_WritesResultsFile+Validation_Run_WithXmlResultsFile_WritesResultsFileSarifMark-Val-TrxFormat→Validation_Run_WithTrxResultsFile_WritesResultsFileSarifMark-Val-JUnitFormat→Validation_Run_WithXmlResultsFile_WritesResultsFilesrc/DemaConsulting.SarifMark/Context.cs— colour safety (CLI O-3)WriteErrorchanged the console foreground colour without atry/finally, leaving the terminal red ifConsole.Error.WriteLinethrew. Wrapped intry/finallyto guarantee restoration.docs/design/command-line.md— doc accuracy (CLI O-1)WriteError description said it unconditionally "writes to
Console.Errorin red"; silent mode suppresses this. Updated to reflect actual behaviour.test/.../PathHelpersTests.cs— explicit design-intent test (Utilities OBS-01)Added
PathHelpers_SafePathCombine_FilenameWithEmbeddedDots_ThrowsArgumentExceptionto document that the strictContains("..")check intentionally rejects names like"v1..0.sarif"— making the over-rejection trade-off visible and tested.docs/design/sarif.md— traceability gap (SARIF OBS-1)Added explicit
SarifMark-Sarif-Processingcitation after the Read Method step list to close the implicit-only coverage noted in the review..reviewmark.yaml— review-set consolidationMerged
SarifMark-Integration-ReviewintoSarifMark-CLI-Review(renamed to "Review of SarifMark Command Line and Integration Tests"). The integration tests directly test the command-line layer, and the former integration set contained no source files, making it sparse. The merged set now covers 11 files: source (Program.cs,Context.cs), documentation, CLI/platform/OTS requirements, unit tests, integration tests, runner helper, and assembly info.Formal review results (all four review sets)
All four
reviewmarkreview sets were executed and pass with zero failures:Type of Change
Pre-Submission Checklist
Build and Test
dotnet build --configuration Releasedotnet test --configuration Releasedotnet run --project src/DemaConsulting.SarifMark --configuration Release --framework net10.0--no-build -- --validateCode Quality
dotnet format --verify-no-changesQuality Checks
cspell "**/*.{md,cs}"markdownlint "**/*.md"yamllint .dotnet run --project src/DemaConsulting.SarifMark --configuration Release --framework net10.0 --no-build -- --validateTesting
Documentation
Additional Notes
95/95 tests pass across net8.0 / net9.0 / net10.0. CodeQL: 0 alerts. All four formal
reviewmarkreview sets pass with zero failures (CLI: 28 checks, SARIF: 22 checks, Validation: 26 checks, Utilities: 8 applicable checks).💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.