Fix rendering of known issues in build output sections#180
Conversation
|
@copilot The implementation agent froze for 30 minutes without doing anything. Please try implementing this fix again. |
Known issues (work items not linked to any commit in the build range) were incorrectly included in the allItems sequence passed to ApplyRules, causing them to appear inside sections like 'Bugs Fixed' when routing rules are configured. Changes: - GitHubRepoConnector: remove .Concat(knownIssues) from allItems - AzureDevOpsRepoConnector: same fix - MockRepoConnector: same fix - BuildInformation.ToMarkdown: when RoutedSections is non-null, also call AppendKnownIssuesSection after AppendRoutedSections when the includeKnownIssues flag is true, so known issues always appear in their own dedicated section regardless of rendering mode - Add two BuildInformationTests covering the routed + known-issues path (flag true → section present; flag false → section absent) - Add MockRepoConnectorTests verifying no known issue ID leaks into any routed section - Update build-notes/build-information.md design doc to reflect the corrected rendering contract Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…ation Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
@copilot Please continue |
The fix was already completed in the previous session (commits Summary of what was implemented:
|
There was a problem hiding this comment.
Pull request overview
Fixes misrouting of “known issues” into commit-linked routed sections (e.g., showing open bugs under “Bugs Fixed”) by ensuring known issues bypass the routing pipeline and are rendered in a dedicated section when requested.
Changes:
- Excludes
knownIssuesfrom the item set passed intoApplyRules()across GitHub, Azure DevOps, and Mock connectors. - Updates
BuildInformation.ToMarkdown()so the## Known Issuessection (when enabled) is appended after routed sections. - Adds/updates unit tests and requirement/verification docs to cover routed-sections + known-issues combinations.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/Mock/MockRepoConnectorTests.cs | Adds a regression test ensuring known issues do not appear in any routed section output. |
| test/DemaConsulting.BuildMark.Tests/BuildNotes/BuildInformationTests.cs | Adds tests verifying Known Issues rendering behavior in routed mode (flag on/off, ordering). |
| src/DemaConsulting.BuildMark/RepoConnectors/Mock/MockRepoConnector.cs | Stops including known issues in routing input; documents the separation. |
| src/DemaConsulting.BuildMark/RepoConnectors/GitHub/GitHubRepoConnector.cs | Stops including known issues in routing input; documents the separation. |
| src/DemaConsulting.BuildMark/RepoConnectors/AzureDevOps/AzureDevOpsRepoConnector.cs | Stops including known issues in routing input; documents the separation. |
| src/DemaConsulting.BuildMark/BuildNotes/BuildInformation.cs | Appends Known Issues after routed sections when includeKnownIssues is enabled. |
| docs/verification/build-mark/repo-connectors/mock/mock-repo-connector.md | Updates verification scenarios/count to include the new routing/known-issues test. |
| docs/verification/build-mark/build-notes/build-information.md | Adds verification scenarios for Known Issues rendering in routed mode. |
| docs/reqstream/build-mark/repo-connectors/mock/mock-repo-connector.yaml | Adds the new Mock connector test to requirement traceability. |
| docs/reqstream/build-mark/build-notes/build-information.yaml | Adds the new BuildInformation tests to requirement traceability. |
| docs/design/build-mark/build-notes/build-information.md | Updates design documentation to reflect that known issues are excluded from routing and appended after routed sections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pull Request
Description
Known issues were being routed through the same section rules as commit-linked items, causing open bugs to appear under sections like
## Bugs Fixedeven when no bugs were resolved in the commit range.Root cause: All 3 repo connectors (GitHub, AzureDevOps, Mock) concatenated
knownIssuesintoallItemsbefore callingApplyRules(), making known issues indistinguishable from commit-linked work items during routing.Fix:
.Concat(knownIssues)from the items passed toApplyRules()in all 3 connectors — known issues now bypass the routing pipeline entirely--include-known-issuesis passed, a dedicated## Known Issuessection is appended after all routed sections, so known issues are never visually confused with items that were actually resolved in the buildType of Change
Related Issues
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
pwsh ./build.ps1Code Quality
Quality Checks
Please run the following checks before submitting:
pwsh ./lint.ps1Testing
Documentation
Additional Notes
Changes include:
ApplyRules()input so they are excluded from the routing pipeline entirelyBuildInformation.cs:AppendKnownIssuesSection()is now called after all routed sections when--include-known-issuesis active, rendering known issues in a clearly separate## Known IssuessectionBuildInformationTests.cscovering routed + known-issues combinations; 1 inMockRepoConnectorTests.csverifying no known issue ID leaks into routed sectionsBuildMark-BuildInformation-RoutedSectionsrequirement, updated design doc, refreshed verification scenariosAll 545 tests pass.