Repository navigation
Keep /issue triage threat detection to one canonical verdict - #39250
Conversation
Document existing partner write access across command entrypoints without expanding authorization. Reuse regression-trace detector instructions to avoid delegated, differently shaped verdicts while preserving native ambiguity and WTD3 guards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39250Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39250" |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🔵 Needs a closer look
No confirmed defects were identified, but hosted detector behavior and required-check results remain unverified.
0 open findings
What changed in this PR
Improves /issue triage reliability by requesting one canonical threat-detection verdict while preserving existing authorization and safety checks.
Changes:
- Adds a non-delegating detector prompt requiring all flags and a
reasonsarray. - Regenerates the workflow lock with pinned gh-aw v0.86.2.
- Documents command access, artifact-only outcomes and detector limitations.
| File | Description |
|---|---|
.github/workflows/issue-triage.md |
Adds the canonical verdict prompt. |
.github/workflows/issue-triage.lock.yml |
Updates prompt configuration and source hash. |
.github/docs/pr-review-workflow.md |
Documents command entrypoints and access requirements. |
.github/docs/issue-triage.md |
Clarifies detector behavior, access and validation guidance. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
|
@dalexsoto stamp |
PureWeen
left a comment
There was a problem hiding this comment.
Adversarial review
Reviewed exact head 95329f9b5edac5b7469691d803d7c62aca164da0 with 3 independent reviewers and adversarial consensus. Each independent reviewer inspected the four changed workflow/documentation files and relevant unchanged consumers. No confirmed PR-caused or PR-worsened defects were identified.
Independent checks covered:
- Source/lock correspondence: the new detector prompt matches the existing regression-trace prompt; the generated lock's execution delta is the additive
CUSTOM_PROMPT, with the frontmatter metadata hash updated. Models, credentials/imports, permissions, label handlers and completion gates are unchanged. - Pinned gh-aw v0.86.2 behavior:
setup_threat_detection.cjsappends custom instructions to the full built-in analysis prompt.parse_threat_detection_results.cjscompares raw verdicts before defaulting optionalreasons, so omittedreasonsversusreasons: []can still conflict. The added instructions target that format failure without changing native parsing or threat enforcement. - Warning/completion paths: WTD3 continues cancelling label operations on a detection warning, and command completion remains bound to detection and actual safe-output postconditions. Artifact-only reporting, visible blocked commands and no-public-triage-report behavior remain intact.
- Documentation: compared the command inventory against native/association filters, primary authorization gates and secondary rechecks; effective write eligibility does not bypass target-state or validation restrictions. Checked the anchored actionlint ignore expression against its v1.7.12 diagnostic producer. The title and description match the implementation and acknowledge its limits.
Coverage and limits: This is a prompt/configuration-only mitigation, not a deterministic guarantee that the detector will comply. No new regression fixtures are added. No local pinned compilation, actionlint binary execution, hosted detector execution, live command dispatch or product/device tests were performed for this review; static producer/consumer checks do not establish end-to-end runtime success. No team membership roster was enumerated.
The existing bot COMMENT review was considered; there were no existing inline review comments to duplicate or resolve.
Scope: code review only. CI/check status and merge readiness were not evaluated; use the repository's CI-analysis workflow for that assessment.
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> Expose `source.prose`, deterministically computed by the existing trusted `Get-Prose` routine, alongside each unmodified `source.body` before `Get-Snapshot` computes its context hash. Prepared/current hash and freshness checks consequently include the projection. Update the producer prompt, label-triage skill and directly related documentation to require contiguous verbatim quotations present in both raw and filtered strings with exact ordinal matching. Prefer short complete prose sentences that support the label; never strip markup, rewrite a quotation or cite across blanked spans. Withhold unsupported labels instead of emitting malformed evidence. The projection is a citation aid, not proof of authority or semantic support. The [reported command](#39263 (comment)) did trigger [run 37851541526](https://github.com/dotnet/maui/actions/runs/37851541526) on main `45bab995c8498ee77144404a4361d3cf86a4a054`. Detection returned one complete all-clear verdict, but trusted safe-output validation correctly rejected the `has-workaround` quotation because it included inline code. That quotation is verbatim in the issue, but does not survive prose filtering. The same real source contains the intact sentence: "It recovered 4 + More after the refold in 10/10 runs." `Assert-Evidence` is unchanged: it recomputes `Get-Prose` from freshly fetched original bodies and requires exact ordinal containment in both raw and filtered text, never trusting derived fields supplied by the agent. All authority/provenance/category/whole-paragraph contradiction gates, source/file limits, abort-on-incomplete handling, WTD3/native parsing, exact label intents, artifact-only reporting, publication counters/receipts/postconditions and command completion remain unchanged. No normalization, inline-code authority or partial-proposal salvage is introduced. Context grows by the additional source projection; the existing 1 MiB JSON ceiling is not raised. Developed independently, then compared with #39250 and #39190: this fixes producer citation selection, not detection formatting or an activation-import mismatch. Those prior fixes remain intact. Pinned gh-aw v0.86.2 compilation changes only `body_hash` in the lock's first metadata line; executable YAML, manifest, frontmatter/current-import hash, models, pins, imports and permissions are byte-identical. **Validation** - `gh aw compile issue-triage --strict --no-check-update` — passed with gh-aw v0.86.2, one workflow, zero warnings. Repeated compilation produced identical lock SHA256 `8fa12bacc9bb34c80d70bd71055eae51ad36acb57bd734f8b86c6931ca06f158`. - `gh aw hash-frontmatter .github/workflows/issue-triage.md` — passed; current source/import hash `7e9b10340abb100486ac8ee727d99e3669f19d5482b59c3c0b639fdd2ad30bf5` matches metadata. - `test "$(gh aw hash-frontmatter .github/workflows/issue-triage.md)" = "$(head -n 1 .github/workflows/issue-triage.lock.yml | sed 's/^# gh-aw-metadata: //' | jq -r .frontmatter_hash)"` — passed. - `cmp <(git show 45bab99:.github/workflows/issue-triage.lock.yml | tail -n +2) <(tail -n +2 .github/workflows/issue-triage.lock.yml)` — executable YAML and manifest unchanged; the equivalent comparison against pre-commit `HEAD` passed. - `pwsh -NoProfile -NonInteractive -Command '$tokens = $null; $errors = $null; $null = [Management.Automation.Language.Parser]::ParseFile((Join-Path $PWD ".github/scripts/IssueTriage.ps1"), [ref]$tokens, [ref]$errors); if ($errors.Count) { throw ($errors | Out-String) }; "Whole-script PowerShell AST: PASS"'` — passed for the entire script. - `actionlint .github/workflows/issue-triage.lock.yml` — reports only the existing `queue: max` compatibility diagnostic at its two occurrences with actionlint 1.7.12. - `actionlint -ignore '^unexpected key "queue" for "concurrency" section\. expected one of "cancel-in-progress", "group"$' .github/workflows/issue-triage.lock.yml` — passed; that exact anchored compatibility diagnostic is the sole exception. - `git diff --check` — passed. Read-only, one-off in-memory PowerShell analysis extracted the actual helper definitions and new snapshot projection from the script AST and exercised genuine archived issue/proposal evidence, without executing workflow stages or modifying archived files. Confirmed the raw agent-output SHA256 `d95b90380909eff2fcbcd45f7660457de43e284b9e5dcf5c18edaaa2ed07b237`; the original inline-code quotation remains rejected, while the intact sentence passes the citation gate only (not full label validation). Both source bodies/metadata, source count and text length/line/index shape are preserved. Inline code remains blanked; editing an in-memory derived projection changes its hash and cannot bypass the unchanged fresh-body citation check. The archived context would grow from 91,035 to 95,175 bytes, below the unchanged 1,048,576-byte ceiling. **Hosted CI at `bfb106adece5d825f96dc26edb079f2b85bb52ae`:** [Skill Validation 37918382469](https://github.com/dotnet/maui/actions/runs/37918382469) passed its static checks; LLM evaluation was skipped. [Queue validation 37918382485](https://github.com/dotnet/maui/actions/runs/37918382485) passed. [Pester scripts 37918382456](https://github.com/dotnet/maui/actions/runs/37918382456) completed with **2538 passed / 3 failed**, exactly matching the full failed test names and totals of [unchanged-main run 37549105032](https://github.com/dotnet/maui/actions/runs/37549105032), SHA `7d38fd06d059c4875bd81690c360a196aae26a26`. All three failing test files and the two referenced model inputs have identical Git blob SHAs at that baseline and this head. These are verified pre-existing GPT-model-pin assertions, not new failures introduced here. Azure Pipelines explicitly filtered `maui-pr` by trigger conditions; its neutral status is not a build or product-test pass. No pipeline/Pester/regex/snapshot/fixture tests were added. Product/device tests and the existing full Pester suite were not run locally. No live workflow/issue dispatches, command replays, issue comments/labels/minimization, access changes or new monitors during implementation. The configuration/helper checks and hosted CI results are not a new live end-to-end agent success or a guarantee of model compliance. This fix awaits merge and fresh production verification; the historical command was not replayed. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Addresses the `/issue triage` reliability report on #39263; does not close the underlying Shell product issue or replay its command. <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Reuse the existing
/issue trace-regressionthreat-detection prompt in/issue triage: perform the full analysis without subagent delegation and emit exactly one finalTHREAT_DETECTION_RESULTwith all three boolean fields andreasonsas an array, including[]when empty. Regenerate the lock with pinned gh-aw v0.86.2. Its only execution change is the additive detectorCUSTOM_PROMPT; models, credential/import contracts, native parsing, permissions, label handlers and completion gates are unchanged.The workflow did trigger for this
/issue triagecommand. In run 37734556583, a delegated detector emitted an all-clear result withoutreasons, then the outer detector emitted the same flags withreasons: []. The pinned parser rejects different raw verdicts before defaulting optional reasons; WTD3 consequently cancelled the label operation and command completion was skipped. This is a verified detector format failure, not a requester permission rejection. The prompt reduces this failure mode but does not guarantee model compliance: genuine threats, ambiguous/malformed results and WTD3 cancellation remain intact.Document the existing
dotnet/maui-external-partnersrepository write grant and inventory every repository-owned comment-command entrypoint: issue triage, trace-regression, evaluate-tests, review tests/performance, plain review plus recovery/options, evaluate-skills, rebase and the delegated Arcade backport workflow. Existing gates already accept this team's effective write access, including secondary actor rechecks; no authorization expansion or team roster is needed. Preserve artifact-only triage/noop/blocked visibility and explain that external/azptrust belongs to the Azure Pipelines integration, not repository YAML.Validation
gh aw compile issue-triage --strict --no-check-update— passed with gh-aw v0.86.2, zero warnings. A second identical command produced a byte-identical lock.gh aw hash-frontmatter .github/workflows/issue-triage.md— passed; computed source/current-import hash matches lock metadata (7e9b10340abb100486ac8ee727d99e3669f19d5482b59c3c0b639fdd2ad30bf5).gh aw hash-frontmatter .github/workflows/issue-trace-regression.md— passed; matches existing lock metadata with current imports.gh aw hash-frontmatter .github/workflows/copilot-evaluate-tests.md— passed; matches existing lock metadata with current imports.gh aw hash-frontmatter .github/workflows/copilot-review-tests.md— passed; matches existing lock metadata with current imports.gh aw hash-frontmatter .github/workflows/copilot-review-performance.md— passed; matches existing lock metadata with current imports.actionlint -ignore '^unexpected key "queue" for "concurrency" section\. expected one of "cancel-in-progress", "group"$' .github/workflows/issue-triage.lock.yml— passed with actionlint 1.7.12; the exact existing compiler-generatedqueue: maxcompatibility diagnostic is the sole exception.git diff --check— passed.Hosted CI at
95329f9b5edac5b7469691d803d7c62aca164da0: Pester scripts 37765373870 finished with 2538 passed / 3 failed, exactly matching the three failed test names and totals in unchanged-main run 37549105032, SHA7d38fd06d059c4875bd81690c360a196aae26a26. The three model-pin assertions still expect GPT-5.6 Sol; all three test files and the two referenced model inputs have identical Git blob SHAs at baseline and this head. These are verified pre-existing failures, not new failures introduced by this PR. Queue validation 37765373489 passed. Azure Pipelines explicitly filteredmaui-prby trigger conditions; its neutral result is not a build or product-test pass.No new pipeline/Pester/regex/snapshot/fixture tests, live command dispatches, issue comments/labels/minimization, new credentials or access grants. No PowerShell was changed. Product/device tests and the full existing Pester suite were not run locally for this prompt/configuration-only change. Local configuration checks and these hosted CI results are not end-to-end production proof of the new detector prompt; no claim that future detector output is guaranteed or that this branch has completed production execution.
Issues Fixed
Addresses the command reliability report evidenced on #39227 and #39050; does not close either underlying product issue or replay the now-closed #39227 command.