Harden CI-fixer discovery and safe-output transport - #36840
Closed
PureWeen wants to merge 2 commits into
Closed
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bfd33e26-0ff8-45d4-9ef3-72a4ea1f93cf
Pin the capture-time MCP gateway base before startup, keep apply-time handlers aligned, and make attempt-cap decisions deterministic. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bfd33e26-0ff8-45d4-9ef3-72a4ea1f93cf
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:17 — with
GitHub Actions
Inactive
|
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. |
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36840Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36840" |
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:17 — with
GitHub Actions
Inactive
Contributor
Skill Validation Results
❌ Skill Validation Results —
|
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:18 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:20 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens the CI-fixer (main + net11) agentic workflows by making issue discovery deterministic and bounded, pinning the safe-output validation base branch correctly, and failing closed when safe outputs or transport constraints aren’t met.
Changes:
- Replace broad live issue discovery with a bounded, exact-label pre-agent snapshot (plus watch PR state) and remove
issues/searchfrom the agent tool surface. - Pin capture/apply validation base (
DEFAULT_BRANCH) viapre-agent-stepsand safe-outputs env; tighten transport limits (commits/files/bytes) and add expectation-based safe-output reconciliation. - Add Pester + Vally coverage for the incidents, plus new transport/expectation helper scripts.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/ci-status-fix.md | Main CI-fixer: authoritative prefetch, toolset tightening, base pinning, transport bounds, and post-step safe-output reconciliation. |
| .github/workflows/ci-status-fix.lock.yml | Regenerated lock reflecting the workflow hardening (toolsets, pins, bounds, post-step). |
| .github/workflows/ci-status-fix-net11.md | net11 CI-fixer: same hardening, pinned to net11.0 base for capture/apply validation. |
| .github/workflows/ci-status-fix-net11.lock.yml | Regenerated lock reflecting the net11 workflow hardening. |
| .github/skills/ci-fix/tests/eval.vally.yaml | Adds incident-focused eval scenarios (integrity filtering, stale-base divergence, backend failure). |
| .github/skills/ci-fix/SKILL.md | Updates skill guidance to fail-closed at write boundary and enforce transport gating. |
| .github/scripts/Test-CiFixTransport.Tests.ps1 | New Pester tests covering transport validation scenarios (incl. stale-base fixture). |
| .github/scripts/Test-CiFixTransport.ps1 | New transport gate enforcing append-only ancestry, allowed paths, bounded commits/files/patch bytes, and expectation registration. |
| .github/scripts/Register-CiFixSafeOutputExpectation.Tests.ps1 | New Pester tests for expectation registration. |
| .github/scripts/Register-CiFixSafeOutputExpectation.ps1 | New expectation registration helper used to reconcile intended vs captured safe outputs. |
| .github/scripts/Query-CiFixPRs.Tests.ps1 | New Pester coverage for issue evidence bounding/sanitization and dispatch scoping behavior. |
| .github/scripts/Query-CiFixPRs.ps1 | Extends pre-agent prefetch to include bounded exact-label issue evidence and schemaVersion=2 output. |
Copilot's findings
- Files reviewed: 12/12 changed files
- Comments generated: 2
Comment on lines
+100
to
+104
| $registerScript = Join-Path $PSScriptRoot 'Register-CiFixSafeOutputExpectation.ps1' | ||
| & $registerScript ` | ||
| -Type $ExpectedOutputType ` | ||
| -PullRequestNumber $PullRequestNumber ` | ||
| -OutputDirectory $ExpectationDirectory | Out-Null |
Comment on lines
+25
to
+41
| It 'accepts a small append-only allowed diff and registers the expected output' { | ||
| 'fix' | Set-Content -LiteralPath 'src/Essentials/Test.cs' | ||
| git add . | ||
| git commit --quiet -m fix | ||
|
|
||
| $result = & $script:scriptPath ` | ||
| -BaseRef $script:base ` | ||
| -ExpectedOutputType push_to_pull_request_branch ` | ||
| -PullRequestNumber 36619 ` | ||
| -ExpectationDirectory $script:expectations | ConvertFrom-Json | ||
|
|
||
| $result.commitCount | Should -Be 1 | ||
| $result.changedFiles | Should -Be @('src/Essentials/Test.cs') | ||
| $result.patchBytes | Should -BeGreaterThan 0 | ||
| @(Get-ChildItem -LiteralPath $script:expectations -Filter '*.json').Count | Should -Be 1 | ||
| } | ||
|
|
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:21 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:22 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:22 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:22 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:22 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:22 — with
GitHub Actions
Inactive
PureWeen
had a problem deploying
to
copilot-pat-pool
July 27, 2026 19:23 — with
GitHub Actions
Failure
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:26 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:26 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:26 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:34 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:37 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:37 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
July 27, 2026 19:38 — with
GitHub Actions
Inactive
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.
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
Hardens both scheduled CI-fixer workflows after two production failures following #36775:
main. The resulting 3,377-file stale-base divergence produced an oversized allowed-files request, killed the Safe Outputs backend, and still left a green run with empty output.This change:
ci-scanorci-scan-net11), optionally scoped to a dispatch issue number. Issue counts, titles, and bodies are bounded and sanitized; title/body content is explicitly untrusted inert data.pre-agent-stepshook, while independently pinning apply-time handlers. The net11 workflow now validates againstnet11.0, not repository-defaultmain.agent_output.jsonafter the agent exits. Backend errors, malformed expectations, or missing required captures fail the agent job; a legitimate no-op has no mutation expectation and remains green.Security Model
Validation
secret_verification_resultandgithub.aw.import-inputs.random_seed, once per workflow).Staged Fork Proof
The fork-only workflow is guarded to
PureWeen/maui, requiresdry_run=true, uses globalsafe-outputs.staged: true, and performs no real writes.The successful net11 proof shows
DEFAULT_BRANCH=net11.0in the capture-time MCP gateway and apply-time handler, previews onlysrc/Essentials/test/UnitTests/ForkValidationTransport.txt, and leaves fork PR #169's head, body, labels, draft state, and updated timestamp unchanged.gh-aw v0.83.1 / #36772
#36772 is a broader fleet upgrade and is intentionally not bundled here. Both v0.82.14 and v0.83.1 schemas reject
push-to-pull-request-branch.base-branch, even though runtime code recognizes that field. This PR instead uses the supported pre-agent environment hook plus existing Safe Outputs configuration, so the focused production fix does not depend on that upgrade.What NOT to Do
main.noopor a direct write.Issues Fixed
Follow-up to #36775.