Sync AGENTS.md, agent/standard files from template, then reorganize docs to new standards#88
Conversation
Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/5488f634-f003-43b5-a23d-7acba23c2da7 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…rchy per updated standards Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/7abdccda-42c3-476a-b0e0-6f4c1e65f21d Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot Please synchronize the SafePathCombine implementation to match the approach in: |
…pproach Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/6b35557a-370b-4311-b155-4b4764f6b525 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Done in 8385d66. Changes made:
|
There was a problem hiding this comment.
Pull request overview
Synchronizes repository agent/standard files with TemplateDotNetTool and reorganizes SarifMark design/requirements documentation to the updated {system-name}/ hierarchy, while aligning PathHelpers.SafePathCombine behavior and tests with the template’s post-combine containment check approach.
Changes:
- Reorganized
docs/reqstream/anddocs/design/intosarifmark/system-name folders and updatedrequirements.yaml+.reviewmark.yamlpaths accordingly. - Updated
PathHelpers.SafePathCombineto use an absolute-path containment check (viaPath.GetRelativePath) and adjusted unit tests + requirements/design docs to match. - Refactored
lint.sh/lint.batinto explicit Python/NPM/.NET sections with per-section fault isolation.
Reviewed changes
Copilot reviewed 19 out of 40 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/DemaConsulting.SarifMark.Tests/Utilities/PathHelpersTests.cs | Updates unit test to assert embedded .. filename is accepted. |
| src/DemaConsulting.SarifMark/Utilities/PathHelpers.cs | Replaces pre-combine string checks with post-combine containment validation. |
| requirements.yaml | Updates requirement includes to new docs/reqstream/sarifmark/** layout. |
| lint.sh | Splits lint into Python/NPM/.NET sections and isolates failures per section. |
| lint.bat | Windows equivalent of lint sectioning and fault isolation. |
| docs/reqstream/sarifmark/utilities/utilities.yaml | Adds Utilities subsystem requirements under new hierarchy. |
| docs/reqstream/sarifmark/utilities/path-helpers.yaml | Consolidates PathHelpers requirements around post-combine containment check. |
| docs/reqstream/sarifmark/self-test/validation.yaml | Adds Validation unit requirements in new hierarchy. |
| docs/reqstream/sarifmark/self-test/self-test.yaml | Adds SelfTest subsystem requirements in new hierarchy. |
| docs/reqstream/sarifmark/sarifmark.yaml | Adds system-level requirements under new hierarchy. |
| docs/reqstream/sarifmark/sarif/sarif.yaml | Adds SARIF subsystem requirements under new hierarchy. |
| docs/reqstream/sarifmark/sarif/sarif-results.yaml | Adds SarifResults unit requirements under new hierarchy. |
| docs/reqstream/sarifmark/sarif/sarif-result.yaml | Adds SarifResult unit requirements under new hierarchy. |
| docs/reqstream/sarifmark/sarif/report.yaml | Adds report-generation requirements under new hierarchy. |
| docs/reqstream/sarifmark/program.yaml | Adds Program unit requirements under new hierarchy. |
| docs/reqstream/sarifmark/platform-requirements.yaml | Adds platform/runtime requirements with evidence source filters. |
| docs/reqstream/sarifmark/cli/context.yaml | Adds Context unit requirements under new hierarchy. |
| docs/reqstream/sarifmark/cli/cli.yaml | Adds CLI subsystem requirements under new hierarchy. |
| docs/design/utilities/path-helpers.md | Removes old (pre-reorg) PathHelpers design doc location. |
| docs/design/sarifmark/utilities/utilities.md | Adds Utilities subsystem design doc under new hierarchy. |
| docs/design/sarifmark/utilities/path-helpers.md | Adds updated PathHelpers design doc matching new containment approach. |
| docs/design/sarifmark/self-test/validation.md | Adds Validation design doc under new hierarchy. |
| docs/design/sarifmark/self-test/self-test.md | Adds SelfTest subsystem design doc under new hierarchy. |
| docs/design/sarifmark/sarifmark.md | Updates system design doc references to new reqstream paths. |
| docs/design/sarifmark/sarif/sarif.md | Adds SARIF/reporting design overview under new hierarchy. |
| docs/design/sarifmark/sarif/sarif-results.md | Adds SarifResults design doc under new hierarchy. |
| docs/design/sarifmark/sarif/sarif-result.md | Adds SarifResult design doc under new hierarchy. |
| docs/design/sarifmark/program.md | Adds Program design doc under new hierarchy. |
| docs/design/sarifmark/cli/context.md | Adds Context design doc under new hierarchy. |
| docs/design/sarifmark/cli/cli.md | Adds CLI subsystem design doc under new hierarchy. |
| docs/design/definition.yaml | Updates Pandoc inputs/resource paths to new docs/design/sarifmark/** layout. |
| AGENTS.md | Syncs agent guidance structure and linting workflow instructions from template. |
| .reviewmark.yaml | Updates review-set IDs and paths to match new folder hierarchy; expands needs-review patterns. |
| .github/standards/technical-documentation.md | Updates documented folder hierarchy to {system-name}/ structure. |
| .github/standards/reviewmark-usage.md | Syncs ReviewMark usage guidance and new review-set patterns. |
| .github/standards/reqstream-usage.md | Syncs ReqStream usage guidance and new {system-name}/ hierarchy. |
| .github/standards/design-documentation.md | Syncs design documentation folder structure guidance to {system-name}/ hierarchy. |
| .github/agents/quality.agent.md | Updates quality agent reporting requirements (Result field semantics + completeness checks). |
| .github/agents/implementation.agent.md | Updates orchestrator agent instructions/context propagation wording. |
| .github/agents/developer.agent.md | Adds explicit lint-fix sequencing requirement before quality gates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Malcolmnixon
left a comment
There was a problem hiding this comment.
Subsystem reviews should consist of the subsystem requirements, subsystem design, and subsystem test suite.
Unit reviews should consist of the units requirements, design, code, and tests.
… + test suite; add dedicated subsystem test files Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/adabd0a0-1468-4f34-bc0c-a61a22cf0355 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Done in 8a2e055. Subsystem reviews now contain only the subsystem requirements, subsystem design, and the dedicated subsystem test suite. Unit reviews retain requirements, design, code, and tests. The |
|
@copilot What... you removed IntegrationTests.cs - NO - that's the SYSTEM test suite - that actually proves that really running the tool actually does what it's supposed to - all System level requirements are supposed to link to the IntegrationTests suite. |
…em tests to Cli_*/Sarif_*/SelfTest_* prefixes Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/7686a09e-d86e-4ed9-91a8-6d1370b13c33 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Restored in 9c3f36b. |
|
@copilot Remember to examine the review-sets:
Remember to examine the test linkages:
|
…esign+tests; fix program.yaml unit test linkages Agent-Logs-Url: https://github.com/demaconsulting/SarifMark/sessions/373c959c-cbf5-42b3-ba1e-d14830981a4f Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Fixed in 630ce22. Here's what changed: Review-sets (
Test linkages (
All 117 tests pass; |
Two related changes: binary-copy updated files from TemplateDotNetTool, then apply the structural requirements those updated standards introduce.
Description
Template file sync (binary copies)
AGENTS.md— restructured with Project Structure tree, Key Configuration Files, Linting workflow section; removed legacy CI/CD pipeline narrative.github/agents/*.md— updateddeveloper,implementation,qualityagent reporting templates and workflows.github/standards/*.md— updateddesign-documentation,reqstream-usage,reviewmark-usage,technical-documentationwith revised folder hierarchy guidancelint.sh/lint.bat— refactored into explicitPYTHON / NPM / DOTNETsections with per-section fault isolationStructural reorganization to match updated standards
ReqStream (
docs/reqstream/) — all files moved under newsarifmark/system-name folder per{system-name}/hierarchy; files renamed to dropsubsystem-/unit-prefixes:system.yaml→sarifmark/sarifmark.yamlcli/subsystem-cli.yaml→sarifmark/cli/cli.yaml,cli/unit-context.yaml→sarifmark/cli/context.yamlsarif/,self-test/,utilities/subfoldersots/ots-software.yamlremains at root (correct per standard)Design (
docs/design/) — all files moved under newsarifmark/system-name folder;system.mdrenamed tosarifmark.md;introduction.mdstays at root.requirements.yaml— includes updated to new paths.docs/design/definition.yaml—resource-pathandinput-filesupdated to new paths..reviewmark.yaml:SarifMark-System→SarifMark-Architecture(new Architecture review pattern){System}-{Subsystem}-{Unit}: e.g.SarifMark-Context→SarifMark-Cli-Context,SarifMark-SarifResult→SarifMark-Sarif-SarifResultIntegrationTests.cs,Runner.cs,AssemblyInfo.cs)needs-reviewupdated to excludesrc/**/*.csREADME.mdadded toSarifMark-DesignreviewPathHelpers synchronization to TemplateDotNetTool
src/.../Utilities/PathHelpers.cs— replaced the pre-combine string check (relativePath.Contains("..")/Path.IsPathRooted) with a single precise post-combine containment check usingPath.GetRelativePath, matching the template approach.".."is now treated as an escape only when it equals".."exactly or is followed by a directory separator, avoiding false positives for valid filenames likev1..0.sarif. XML doc updated to enumerate all thrown exception types.docs/design/sarifmark/utilities/path-helpers.md— updated to reflect the single-step post-combine approach and added design decision notes from the template.docs/reqstream/sarifmark/utilities/path-helpers.yaml— removedPreCombineCheckandRootedCheckrequirements; consolidated into an updatedPostCombineCheckrequirement with combined justification.test/.../Utilities/PathHelpersTests.cs—FilenameWithEmbeddedDotstest renamed and updated to verify that names likev1..0.sarifare now correctly accepted as valid in-base filenames.Dedicated subsystem test suites with strict test linkage hierarchy
Added four dedicated subsystem test files alongside the retained
IntegrationTests.cssystem test suite, with strict three-level test linkage:test/.../IntegrationTests.cs— system test suite proving end-to-end tool behavior; allSarifMark-System-*requirements insarifmark.yamllink exclusively toIntegrationTest_*tests heretest/.../Cli/CliTests.cs— CLI subsystem tests (Cli_*prefix: version, help, silent, log, enforce, invalid args); linked fromcli.yamlsubsystem requirementstest/.../Sarif/SarifTests.cs— SARIF subsystem tests (Sarif_*prefix: missing param, valid file, non-existent file, report generation, report depth); linked fromsarif.yaml/report.yamlsubsystem requirementstest/.../SelfTest/SelfTestTests.cs— Self-validation subsystem tests (SelfTest_*prefix: validate flag); linked fromself-test.yamlsubsystem requirementstest/.../Utilities/UtilitiesTests.cs— Utilities subsystem tests (Utilities_*prefix: safe path handling); linked fromutilities.yamlsubsystem requirementsProgramTests.cs,ContextTests.cs,SarifResultsTests.cs,ValidationTests.cs,PathHelpersTests.cs) linked exclusively from unit requirements — no cross-level referencesdocs/reqstream/sarifmark/program.yaml—SarifMark-Program-SarifAnalysisupdated to reference onlyProgram_Main_*unit tests; three new unit tests added toProgramTests.cs(Program_Main_ValidSarifFile_ProcessesSuccessfully,Program_Main_EnforceFlagWithIssues_ReturnsError,Program_Main_ReportFile_CreatesReport).docs/reqstream/sarifmark/utilities/utilities.yaml— updatedSarifMark-Utilities-SafePathHandlingchildren to reference all three unit requirements (SafeCombine,NullCheck,PostCombineCheck) and tests updated to point to the newUtilitiesTests.cstest method.Type 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.SarifMark --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
dotnet reqstream --lintanddotnet reviewmark --lintboth pass after the reorganization. All 117 tests pass across net8.0, net9.0, and net10.0 target frameworks.