Repository navigation
Fix agentic workflow evidence and runtime contracts - #39332
Conversation
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 -- 39332Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39332" |
|
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.
🟡 Changes recommended
The new security-sensitive Node transport path lacks automated behavioral and parity tests.
1 open finding
What changed in this PR
Repairs agentic workflow evidence access, CI-fixer runtime transport, and threat-detection result handling. The title and detailed description accurately match the implementation.
Changes:
- Centralizes the authoritative threat-detection verdict contract.
- Trusts scanner-created bot issues while retaining integrity filtering.
- Moves CI-fixer context to artifacts and adds staged Node transport helpers.
| File | Description |
|---|---|
.github/workflows/shared/threat-detection.md |
Defines the shared detector contract. |
.github/workflows/leak-fixer.md |
Enables trusted scanner evidence. |
.github/workflows/leak-fixer.lock.yml |
Regenerates the leak-fixer workflow. |
.github/workflows/issue-triage.md |
Imports shared threat detection. |
.github/workflows/issue-triage.lock.yml |
Regenerates issue triage. |
.github/workflows/daily-leak-hunter.md |
Enables bot-authored deduplication evidence. |
.github/workflows/daily-leak-hunter.lock.yml |
Regenerates leak-hunter guards. |
.github/workflows/copilot-review-tests.md |
Imports shared threat detection. |
.github/workflows/copilot-review-tests.lock.yml |
Regenerates test review workflow. |
.github/workflows/ci-status-net11.md |
Adds authoritative detector output instructions. |
.github/workflows/ci-status-net11.lock.yml |
Regenerates net11 scanner. |
.github/workflows/ci-status-main.md |
Adds authoritative detector output instructions. |
.github/workflows/ci-status-main.lock.yml |
Regenerates main scanner. |
.github/workflows/ci-status-fix.md |
Uses artifact context and staged Node helpers. |
.github/workflows/ci-status-fix.lock.yml |
Regenerates main CI fixer. |
.github/workflows/ci-status-fix-net11.md |
Mirrors CI-fixer runtime repairs for net11. |
.github/workflows/ci-status-fix-net11.lock.yml |
Regenerates net11 CI fixer. |
.github/workflows/agentic-labeler.md |
Imports shared threat detection. |
.github/workflows/agentic-labeler.lock.yml |
Regenerates agentic labeler. |
.github/scripts/Test-CiFixTransport.cjs |
Implements Node transport validation. |
.github/scripts/Register-CiFixSafeOutputExpectation.cjs |
Implements Node expectation registration. |
🧠 Review effort: Balanced
| const values = parseArguments(process.argv.slice(2), [ | ||
| "baseref", "maxfiles", "maxpatchbytes", "maxcommits", | ||
| "expectedoutputtype", "pullrequestnumber", "expectationdirectory", | ||
| ]); |
There was a problem hiding this comment.
The coverage gap is real, but I'm keeping this PR within the requested no-pipeline-tests scope rather than adding committed Node/Pester/YAML tests. The independent exact-head review found no additional code defects and exercised the registration and transport boundaries; those checks do not replace committed regression coverage. I'll leave this thread open so that limitation remains explicit.
Auto-replied by the GitHub Copilot app
|
Automatic Pester CI reports 2541 passed and 3 failed. All three failures are pre-existing stale model assertions: CopilotPipeline.Tests.ps1:70 and Review-PR.Tests.ps1:328 expect the local reviewer to be gpt-5.6-sol, while trusted base 4342761 already pins gpt-6-astra in Review-Tests.ps1:592; Review-Tests.Tests.ps1:85 expects hosted gpt-5.6-sol, while that base already pins gpt-6.1-sol in copilot-review-tests.md. The scripts/tests and model fields are unchanged by these fixes. Both independent fix PRs fail exactly the same assertions. These are not a green-CI or merge-readiness claim, and no pipeline tests or models were changed to bypass the gate. The configuration/security validation described in the PR remains separate from this baseline failure. |
PureWeen
left a comment
There was a problem hiding this comment.
Adversarial review - independent reviewer assessment
Reviewed exact head 50052cf73661d6bad317f725d0d00fb22c7ac234. No additional actionable defects found after three independent code reviews and adversarial adjudication.
The review covered the Node registration/transport helpers and their PowerShell counterparts, same-run context artifact dependencies and paths, trusted helper staging and generated read-only mounts, scanner-bot integrity configuration, and detector prompt propagation and the pinned gh-aw v0.86.2 parser contract. The PR title and description align with the implementation.
Both new CJS files passed syntax checks. A separate review-time harness passed 30 deterministic Node/Git checks, including CREATE/ADVANCE registration, invalid arguments and PR-number rules, ancestry and merge rejection, 1-3 commit limits, the 20-file boundary, allowed product paths, exact patch-byte limits, and registration only after successful validation.
The existing exact-head Copilot review already identifies the missing committed Node test coverage; that feedback is not duplicated here. The review-time fixtures do not replace committed regression tests. The PowerShell-only suite was not a green validation run on this Windows checkout and does not exercise the new CJS implementations.
Limits: workflow/lock inspection was static; the gh-aw extension was unavailable, so no local recompilation was performed. No hosted Actions/AWF execution, Linux mount validation, or live detector-model run was performed. This is a code-review conclusion, not an approval.
Scope: code review only. CI/check status and merge readiness were not evaluated; use the repository's CI-analysis workflow for that assessment.
|
@dalexsoto stamp |
kubaflo
left a comment
There was a problem hiding this comment.
Expert Review - incomplete
AI-generated review from independent GPT dimension passes.
Reviewed commit: 50052cf73661d6bad317f725d0d00fb22c7ac234
Coverage: 4 of 4 routed dimensions (5, 6, 16, 31) completed independently; finding validation completed.
Findings: 0 new inline findings; 0 review-body findings. This is not a clean-review verdict, because evidence collection was incomplete.
Incomplete evidence
- Linked-issue collection exceeded the bounded 20-issue limit.
- PR discussion changed after the frozen briefing; the latest comment was not part of the hosted review.
Source/history review only. No builds or tests were executed by the expert reviewer; this is not merge approval.
The hosted canary completed the independent expert passes, separate GPT threat detection, and trusted result validation. All observed reviewer/worker and detector requests used gpt-5.3-codex; the detector reported no threat flags.
Publication: This posts the validated result from the previously staged fork canary, using the existing authorized local GitHub CLI login. No credential was transferred to the fork. The original run did not submit a review; this publication does not establish fork-runner bot write access or command-minimization behavior.
|
The |
There was a problem hiding this comment.
Expert Review - incomplete
AI-generated review using independent GPT dimension passes.
Reviewed commit: 50052cf73661d6bad317f725d0d00fb22c7ac234
Coverage: 4 of 4 routed dimensions completed; finding validation completed.
Findings: 0 new inline findings; 0 review-body findings.
Source/history review only. No builds or tests were executed; this is not merge approval.
Incomplete evidence
-
Linked-issue collection exceeded the bounded 20-issue limit.
-
PR feedback changed after the briefing; the latest discussion has not been reconciled.
Expert execution: Verified fork run. Inference and threat detection ran there; this separate trusted job performs native publication.
|
@dalexsoto stamp |
<!-- 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 --> Preserve the identity metadata required by Memory Leak Fixer's GitHub integrity guard. The [reported run](https://github.com/dotnet/maui/actions/runs/39183685618) already loaded `min-integrity: approved` and `trusted-users: ["github-actions[bot]"]`, including the trust correction from #39332. However, its MCP `list_issues` and `search_issues` calls requested projected `fields` without `user` or `author_association`. Field selection happens before guard evaluation, so the guard could not recognize the scanner's trusted bot identity. Issue #37848 was consequently filtered at `unapproved` integrity. The workflow now explicitly requires all MCP issue/PR list and search calls to omit `fields`, retain the original metadata through the guard, and reduce only permitted results locally. This covers review-response discovery, leak selection, deduplication, and attempt caps. Queries must scope to workflow candidates, and filtered/failed evidence must stop publication rather than look like an empty or complete inventory. Approved integrity, bot trust, permissions, firewall, threat detection, safe-output restrictions, and all action/container/model pins remain unchanged. The regenerated lock changes only the prompt body hash. The fix does not permit raw-REST retries, alternate-tool access to withheld content, or a lower integrity threshold. Validation: - `gh aw compile leak-fixer --strict --shellcheck --no-check-update --json` - passed with no errors or warnings; retained the original action/container pins using the local compiler pin cache and restored that cache afterward. - `gh aw compile leak-fixer --strict --staged --no-emit --no-check-update --json` - passed with no errors or warnings. - `git diff --check` - passed. - `actionlint -format '{{json .}}' .github/workflows/leak-fixer.lock.yml` - reports the same four diagnostics as the untouched base (two unsupported generated `concurrency.queue` keys, existing SC2129 style advice, and an existing `github.aw` import expression). No new diagnostics. - Read-only GPT-6.1 Sol security review of the final source/lock change - passed; no confirmed vulnerabilities. No pipeline tests were added. `--dry-run` is unavailable in the pinned gh-aw v0.86.2 compiler; the commands above are configuration checks, not a live dry-run. No agent workflow was dispatched, and hosted recovery remains unverified until the revised workflow runs. ### 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. --> Fixes #39447 <!-- 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> Copilot-Session: aa3864d1-3642-4dd3-a02b-90c0ed19eb6d

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
Repair the shared causes behind the open
[aw]evidence, CI-fixer, and detector reports without disabling their fail-closed controls.github-actions[bot]login; retain approved integrity and treat issue content only as inert evidence.The Node transport helper preserves the existing 1-3 append-only commit, 20-file, 256 KiB, ancestor, merge, and allowed-product-path guards. Its checks and the unchanged expectation reconciliation remain agent-side/detective controls, not substitutes for the privileged publication boundary. Existing PowerShell helpers remain available for local callers. Agent credentials, main/net11 ownership, PR branch/title/label restrictions, attempt ceilings, separate publication jobs, firewall, threat detection, and safe-output limits are unchanged. Node is a new ordinary command-family permission, not a claim of script-path-only approval; trusted helper staging and the existing sandbox/publication boundaries contain its use.
This complements #39237, which prepares Azure evidence and dependencies on the trusted host. It does not replace that PR or claim that a runtime upgrade repairs the PowerShell/chroot defect. These workflow files overlap and will need normal merge-conflict reconciliation.
Validation:
gh aw compile daily-leak-hunter leak-fixer ci-status-fix ci-status-fix-net11 agentic-labeler issue-triage copilot-review-tests ci-status-main ci-status-net11 --strict --shellcheck --no-check-update --json- passed for all nine workflows.gh aw compile daily-leak-hunter leak-fixer ci-status-fix ci-status-fix-net11 agentic-labeler issue-triage copilot-review-tests ci-status-main ci-status-net11 --strict --staged --no-emit --no-check-update --json- passed for all nine workflows.node --check .github/scripts/Register-CiFixSafeOutputExpectation.cjsandnode --check .github/scripts/Test-CiFixTransport.cjs- passed.git diff --check- passed.actionlintover all nine locks - reports the same 28 file/kind/message/snippet diagnostics as the untouched base: unsupported generated concurrency/context syntax and existing generated shell style. No new diagnostics.HEAD..HEADrange before registration.Read-only GPT-6.1 Sol security review passed for this exact source/lock revision after the same reviewer received the missing immutable transitive code. Credential destinations/redaction, executable provenance, command boundaries, read-only helper mounts, authorization and isolated publication were examined; no confirmed new security regression was found. Existing warning-only per-file redaction and detective reconciliation are not portrayed as universal fail-closed guarantees.
Compiler/action/container versions remain pinned. The compiler's existing generic warning for the labeler's unchanged
pull_request_targettrigger is not suppressed. No pipeline tests were added. No live agent workflow was dispatched; hosted behavior still requires validation after merge or an explicitly authorized feature-branch run. The fix PR is not a claim that the scheduled workflows have already recovered.Issues Fixed
Fixes #39310
Fixes #39300
Fixes #39293
Fixes #39259
Fixes #39205
Fixes #39308
Fixes #39298
Fixes #39257
Fixes #39203
Fixes #39303
Fixes #39256
Fixes #39241
Fixes #39309
Fixes #39304
Fixes #39299
Fixes #39296
Fixes #39283
Fixes #39258
Fixes #39221
Fixes #39204
Fixes #39200