Skip to content

Fix rendering of known issues in build output sections#180

Merged
Malcolmnixon merged 6 commits into
mainfrom
copilot/fix-known-issues-misrepresentation
May 10, 2026
Merged

Fix rendering of known issues in build output sections#180
Malcolmnixon merged 6 commits into
mainfrom
copilot/fix-known-issues-misrepresentation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 10, 2026

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 Fixed even when no bugs were resolved in the commit range.

Root cause: All 3 repo connectors (GitHub, AzureDevOps, Mock) concatenated knownIssues into allItems before calling ApplyRules(), making known issues indistinguishable from commit-linked work items during routing.

Fix:

  • Removed .Concat(knownIssues) from the items passed to ApplyRules() in all 3 connectors — known issues now bypass the routing pipeline entirely
  • When --include-known-issues is passed, a dedicated ## Known Issues section is appended after all routed sections, so known issues are never visually confused with items that were actually resolved in the build

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Pre-Submission Checklist

Before submitting this pull request, ensure you have completed the following:

Build and Test

  • Code builds successfully and all tests pass: pwsh ./build.ps1
  • Code produces zero warnings

Code Quality

  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

Please run the following checks before submitting:

  • All linters pass: pwsh ./lint.ps1

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated docs/ documentation (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

Changes include:

  • 3 connector fixes (GitHub, AzureDevOps, Mock): removed known issues from ApplyRules() input so they are excluded from the routing pipeline entirely
  • BuildInformation.cs: AppendKnownIssuesSection() is now called after all routed sections when --include-known-issues is active, rendering known issues in a clearly separate ## Known Issues section
  • 5 new tests: 4 in BuildInformationTests.cs covering routed + known-issues combinations; 1 in MockRepoConnectorTests.cs verifying no known issue ID leaks into routed sections
  • Docs: new BuildMark-BuildInformation-RoutedSections requirement, updated design doc, refreshed verification scenarios

All 545 tests pass.

@Malcolmnixon
Copy link
Copy Markdown
Member

@copilot The implementation agent froze for 30 minutes without doing anything. Please try implementing this fix again.

Copilot AI and others added 5 commits May 10, 2026 03:08
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 stopped work on behalf of Malcolmnixon due to an error May 10, 2026 03:56
@Malcolmnixon
Copy link
Copy Markdown
Member

@copilot Please continue

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 10, 2026

@copilot Please continue

The fix was already completed in the previous session (commits 22b6ab470ae2d7). All 545 tests pass and the build is clean.

Summary of what was implemented:

  • Known issues are now excluded from the ApplyRules() routing pipeline in all 3 connectors (GitHub, AzureDevOps, Mock)
  • When --include-known-issues is passed, known issues appear in a dedicated ## Known Issues section after all routed sections — never mixed into sections like ## Bugs Fixed
  • 5 new tests added; requirements, design, and verification docs updated

Copilot AI changed the title [WIP] Fix rendering of known issues in build output sections Fix rendering of known issues in build output sections May 10, 2026
@Malcolmnixon Malcolmnixon marked this pull request as ready for review May 10, 2026 05:44
Copilot AI review requested due to automatic review settings May 10, 2026 05:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 knownIssues from the item set passed into ApplyRules() across GitHub, Azure DevOps, and Mock connectors.
  • Updates BuildInformation.ToMarkdown() so the ## Known Issues section (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.

@Malcolmnixon Malcolmnixon merged commit e89c33d into main May 10, 2026
34 of 35 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/fix-known-issues-misrepresentation branch May 10, 2026 12:43
@Malcolmnixon Malcolmnixon added the bug Something isn't working label May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Known issues rendered into fix sections, misrepresenting build output

3 participants