Repository cleanups: PdfParsing requirement, doc updates, test assert comments, README improvements, expanded user guide, required PDF metadata fields#13
Conversation
… test assert comments Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot I'm not sure why the THEORY-OF-OPERATIONS.md references a 'requirements.md' as the target of the ReqStream link - there is no file - it probably wants to link to the git-repository instead. Also I think the README.md wants to explain what role ReviewMark fills in Continuous Compliance. I do like the iconic format of the Features table show in https://github.com/demaconsulting/BuildMark as almost a sales-pitch, but that may take shortening the descriptions to fit each bullet on its own line |
…ontinuous Compliance section Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Fixed in commit
|
|
@copilot Is the list of self-validation tests in README.md up to date. In fact it may be better to run the technical-writer agent and have it go through ALL documentation for accuracy. |
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
The list was indeed out of date — only 2 tests were listed but there are actually 7. Fixed in commit |
|
@copilot The user guide seems to be fairly sparse - the examples don't even demonstrate how to use the tool for its intended use. It doesn't have any description of the .reviewmark.yaml format. It doesn't have any recommendations on how to create review-sets (grouping related code, tests, and any related markdown files) with examples. |
…dance, and complete examples Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Expanded the user guide in commit
|
There was a problem hiding this comment.
Pull request overview
This PR performs a set of repository cleanups focused on tightening requirements traceability for PDF metadata parsing, improving CLI/user documentation (including expanded user guide content), and polishing test readability (AAA assert comments) plus one missing positive assertion.
Changes:
- Add a new requirement entry for PDF Keywords-field parsing during evidence indexing and link it to existing scan tests.
- Update documentation (README + Theory of Operations + expanded user guide) to clarify
--dir/ repeated--indexusage and self-validation outputs. - Improve tests by expanding Assert comments for clarity and adding a positive version-output assertion.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/DemaConsulting.ReviewMark.Tests/ReviewMarkConfigurationTests.cs | Updates Assert comments for clearer AAA intent. |
| test/DemaConsulting.ReviewMark.Tests/ProgramTests.cs | Adds a positive assertion for --version output; improves Assert comments. |
| test/DemaConsulting.ReviewMark.Tests/PathHelpersTests.cs | Updates Assert comments for clearer AAA intent. |
| test/DemaConsulting.ReviewMark.Tests/IntegrationTests.cs | Updates Assert comments for clearer AAA intent. |
| test/DemaConsulting.ReviewMark.Tests/ContextTests.cs | Updates Assert comments for clearer AAA intent. |
| requirements.yaml | Adds a new requirement covering PDF Keywords parsing during indexing. |
| docs/guide/guide.md | Expands the user guide substantially; updates self-validation test list/output. |
| THEORY-OF-OPERATIONS.md | Clarifies --dir semantics, repeated --index, and self-validation formats; fixes reqstream link. |
| README.md | Refreshes features/self-validation sections and adds Continuous Compliance positioning content. |
💡 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot Please modify the tool to refuse parsing PDFs (and report warnings) if the date or result are missing. A review that refuses to state its date or whether it passed or failed isn't really a review. |
…esult Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Done in commit |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
💡 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.
| if (!pairs.TryGetValue("date", out var date) || string.IsNullOrWhiteSpace(date)) | ||
| { | ||
| onWarning?.Invoke($"Skipping '{relativePath}': PDF Keywords missing required 'date' field."); | ||
| return; | ||
| } | ||
|
|
||
| if (!pairs.TryGetValue("result", out var result) || string.IsNullOrWhiteSpace(result)) | ||
| { | ||
| onWarning?.Invoke($"Skipping '{relativePath}': PDF Keywords missing required 'result' field."); | ||
| return; |
There was a problem hiding this comment.
The warning text says the PDF Keywords are "missing" the required field, but the condition also triggers when the key is present but the value is empty/whitespace (e.g. date=). Consider updating the warning message to reflect "missing or empty" so it matches the actual skip condition and the XML doc comment.
| - 📂 **Evidence Querying** - Queries URL or file-share evidence stores via an `index.json` catalogue | ||
| - 📋 **Coverage Reporting** - Review plan shows which files are covered and flags uncovered files | ||
| - 📊 **Status Reporting** - Review report shows whether each review-set is Current, Stale, Missing, or Failed | ||
| - 🚦 **Enforcement** - `--enforce` exits non-zero if any review-set is stale or missing, or any file is uncovered |
There was a problem hiding this comment.
This feature bullet says --enforce exits non-zero only for stale/missing review-sets, but the implementation also treats "Failed" review-sets (evidence present for current fingerprint but non-पass result) as issues that trigger non-zero exit when --enforce is set. The README should include "failed" here to match actual behavior.
| - 🚦 **Enforcement** - `--enforce` exits non-zero if any review-set is stale or missing, or any file is uncovered | |
| - 🚦 **Enforcement** - `--enforce` exits non-zero if any review-set is failed, stale, or missing, or any file is uncovered |
Eight targeted cleanups: new requirement for PDF metadata parsing, documentation improvements for
--dir/--index/self-validation, descriptive assert comments across all test files, a fixed broken link, improved README, a full documentation accuracy review, a significantly expanded user guide, and enforced requireddate/resultfields during PDF evidence parsing.Description
requirements.yaml— New and updated requirementAdded
ReviewMark-Index-PdfParsingrequirement covering the Keywords-field parsing behavior during indexing. Updated justification to reflect that all four fields (id,fingerprint,date,result) are required. Linked to six scan tests:ReviewIndex_Scan_PdfWithValidMetadata_PopulatesIndexReviewIndex_Scan_PdfWithMissingId_SkipsWithWarningReviewIndex_Scan_PdfWithMissingFingerprint_SkipsWithWarningReviewIndex_Scan_PdfWithMissingDate_SkipsWithWarningReviewIndex_Scan_PdfWithMissingResult_SkipsWithWarningReviewIndex_Scan_PdfWithNoKeywords_SkipsWithWarningIndex.cs— Enforce all four required PDF metadata fieldsProcessPdfnow validates all four Keywords fields —id,fingerprint,date, andresult. PDFs missingdateorresultare skipped with a warning, matching the existing behavior for missingidorfingerprint. The optional fallback to empty strings fordate/resultis removed.IndexTests.cs— New tests for missing date and resultAdded two new tests to cover the new validation behavior:
ReviewIndex_Scan_PdfWithMissingDate_SkipsWithWarningReviewIndex_Scan_PdfWithMissingResult_SkipsWithWarningTHEORY-OF-OPERATIONS.md--dirsemantics: Clarified that--diris the root for both glob-pattern resolution andindex.jsonoutput; without it, the current working directory is used.--indexpatterns: Added paragraph + example showing--indexcan be repeated..xml) are now documented with separate examples.[reqstream]reference corrected from the non-existentrequirements.mdtohttps://github.com/demaconsulting/ReqStream.README.mdFailedstatus.Total Tests: 7.docs/guide/guide.md— Significantly expanded.reviewmark.yamlformat reference covering all three top-level keys with a full working example.fileshareandurlsource types with credential configuration.Test assert comments
Expanded bare
// Assertcomments to// Assert — <description>across all test files. Normalized// Assert -(hyphen) →// Assert —(em dash) for consistency.Program_Run_WithVersionFlag_DisplaysVersionOnlyAdded missing positive assertion proving the version string is actually emitted.
Type 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.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
All 125 tests pass across .NET 8/9/10.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.