Fix known issues rules: closed bugs with matching affected-versions are known issues (LTS back-port gap)#159
Conversation
…s filtering Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/02d2cba2-d8bb-4eea-a334-e47b5cb254ef Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…all connectors Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/02d2cba2-d8bb-4eea-a334-e47b5cb254ef Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…nts, fix lint issues Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/02d2cba2-d8bb-4eea-a334-e47b5cb254ef Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…are known issues Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/2b3a96fc-c54b-48d2-9d93-ce916ecfb1c9 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes known-issues reporting so that bugs with affected-versions are evaluated against the target build version regardless of open/closed state (covering the LTS back-port gap scenario), with corresponding updates across connectors, tests, and documentation.
Changes:
- Update known-issues collection logic in GitHub, Azure DevOps, and Mock connectors to apply a two-tier rule: version-range match when
affected-versionsexists, otherwise fall back to open/unresolved status. - Add/adjust unit tests to cover affected-versions filtering and the “closed bug with matching affected-versions” LTS scenario for each connector.
- Refresh requirements/design docs and README links to reflect the clarified behavior and point to more specific user-guide pages.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/DemaConsulting.BuildMark/RepoConnectors/GitHub/GitHubRepoConnector.cs |
Removes open-only prefilter and applies affected-versions-first rule when determining known issues. |
src/DemaConsulting.BuildMark/RepoConnectors/AzureDevOps/AzureDevOpsRepoConnector.cs |
Broadens WIQL to include all states and applies affected-versions-first rule with unresolved fallback. |
src/DemaConsulting.BuildMark/RepoConnectors/Mock/MockRepoConnector.cs |
Extends mock dataset and known-issues logic to model affected-versions behavior and closed-bug LTS case. |
test/DemaConsulting.BuildMark.Tests/RepoConnectors/GitHub/GitHubRepoConnectorTests.cs |
Adds coverage for affected-versions filtering and closed bug with matching affected-versions. |
test/DemaConsulting.BuildMark.Tests/RepoConnectors/AzureDevOps/AzureDevOpsRepoConnectorTests.cs |
Adds coverage for affected-versions filtering and resolved bug with matching affected-versions. |
test/DemaConsulting.BuildMark.Tests/RepoConnectors/Mock/MockRepoConnectorTests.cs |
Adds coverage for affected-versions filtering and closed bug with matching affected-versions. |
test/DemaConsulting.BuildMark.Tests/BuildNotes/BuildNotesTests.cs |
Updates expected known-issues output to reflect affected-versions filtering in the mock dataset. |
test/DemaConsulting.BuildMark.Tests/BuildNotes/BuildInformationTests.cs |
Updates known-issues expectations to reflect affected-versions filtering in the mock dataset. |
docs/reqstream/build-mark/build-mark.yaml |
Expands the requirements text to explicitly enumerate the four known-issues rules and LTS motivation. |
docs/reqstream/build-mark/repo-connectors/github/github-repo-connector.yaml |
Documents the updated known-issues rules and adds test references. |
docs/reqstream/build-mark/repo-connectors/azure-devops/azure-devops-repo-connector.yaml |
Documents the updated known-issues rules and adds test references. |
docs/reqstream/build-mark/repo-connectors/mock/mock-repo-connector.yaml |
Documents mock dataset rationale for testing the two-tier known-issues rule and adds test references. |
docs/design/build-mark/repo-connectors/github/github-repo-connector.md |
Updates design narrative to describe affected-versions-first known-issues behavior. |
docs/design/build-mark/repo-connectors/azure-devops/azure-devops-repo-connector.md |
Updates design narrative to describe affected-versions-first known-issues behavior. |
docs/design/build-mark/repo-connectors/mock/mock-repo-connector.md |
Updates design narrative to describe affected-versions-first known-issues behavior in the mock connector. |
README.md |
Updates documentation links to point to more specific user-guide pages (e.g., config, item controls, CLI reference). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
… feedback Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/b1b11b89-5c5e-4b7e-a3ad-6115576bfaf0 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Fixes known-issues classification across GitHub, Azure DevOps, and Mock connectors so that affected-versions takes precedence over item state, enabling “LTS back-port gap” scenarios (closed bugs can still be known issues for older branches if their affected-versions include the target build).
Changes:
- Update known-issues collection logic to: use
AffectedVersions.Contains(targetVersion)when present; otherwise fall back to open/unresolved state. - Ensure GitHub connector actually fetches closed issues (
states: [OPEN, CLOSED]) and Azure DevOps connector no longer pre-filters out resolved items in WIQL. - Add/adjust connector + build-notes tests and update requirements/design docs + README links to reflect the clarified behavior.
Reviewed changes
Copilot reviewed 17 out of 17 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 tests for affected-versions filtering and closed-bug LTS scenario in the mock connector. |
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/GitHub/GitHubRepoConnectorTests.cs | Adds GitHub tests for AV filtering and closed-bug AV inclusion. |
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/AzureDevOps/AzureDevOpsRepoConnectorTests.cs | Adds Azure DevOps tests for AV filtering and resolved-bug AV inclusion. |
| test/DemaConsulting.BuildMark.Tests/BuildNotes/BuildNotesTests.cs | Updates markdown assertions to reflect AV-filtered known issues. |
| test/DemaConsulting.BuildMark.Tests/BuildNotes/BuildInformationTests.cs | Updates expected known-issues IDs/titles after AV filtering changes. |
| src/DemaConsulting.BuildMark/RepoConnectors/Mock/MockRepoConnector.cs | Implements two-tier known-issues logic; adds mock data for AV + closed LTS case. |
| src/DemaConsulting.BuildMark/RepoConnectors/GitHub/GitHubRepoConnector.cs | Removes OPEN-only pre-filter; applies AV-first known-issue rule with state fallback. |
| src/DemaConsulting.BuildMark/RepoConnectors/GitHub/GitHubGraphQLClient.cs | Fetches issues with states: [OPEN, CLOSED] so closed bugs can be evaluated. |
| src/DemaConsulting.BuildMark/RepoConnectors/AzureDevOps/AzureDevOpsRepoConnector.cs | Removes WIQL resolved-state exclusion; applies AV-first known-issue rule with unresolved fallback. |
| README.md | Updates several doc links to more specific user guide pages and adds CLI reference link. |
| docs/reqstream/build-mark/repo-connectors/mock/mock-repo-connector.yaml | Documents mock dataset + tests for LTS closed-bug AV behavior. |
| docs/reqstream/build-mark/repo-connectors/github/github-repo-connector.yaml | Updates requirement text + adds test references for AV/state two-tier logic. |
| docs/reqstream/build-mark/repo-connectors/azure-devops/azure-devops-repo-connector.yaml | Updates requirement text + adds test references for AV/state two-tier logic. |
| docs/reqstream/build-mark/build-mark.yaml | Expands known-issues requirement with explicit rules and LTS justification; links to connector subsystems. |
| docs/design/build-mark/repo-connectors/mock/mock-repo-connector.md | Documents AV-first known-issue rule and state fallback for mock connector. |
| docs/design/build-mark/repo-connectors/github/github-repo-connector.md | Documents closed-issue fetch + AV-first known-issue rule and rationale. |
| docs/design/build-mark/repo-connectors/azure-devops/azure-devops-repo-connector.md | Documents querying all bugs + AV-first known-issue rule and rationale. |
Comments suppressed due to low confidence (1)
src/DemaConsulting.BuildMark/RepoConnectors/AzureDevOps/AzureDevOpsRepoConnector.cs:592
- The WIQL was broadened to query all 'Bug'/'Issue' work items regardless of state. In real Azure DevOps projects this can return a very large ID set, which then triggers
GetWorkItemsAsyncto batch-fetch full details for every item (200 per request), even though most resolved items will be discarded later (no affected-versions + resolved => not a known issue). Consider narrowing server-side to reduce API load, e.g. query unresolved items OR resolved items that declare affected-versions viaCustom.AffectedVersions(and/orSystem.Description CONTAINS 'affected-versions'if you need to support buildmark blocks), or run two targeted WIQL queries and union the results before fetching details.
// Query all bugs and issues — state filtering is applied in code so that resolved
// bugs with a declared affected-versions range are still considered as known issues.
const string wiql = "SELECT [System.Id] FROM workitems " +
"WHERE [System.WorkItemType] IN ('Bug', 'Issue')";
var queryResult = await restClient.QueryWorkItemsAsync(wiql);
if (queryResult.WorkItems.Count == 0)
{
return [];
}
// Fetch full work item details
var workItemIds = queryResult.WorkItems.Select(r => r.Id).ToList();
var workItems = await restClient.GetWorkItemsAsync(workItemIds);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pull Request
Description
The
--include-known-issuesflag had incorrect logic: it pre-filtered bugs to open/unresolved state before checkingaffected-versions, so a closed bug with a matching version range was silently excluded. The correct rules are:affected-versionsaffected-versionsaffected-versionscontains build versionaffected-versionsdoes not contain build versionRules 3 and 4 cover the LTS back-port gap: a bug fixed in v2.0 and closed, but never back-ported to the v1.x branch, must still appear in v1.x release notes when its
affected-versionsrange says so.GitHub connector
Removed the
Where(i => i.State == "OPEN")pre-filter. Rewrote asforeachto keep issue state in scope as a fallback:GetAllIssuesAsyncnow passesstates: [OPEN, CLOSED]in the GraphQL query so that closed issues are actually fetched from GitHub:Azure DevOps connector
Removed
AND [System.State] NOT IN ('Done', 'Closed', 'Resolved')from the WIQL query.IsWorkItemResolvedis now only the no-affected-versionsfallback, not a blanket gate.Mock connector
CollectKnownIssuesAsyncnow iterates all_issueTitleskeys (not just_openIssues);_openIssuesis only consulted whenAffectedVersionsis null. Added issue 7 — a closed bug withAV = [1.0.0,1.0.0]— to model the LTS scenario in tests.Requirements and design documentation
BuildMark-Report-KnownIssues: enumerated all four rules explicitly with the LTS back-port motivationstates: [OPEN, CLOSED]GraphQL filterREADME links
Five README links that all pointed to
introduction.mdupdated to target the specific user guide page for the relevant content (configuration.md,item-controls.md,cli-reference.md).Tests
Three new tests — one per connector — verify the closed-bug LTS back-port scenario:
GitHubRepoConnector_GetBuildInformationAsync_ClosedBugWithMatchingAffectedVersions_IsKnownIssueAzureDevOpsRepoConnector_GetBuildInformationAsync_ClosedBugWithMatchingAffectedVersions_IsKnownIssueMockRepoConnector_GetBuildInformationAsync_ClosedBugWithMatchingAffectedVersions_IsKnownIssueType of Change
Related Issues
Pre-Submission Checklist
Build and Test
dotnet build --configuration Releasedotnet test --configuration Releasedotnet run --project src/DemaConsulting.BuildMark --configuration Release --framework net10.0--no-build -- --validateCode Quality
dotnet format --verify-no-changesQuality Checks
./lint.sh(Unix/macOS) orcmd /c lint.bat/./lint.bat(Windows)Testing
Documentation
Additional Notes
473 tests pass across .NET 8, 9, and 10. CodeQL clean.