Decouple Copilot PR-review orchestrator from BCQuality's domain taxonomy#8825
Draft
JesperSchulz wants to merge 1 commit into
Draft
Decouple Copilot PR-review orchestrator from BCQuality's domain taxonomy#8825JesperSchulz wants to merge 1 commit into
JesperSchulz wants to merge 1 commit into
Conversation
Prefer the human-readable 'domain' label emitted by BCQuality on each finding, keeping the static \ only as a legacy fallback for older pins. Slug-encode agent_domain dedup metadata so multi-word labels round-trip correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The Copilot PR-review orchestrator (
tools/Code Review/scripts/Invoke-CopilotPRReview.ps1) currently maps each finding'sfrom-sub-skillid to a display label via a static$DomainMap. That map has to be edited every time BCQuality adds a new domain, which couples this repo to BCQuality's internal taxonomy.BCQuality is being updated (separate, companion PR) to emit a human-readable
domainlabel on every finding. This change makes the orchestrator prefer that emitted label and keep$DomainMaponly as a legacy fallback.Changes
Resolve-FindingDomainnow reads an explicitdomain(orDomain) property off each finding and renders it verbatim when present. Only when it's absent does it fall back to the static$DomainMapkeyed onfrom-sub-skill, and finally toOther.$DomainMapis re-documented as a legacy fallback that no longer needs an entry per new domain.ConvertTo-DomainSlughelper and routed theagent_domainmetadata + heading-pattern matching through it. The heading patterns now accept multi-word domain labels, and both the emitted metadata and the parsed comparison are slug-encoded, so multi-word labels (e.g. "Breaking Changes") round-trip correctly through the cross-iteration dedup logic instead of being truncated/mismatched.tools/Code Review/README.md"Domain labels" section updated to describe the emitted-label behavior with the legacy-map fallback.Backward compatibility
Fully backward-compatible. Findings that do not carry a
domainfield still resolve exactly as before via the legacy$DomainMap→Other. The new behavior only activates once findings start arriving with adomainlabel.The BCQuality pin (
tools/BCQuality/bcquality.config.yaml) is intentionally not changed here. Until the pin is later bumped to a BCQuality commit that emitsdomain, the legacy fallback preserves current behavior exactly.Recommended rollout order
domain).domainlabel on every finding.Validation
Invoke-CopilotPRReview.ps1parses cleanly ([System.Management.Automation.Language.Parser]::ParseFile→parse OK).Fixes AB#640493