You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generated Per Tenant Extension and AppSource App repositories receive the same two-workflow integration.
Architecture
SetupBCQuality
Actions/SetupBCQuality is the sole BCQuality installation boundary. It:
installs the configured BCQuality release and plugin from the marketplace repository
validates and applies enabled layers, disabled skills, knowledge allow/deny rules, and task context
filters the installed plugin deterministically
produces the prepared pluginRoot and filter report consumed by the reviewer
ReviewAgent does not clone, install, or filter BCQuality.
ReviewAgent
Actions/ReviewAgent consumes an already prepared BCQuality plugin and exposes four phases:
context validates trusted settings and pull-request metadata.
prepare installs and verifies the exact Copilot CLI version.
generate runs the read-only AL review against the validated PR head.
post publishes previously generated artifacts using the separate write-capable job.
The review engine is split into focused helper scripts for Git operations, execution, schema/report validation, telemetry, artifact handling, finding placement, deduplication, and publication.
Version selection follows the AL-Go action contract:
Copilot CLI uses the exact version from the action's pinned @github/copilot dependency by default.
The workflow supplies review agent version 10.0.7.
Generated templates intentionally reference AL-Go actions through mutable @main refs, following the existing AL-Go template convention; they do not guarantee one immutable action revision across jobs.
Run diagnostics record the action repository and requested ref. An immutable action commit is recorded only for a SHA-pinned action reference; mutable refs record a null commit, rather than claiming the reviewed repository's SHA is the action source. Diagnostics also include the agent version, BCQuality version, requested models, and Copilot usage telemetry.
Trusted workflow boundary
The generated integration uses two workflows:
CopilotPRReview.yaml performs unprivileged PR intake and uploads validated event metadata.
CopilotPRReviewRunner.yaml starts through workflow_run, reads trusted settings from the base repository, prepares BCQuality, generates the review with read-only permissions, and hands artifacts to a separate publishing job with write permissions.
Review generation is bound to the validated pull-request head SHA. Untrusted PR code is never used as workflow configuration or executable review infrastructure.
Settings
The settings contract is intentionally separated:
BCQuality selects the marketplace repository, BCQuality release, plugin version, layers, skills, knowledge filters, and AL task context.
CodeReviewAgent controls AL-Go orchestration policy such as models, eligible owners, and review behavior.
This keeps AL product knowledge in BCQuality and repository/workflow policy in AL-Go.
Validation
Focused review engine, metrics, action wrapper, and workflow suites: 414 passed under PowerShell 7, with no skipped or unrun cases.
Action wrapper and workflow suites: 47 passed under Windows PowerShell 5.
Prepare, generate, and post orchestration is exercised with mocked npm, Copilot, and engine entry points, including environment inputs and failure propagation.
Marketplace setup suite: 23 passed under both PowerShell 5 and 7, including installed-plugin configuration and CLI failure paths.
PowerShell ScriptAnalyzer: no findings in changed scripts.
The engine suite is enforced by PowerShell 7 CI in both matrix jobs; the previous stale diagnostic assertions have been corrected.
Workflow templates remain identical for PTE and AppSource projects.
Real BCQuality v1.7 installation, filtering, and plugin consumption succeeded in the canary below.
End-to-end canary
Validated with WaelAbuSeada/al-go-copilot-review-canary#3:
trusted intake, context resolution, and settings loading succeeded
Copilot CLI 1.0.88 and standalone SetupBCQuality succeeded
all 19 leaf reviews plus root consolidation completed
root model gpt-5.6-sol and leaf model gpt-5.6-luna were observed with complete usage telemetry
run manifest recorded agent 10.0.7, BCQuality 1.7, and the exact AL-Go source commit
inline AL findings were published on the intended PR lines
rerun publication skipped repeated and near-duplicate findings; materially new model findings can still be added, and obsolete findings are not currently removed
Install and filter BCQuality as a marketplace plugin, host the reusable review workflow in AL-Go, and update generated workflows and tests.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the PR to e889a3c so the architectural review comments can be reconsidered individually.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Backslashes do not escape $ in PowerShell strings. This double-quoted pattern interpolates the process's BCQUALITY_CONSUME value instead of matching the source variable: when unset it only checks = 'plugin', and when set to plugin it creates an invalid \p regex escape. Use a literal string escaped for regex matching so the assertion is independent of the environment.
Also fixed the overview-only BCQUALITY_CONSUME assertion: it now uses regex escaping on a literal PowerShell source string rather than interpolating the environment. Workflow tests pass with BCQUALITY_CONSUME=plugin under PS5, and the 377 engine/metrics/workflow PS7 cases all pass. The super-skill finding is fixed with a pre-execution configuration error, not by weakening or bypassing the review contract.
Both the PTE and AppSource runner templates use mutable @main references for the AL-Go actions, contrary to the PR description's immutable action-source guarantee. Separate jobs can resolve different revisions; the scenario documentation explicitly says diagnostics record a null commit for mutable refs. Either generate all phases and setup with one resolved action SHA and update the reference assertions, or correct the PR description to match the intended mutable-reference behavior.
Reset shared output files between parameterized tests
Tests/ReviewAgent.Action.Test.ps1:25
The parameterized opt-in and authoritative-eligibility tests reuse opt-in-output.txt and eligibility-output.txt. Write-ReviewOutput appends, and TestDrive cleanup occurs at Describe/Context boundaries, not between these cases. Once the first case writes eligible=false, later cases can incorrectly write eligible=true and still pass Should -Contain 'eligible=false'. Reset both files in BeforeEach so each case checks only its own output.
Addressed both overview-only follow-ups from the latest review (which reported zero open findings). Eligibility tests now truncate their output file at the start of each parameterized case; all 36 action tests pass under both PS5 and PS7. For action pinning, I chose the explicitly offered documentation correction rather than changing AL-Go template behavior: the PR description now accurately states that AL-Go actions use mutable Vlad Vannov (@main) references and diagnostics record a null action commit for those refs. It no longer promises immutable source across jobs.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Per-file Git diffs can expand filename patterns and produce incorrect inline-comment coordinates.
0 open findings
Files not reviewed (1)
Actions/package-lock.json: Generated file
Previously missed (2)
In code that hasn't changed since last review
Treat per-file Git diff paths as literal pathspecs
Actions/ReviewAgent/scripts/Git.ps1:155
-- ends option parsing but still treats $FilePath as a Git pathspec. A path such as src/Code[1].al can also match src/Code1.al, mixing multiple files' patches into a line map that has no file boundaries. This can place findings on incorrect lines or cause inline publication to fail. Make this per-file diff literal with --literal-pathspecs, while preserving intentional glob support in changed-file discovery.
Add coverage for marketplace registration and plugin configuration paths
Actions/SetupBCQuality/SetupBCQuality.ps1:107
Every test in Tests/SetupBCQuality.Action.Test.ps1 sets SETUP_BCQUALITY_PLUGIN_ROOT, so none exercises marketplace registration, installation, or installed-plugin configuration loading. Add Pester cases with that override unset, a mocked Copilot CLI, and realistic configuration fixtures. Cover successful installation, nonzero CLI exits, missing or malformed configuration, ambiguous plugin selection, and manifest-version mismatches. Filtering tests and the reported canary do not provide regression coverage for these paths.
Addressed the two overview-only follow-ups. Per-file Git diffs now use --literal-pathspecs; a real-Git regression with Code[1].al and Code1.al verifies one-file patches while changed-file discovery retains glob support. Added nine marketplace-installation cases without SETUP_BCQUALITY_PLUGIN_ROOT, covering registration/install arguments, loaded configuration/source metadata, CLI errors, missing/malformed JSON, absent/ambiguous plugin selection, and manifest-version mismatch. All 23 setup tests pass under PS5 and PS7, and all 367 engine/metrics cases pass under PS7.
A deleted dashed separator inside an AL block comment produces a patch line beginning with ---. This condition treats it as a file header, so it falls through and increments both coordinates instead of only the old-file coordinate. Subsequent additions in the same hunk are then mapped one line too far down, which can misplace inline findings. Skip metadata before the first hunk, then treat every leading - or + within a hunk as a deletion or addition. Add a regression case with a deleted dashed separator followed by a changed statement.
Address Maria review feedback by placing the new feature above v10.0.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 584d2144-5547-4d2f-b687-de5c520c3892
Wael (@WaelAbuSeada) BCQuality v1.8 is now released. It adds the read-only plan guidance preview (al-development-plan), SARIF export, the Community Copilot domain, and additional knowledge, and its plugin manifest now reports 1.8.0.
Could you update this PR's default BCQuality version from 1.7 to 1.8 before it ships? I found it in:
Actions/.Modules/ReadSettings.psm1: the default "version" = "1.7"
Scenarios/settings.md: the documented default version 1.7
Test inputs that merely use 1.7 as an example value can stay unchanged unless a test asserts the default.
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
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.
Summary
This prototype uptakes BCQuality as the AL review knowledge plugin while keeping trusted GitHub orchestration in AL-Go.
Architecture
SetupBCQualityActions/SetupBCQualityis the sole BCQuality installation boundary. It:pluginRootand filter report consumed by the reviewerReviewAgentdoes not clone, install, or filter BCQuality.ReviewAgentActions/ReviewAgentconsumes an already prepared BCQuality plugin and exposes four phases:contextvalidates trusted settings and pull-request metadata.prepareinstalls and verifies the exact Copilot CLI version.generateruns the read-only AL review against the validated PR head.postpublishes previously generated artifacts using the separate write-capable job.The review engine is split into focused helper scripts for Git operations, execution, schema/report validation, telemetry, artifact handling, finding placement, deduplication, and publication.
Version selection follows the AL-Go action contract:
@github/copilotdependency by default.10.0.7.@mainrefs, following the existing AL-Go template convention; they do not guarantee one immutable action revision across jobs.Run diagnostics record the action repository and requested ref. An immutable action commit is recorded only for a SHA-pinned action reference; mutable refs record a null commit, rather than claiming the reviewed repository's SHA is the action source. Diagnostics also include the agent version, BCQuality version, requested models, and Copilot usage telemetry.
Trusted workflow boundary
The generated integration uses two workflows:
CopilotPRReview.yamlperforms unprivileged PR intake and uploads validated event metadata.CopilotPRReviewRunner.yamlstarts throughworkflow_run, reads trusted settings from the base repository, prepares BCQuality, generates the review with read-only permissions, and hands artifacts to a separate publishing job with write permissions.Review generation is bound to the validated pull-request head SHA. Untrusted PR code is never used as workflow configuration or executable review infrastructure.
Settings
The settings contract is intentionally separated:
BCQualityselects the marketplace repository, BCQuality release, plugin version, layers, skills, knowledge filters, and AL task context.CodeReviewAgentcontrols AL-Go orchestration policy such as models, eligible owners, and review behavior.This keeps AL product knowledge in BCQuality and repository/workflow policy in AL-Go.
Validation
v1.7installation, filtering, and plugin consumption succeeded in the canary below.End-to-end canary
Validated with
WaelAbuSeada/al-go-copilot-review-canary#3:1.0.88and standaloneSetupBCQualitysucceededgpt-5.6-soland leaf modelgpt-5.6-lunawere observed with complete usage telemetry10.0.7, BCQuality1.7, and the exact AL-Go source commitSuccessful runs:
Follow-up work