From 0300c8758ebe56f9abe3aed3f90667d7b1db14b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viviana=20Due=C3=B1as=20Chavez?= Date: Mon, 23 Nov 2026 13:09:08 -0800 Subject: [PATCH 1/4] Extend PR failure scan for servicing and infra KBEs Add exact check-run analysis, servicing propagation guidance, and infrastructure KBE lookup and creation support while preserving the existing runtime KBE skill and workflow contracts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 17757b0e-9837-4682-8c2b-2789d4de4019 --- .github/skills/create-dnceng-kbe/SKILL.md | 124 ++++++++++++++++++ .github/skills/create-kbe/SKILL.md | 15 +++ .github/skills/pr-failure-scan/SKILL.md | 98 +++++++++++--- .../references/servicing-triage.md | 73 +++++++++++ .../shared/create-kbe.instructions.md | 89 ++++++++++++- 5 files changed, 381 insertions(+), 18 deletions(-) create mode 100644 .github/skills/create-dnceng-kbe/SKILL.md create mode 100644 .github/skills/pr-failure-scan/references/servicing-triage.md diff --git a/.github/skills/create-dnceng-kbe/SKILL.md b/.github/skills/create-dnceng-kbe/SKILL.md new file mode 100644 index 00000000000000..c8806507c75a73 --- /dev/null +++ b/.github/skills/create-dnceng-kbe/SKILL.md @@ -0,0 +1,124 @@ +--- +name: create-dnceng-kbe +description: > + Draft or publish a caller-requested dotnet/dnceng Known Build Error outcome. + The caller chooses the action; the skill reuses supplied lookup evidence or + completes missing dnceng lookup context without changing that action. +--- + +# Draft a dotnet/dnceng Infrastructure Known Build Error + +Use this skill after a caller has completed dnceng ownership and duplicate +triage and explicitly selected a draft or publication action. + +This skill executes the selected action. It does not decide whether a dnceng KBE +is warranted or whether the result should be draft-only or live. + +## Authoritative guidance + +Read the current versions of these sources before drafting: + +1. [dnceng infrastructure Known Issue form](https://github.com/dotnet/dnceng/blob/main/.github/ISSUE_TEMPLATE/z-build-break-infrastructure-issue-template.yml) +2. [Arcade Known Issues guidance](https://github.com/dotnet/arcade/blob/main/Documentation/Build%20Analysis/KnownIssues.md) +3. [Arcade Known Issue JSON steps](https://github.com/dotnet/arcade/blob/main/Documentation/Build%20Analysis/KnownIssueJsonStepByStep.md) +4. [dnceng issue tracking guidance](https://github.com/dotnet/dnceng/blob/main/Documentation/TeamProcess/DevGuide/IssueTrackingGuidance.md) + +Do not copy or recreate the dnceng issue template in this repository. Load its +current field order, labels, default content, and validation requirements. If +the authoritative form or guidance cannot be read, stop and report the blocked +draft instead of inventing a substitute. Record the resolved repository commit +SHA for each external source in the local draft so the artifact is reproducible. + +## Input contract + +The caller supplies: + +- one concrete candidate already classified for a dnceng draft, +- a stable candidate ID, failure name or family, and build leg, +- the originating repository and PR, +- the failing build, leg, pipeline, queue, logs, and stable signature evidence, +- the Build Analysis infrastructure issue link when available, +- the requested action: + `draft-review`, `draft-new-dnceng`, `draft-recurrence-dnceng`, + `publish-new-dnceng`, or `publish-recurrence-dnceng`, +- dnceng duplicate-search and recurrence evidence when available, +- lookup mode: `reuse-supplied` or `complete-if-needed`, +- why repository ownership was rejected or remains uncertain, +- any missing evidence for a review-only draft, +- for publication actions: `caller=pr-failure-scan`, live mode, the prepared + draft path and fingerprint, explicit user permission to publish to + `dotnet/dnceng`, and the authenticated GitHub account. + +Treat query parameters in a Build Analysis link as hints. Verify the destination +repository, issue-form name, labels, build, leg, and PR against the selected +check and authoritative form. + +The requested action is mandatory. Reject contradictory action inputs. Do not +select a different action. + +## Publication boundary + +- Publication is allowed only for `publish-new-dnceng` or + `publish-recurrence-dnceng` requested by a live `pr-failure-scan` run. +- Explicit user permission for publication to `dotnet/dnceng` is mandatory. + Runtime or workflow publication authorization does not transfer. +- `dryrun`, `draft-review`, and caller-selected draft-only outcomes never + publish and never trigger a permission request. +- Reject publication when the prepared draft, fingerprint, authenticated + account, explicit permission, or caller identity is missing. + +## Execute the requested action + +1. Verify the requested action and apply the requested lookup mode: + - With `reuse-supplied`, require a conclusive dnceng lookup. + - With `complete-if-needed`, reuse conclusive supplied evidence; otherwise + run the dnceng duplicate and recurrence lookup before drafting. + - A direct user request with an explicit action and no lookup context uses + `complete-if-needed`. + The lookup may return an existing issue or block an unsafe duplicate, but it + must not select a different draft action. +2. Stop when the candidate contains potential security-sensitive material. Do + not create any GitHub issue, AzDO work item, comment, draft, or other + external artifact. +3. Load the authoritative external form and guidance. Verify that the requested + action and supplied evidence are compatible with the current form. +4. Write one local Markdown review artifact. Prefer the session + artifact directory; otherwise use a temporary directory outside the runtime + checkout. +5. Render the current dnceng issue-form fields in their authoritative order and + fill them with verified evidence. Use Arcade's current Known Issue guidance + for the JSON signature. Preserve form-owned default content that maintainers + are expected to retain. If a form-owned link is broken, record that fact and + use the verified current guidance for analysis rather than silently + rewriting the external template. +6. Include the proposed title, current form labels, destination repository, + issue-form URL, prefilled Build Analysis link when available, and any + ownership uncertainty requiring maintainer review. +7. Clearly mark `draft-review` as incomplete and non-publishable. Include + recurrence evidence for `draft-recurrence-dnceng`. +8. For `publish-new-dnceng` or `publish-recurrence-dnceng`, verify the matching + prepared draft and fingerprint, perform a final narrow dnceng duplicate + safety check, verify the publication boundary above, append the required AI + disclosure, and publish exactly that draft. +9. Report both a clickable local-file link when supported and the plain + absolute path for drafts. Return the created issue URL for publication. +10. Never change the caller-selected action. + +## Outcome contract + +```json +{ + "status": "created | drafted | existing | blocked | failed", + "requestedAction": "draft-review | draft-new-dnceng | draft-recurrence-dnceng | publish-new-dnceng | publish-recurrence-dnceng", + "lookupMode": "reuse-supplied | complete-if-needed", + "candidateId": "stable caller-provided identifier", + "failure": "failure name or family", + "buildLeg": "failing build leg", + "signature": "concise stable signature summary", + "proposedTitle": "draft title, or empty string", + "issueUrl": "verified existing dotnet/dnceng issue URL, or null", + "draftPath": "absolute local path or null", + "missingEvidence": ["ownership or verification items still required"], + "message": "concise evidence-based result" +} +``` diff --git a/.github/skills/create-kbe/SKILL.md b/.github/skills/create-kbe/SKILL.md index 6f31593c6a9630..f3219f1752be4f 100644 --- a/.github/skills/create-kbe/SKILL.md +++ b/.github/skills/create-kbe/SKILL.md @@ -47,6 +47,21 @@ Read and follow these in order: 2. the caller workflow or tool instructions that selected this failure and decided it is in scope 3. any workflow-specific formatting or dry-run requirements for the current caller +When the caller already provides a complete, conclusive result from the shared +lookup, reuse it. Otherwise run the applicable shared lookup before creating or +updating anything. This preserves direct use of the skill while avoiding a +duplicate broad search for callers that already completed it. + +The shared instructions may classify the failure as a `dotnet/dnceng` +infrastructure outcome. In that case: + +- do not use the runtime KBE body template, +- report an existing dnceng KBE directly when one matched, +- use [`create-dnceng-kbe`](../create-dnceng-kbe/SKILL.md) for a requested local + dnceng draft, +- publish to dnceng only through the explicit-permission path documented by the + caller; runtime publication authorization does not transfer. + ## Core rules - One failure shape = one KBE outcome. diff --git a/.github/skills/pr-failure-scan/SKILL.md b/.github/skills/pr-failure-scan/SKILL.md index 9f66389ed6d0d9..d6c1ceb69f6464 100644 --- a/.github/skills/pr-failure-scan/SKILL.md +++ b/.github/skills/pr-failure-scan/SKILL.md @@ -4,7 +4,8 @@ description: > Analyze a dotnet/runtime PR's CI failures, skip failures already known to Build Analysis, find matching Known Build Errors, and create or draft new KBEs for the remaining failures. Supports dry-run output to local markdown - files instead of creating GitHub issues. + files instead of creating GitHub issues. Also handles exact check-run links, + servicing propagation, and dnceng infrastructure KBE outcomes. --- # PR Failure Scan Skill @@ -12,6 +13,7 @@ description: > Use this skill for requests like: - `/pr-failure-scan ` +- `/pr-failure-scan ` - `/pr-failure-scan dryrun` - `create KBEs for PR ` @@ -35,6 +37,7 @@ Accept one of: - a PR number, - a PR URL, +- a deep link to a PR check run with a numeric `check_run_id`, - text containing a PR reference, - an optional trailing `dryrun` token. @@ -45,6 +48,7 @@ Examples: - `/pr-failure-scan 123456` - `/pr-failure-scan https://github.com/dotnet/runtime/pull/123456` +- `/pr-failure-scan https://github.com/dotnet/runtime/pull/123456/checks?check_run_id=123456789` - `/pr-failure-scan https://github.com/dotnet/runtime/pull/123456 dryrun` ## Step 1: Resolve identities and require explicit permission for non-owned PRs @@ -65,13 +69,24 @@ If the user declines, stop immediately. ## Step 2: Gather PR CI context -Use the latest completed check runs for the PR head SHA. +If the input identifies a specific check run, resolve that exact completed run, +verify that it belongs to the referenced PR, and use its check suite or workflow +attempt and head SHA. Otherwise, use the latest completed check runs for the PR +head SHA. Collect all of: -1. The `Build Analysis` check run payload from the GitHub REST API. -2. The non-success CI check runs for the PR head SHA. -3. The AzDO build URLs linked from those check runs. +1. The selected check run, when one was supplied. +2. The `Build Analysis` check run payload from the GitHub REST API for the + selected suite or workflow attempt, or for the PR head SHA when no exact + check run was supplied. +3. The non-success CI check runs associated with that same suite or attempt. +4. The AzDO build URLs linked from those check runs. + +Do not silently replace a selected historical run with the latest run. When +sibling checks cannot be correlated unambiguously, keep the selected run as an +explicit candidate and report unavailable evidence rather than mixing attempts +that share a SHA. The local skill has a different candidate-source model than the scheduled workflow: @@ -86,8 +101,11 @@ workflow: Build the candidate list from two sources: 1. **Build Analysis unknowns on analyzed pipelines.** - - Parse the `Build Analysis` check text for `Create issue in this repo` links - and the surrounding failure description. + - Parse the `Build Analysis` check text for both `Create issue in this repo` + and `Create issue against infrastructure team` links and their surrounding + failure descriptions. + - Record the proposed destination, issue form, labels, build, build leg, and + PR encoded in the link as hints; verify them against the selected evidence. - Each such entry is an in-scope candidate unless you later find an existing matching KBE. 2. **Failed pipelines explicitly excluded from Build Analysis.** @@ -112,13 +130,28 @@ For each candidate failure, do the following: - the relevant build or task log, - for Helix-submitted legs, the Helix console log or failure details when accessible. -2. Extract the narrowest signature that fits the shared rules. -3. Run the shared KBE lookup flow from +2. Decide whether the failure is **related**, **unrelated**, or **unclear** with + respect to the current PR: + - **related**: report that the PR must be fixed and stop KBE processing for + this candidate; + - **unrelated**: continue with KBE lookup and handling; + - **unclear**: search for existing tracking, but keep any proposed new issue + as a non-publishable review draft until the relationship is resolved. +3. Use the shared destination-classification section when runtime ownership is + not already established. +4. For a runtime candidate, extract the narrowest signature and run the existing + shared runtime KBE lookup flow from `.github/workflows/shared/create-kbe.instructions.md`. -4. Classify the candidate into exactly one of these buckets: +5. Classify the runtime candidate into exactly one of these buckets: - **new KBE needed** - **existing KBE matched but Build Analysis likely missed it** - **unhandled** +6. For a dnceng candidate, preserve the shared dnceng classification and either + report the existing issue, prepare a new/recurrence draft, prepare a + non-publishable review draft, or mark the failure unhandled. +7. When the PR targets `release/.`, read and follow + [`references/servicing-triage.md`](references/servicing-triage.md) after the + normal runtime lookup and before any live publication. ### PR-specific guidance for excluded or partially-analyzed pipelines @@ -168,11 +201,11 @@ In particular: ## Step 5: Write draft files and optionally create live issues -### Draft files for all new KBEs +### Draft files for all new runtime KBEs -For every item in the **new KBE needed** bucket, always write a markdown draft -file before deciding whether to create a GitHub issue. This applies to both -`dryrun` and live mode. +For every runtime item in the **new KBE needed** bucket, always write a markdown +draft file before deciding whether to create a GitHub issue. This applies to +both `dryrun` and live mode. 1. Write one markdown file per `new KBE needed` item. 2. Prefer the session artifact directory if it is available. Otherwise, use a @@ -190,7 +223,9 @@ Each draft file should contain: These dry-run files are **review artifacts**, not necessarily byte-for-byte live issue bodies. Keep them easy to compare and edit on disk. -Prefer this layout for dry-run files: +Prefer this layout for runtime dry-run files. Do not use it for dnceng drafts; +those must follow the authoritative dnceng issue form through +[`create-dnceng-kbe`](../create-dnceng-kbe/SKILL.md). ````markdown # Draft KBE issue @@ -295,9 +330,27 @@ for example: > [!NOTE] > This issue was prepared with GitHub Copilot assistance. +### Infrastructure KBE drafts and publication + +For every shared result classified as a new dnceng KBE, dnceng recurrence, or +useful infrastructure review draft, use +[`create-dnceng-kbe`](../create-dnceng-kbe/SKILL.md) to create the local draft. +The runtime draft layout above does not apply to these drafts. + +- In `dryrun`, stop after producing local drafts. +- A review draft or any caller-selected draft-only result is never publishable; + do not check for permission and do not ask the user whether to publish it. +- In live mode, a publishable new or recurrence draft may be published only + after the complete batch and servicing analysis are finished and the user + explicitly authorizes publication to `dotnet/dnceng`. +- Agent Merge/runtime publication authorization does not transfer to dnceng. +- Before publication, show the proposed title, labels, complete form body, + authenticated account, affected failures, and local draft path, then run a + final narrow dnceng duplicate check. + ## Step 6: Final output format -The final response must contain all four sections below. +The final response must contain all six sections below. ### 1. New issues created or draft files @@ -324,7 +377,18 @@ For every such failure, provide: - why it appears to match, - why Build Analysis likely missed it. -### 4. Failures not handled +### 4. Infrastructure KBE outcomes + +List existing dnceng issues, local draft paths, created dnceng issue URLs, +recurrence findings, blocked lookups, and ownership uncertainty. + +### 5. Servicing findings + +For release-targeted PRs, report tracker reuse, matcher gaps, main/release/VMR +propagation, and any recommended maintainer `/backport` command. Never invoke +the backport workflow. + +### 6. Failures not handled For every unhandled failure, provide: diff --git a/.github/skills/pr-failure-scan/references/servicing-triage.md b/.github/skills/pr-failure-scan/references/servicing-triage.md new file mode 100644 index 00000000000000..0917be4b5a1d3e --- /dev/null +++ b/.github/skills/pr-failure-scan/references/servicing-triage.md @@ -0,0 +1,73 @@ +# Servicing Failure Interpretation + +Use this reference only when the PR targets `release/.`. + +## Relationship to shared KBE search + +`pr-failure-scan` and the shared KBE instructions already search +`dotnet/runtime` for: + +- open Known Build Errors, +- recent closed Known Build Errors, +- plain area-team trackers, +- open fixes, +- recent merged fixes. + +Do not repeat or replace those searches here. Issue scope follows the failure +signature and root cause, not the branch where the issue was first reported. +An issue first filed from main may cover a release failure, and an issue first +filed from a release branch may cover main. + +This reference adds branch-aware interpretation after the normal KBE lookup and +draft phase, but before any live publication. + +## Branch-aware checks + +For each runtime-owned failure: + +1. Record the target release branch and selected failure time. +2. Use the tracker and fix evidence from the orchestrator's shared KBE lookup. + Add draft evidence from `create-kbe` only when that skill was invoked. +3. If an open tracker matches the same root cause, reuse it regardless of its + first reported branch. Report any matcher gap that prevents the release leg + from being recognized. +4. The shared KBE instructions normally search for merged fix PRs from the last + 14 days. If a matching KBE is closed as fixed, inspect its linked fix PRs + regardless of merge date. A fix may have been on main for longer than 14 + days without ever reaching the target release branch. +5. Verify whether the effective fix is present in both main and the target + release branch. Do not rely only on commit ancestry because servicing fixes + may be cherry-picked under different commit IDs. +6. If no linked fix is available, perform a targeted merged-PR search using the + tracker number and stable signature. Do not enumerate unrelated branch + history. +7. Inspect the applicable `dotnet/dotnet` VMR branch only when the selected + build, tracker, or fix evidence identifies VMR consumption or codeflow. + +Absence from a search result or absence of a recent failing build is not proof +that a branch is unaffected. + +## Result fields + +Report these independently because more than one can apply: + +- `trackerStatus`: shared tracker, closed tracker, no tracker, or unclear +- `matcherStatus`: matched, matcher gap, not applicable, or unclear +- `propagationStatus`: synchronized, backport needed, main fix needed, + VMR sync gap, cross-branch recurrence, or unclear +- `recommendedAction`: none, correct matcher, request backport, fix main, + investigate VMR sync, or human review + +Before recommending a backport, verify that the fix is a small targeted change +for a security bug, regression, or reliability issue, consistent with the +repository's servicing policy. + +For `request backport`, report the verified fix PR, target release branch, +eligibility rationale, evidence that the effective change is absent, and the +suggested maintainer command: + +```text +/backport to release/. +``` + +Never post the command or invoke the backport workflow. diff --git a/.github/workflows/shared/create-kbe.instructions.md b/.github/workflows/shared/create-kbe.instructions.md index 22a87de8a60175..17b69d6826a4a0 100644 --- a/.github/workflows/shared/create-kbe.instructions.md +++ b/.github/workflows/shared/create-kbe.instructions.md @@ -1,7 +1,8 @@ # Shared KBE Analysis Instructions Use this file when you already have a concrete failure candidate that might need -a `Known Build Error` issue in `dotnet/runtime`. +a repository `Known Build Error` in `dotnet/runtime` or an infrastructure Known +Build Error in `dotnet/dnceng`. This file is intentionally limited to the logic shared between: @@ -19,6 +20,11 @@ responsible for: review, and - formatting the final report back to the user. +The runtime lookup, templates, and verification sections below remain specific +to `dotnet/runtime`. Consumers that have not already established runtime +ownership may opt into the destination-routing section first. That section can +identify or deduplicate a dnceng outcome. + These shared analysis and template instructions do not grant permission to publish. The caller must follow the repository's [GitHub publication authorization rules](../../copilot-instructions.md#github-publication-authorization): @@ -48,6 +54,87 @@ report the pending decision. Dry-run mode never publishes. 5. **Do not comment on existing KBEs.** Build Analysis tracks occurrence data in the issue body. + + +## Classify the KBE destination + +Use this section when the caller has not already established that the failure +is exclusive to `dotnet/runtime`. + +Apply the current Arcade Known Issues criteria: + +- **Runtime repository candidate:** the failure is specific to runtime product, + tests, build logic, or repository configuration and should be investigated by + runtime owners. +- **Infrastructure candidate:** the failure is not exclusive to runtime and + needs engineering-services investigation, such as a lab, agent, queue, + pipeline service, network, package-feed, or cross-repository infrastructure + failure. +- **Infrastructure review:** the evidence is infrastructure-shaped but ownership + is not yet proven. This may support a non-publishable review draft, not an + automatic issue. +- **Unclear:** evidence is too weak to choose either destination. + +Do not infer infrastructure ownership merely because the runtime lookup finds +no existing issue. Use failure evidence and ownership criteria. + +If the candidate may contain a security issue, stop public KBE processing and +report the required private escalation path. Do not create a GitHub issue, +AzDO work item, comment, or public draft. + +For a runtime repository candidate, continue with +[Search for an existing KBE](#search-for-an-existing-kbe). + +For an infrastructure candidate or infrastructure review, run the dnceng lookup +below before selecting any creation action. + + + +## Search for an existing dnceng KBE + +Read the current authoritative sources before classifying a dnceng result: + +- `dotnet/dnceng` infrastructure Known Issue form: + `.github/ISSUE_TEMPLATE/z-build-break-infrastructure-issue-template.yml` +- Arcade `Documentation/Build Analysis/KnownIssues.md` +- dnceng `Documentation/TeamProcess/DevGuide/IssueTrackingGuidance.md` + +Search open and recent closed `dotnet/dnceng` issues using progressively +narrowed combinations of: + +1. the full stable error signature, +2. assertion, exception, or task error text, +3. pipeline and failing task, +4. queue, image, pool, or agent identifier after removing volatile instance + values, +5. build leg and originating repository, +6. relevant service or package-feed name. + +Preserve complete search responses and inspect every plausible issue body and +relevant comments. A failed, filtered, incomplete, ambiguous, or unreadable +lookup is not an empty result: classify it as `dnceng-lookup-blocked` and do not +draft or publish a new issue. + +Classify the result as exactly one of: + +- `existing-dnceng-kbe`: an open issue covers the same root cause; +- `recently-handled-dnceng-kbe`: a closed issue or linked fix handled a failure + that predates the fix or closure; +- `eligible-dnceng-recurrence`: the same root cause is verified after the prior + fix or closure; +- `eligible-new-dnceng-kbe`: no issue matches and the evidence supports + engineering-services ownership; +- `dnceng-review-draft`: ownership is still uncertain but the evidence is + useful for human review; +- `runtime-candidate`: dnceng lookup or ownership analysis shows the failure is + repository-specific; continue with the runtime lookup; +- `dnceng-lookup-blocked`: lookup or evidence is inconclusive; +- `unhandled`: evidence is too weak even for a useful review draft. + +These are classifications, not publication decisions. The caller chooses no +action, review draft, publishable draft, or live publication. The dnceng issue +form remains the authority for draft and publication fields. + ## Search for an existing KBE From 3ee5e5669aec7b47c56a4c59539640a531da2279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viviana=20Due=C3=B1as=20Chavez?= Date: Mon, 23 Nov 2026 15:41:41 -0800 Subject: [PATCH 2/4] Address KBE triage review feedback Screen security-sensitive evidence before dnceng lookups, distinguish plain trackers from KBEs, verify fixes against the failing source revision, and canonicalize closed duplicate dnceng issues before recurrence decisions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 17757b0e-9837-4682-8c2b-2789d4de4019 --- .github/skills/create-dnceng-kbe/SKILL.md | 9 ++--- .../references/servicing-triage.md | 34 +++++++++++++------ .../shared/create-kbe.instructions.md | 12 +++++++ 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/.github/skills/create-dnceng-kbe/SKILL.md b/.github/skills/create-dnceng-kbe/SKILL.md index c8806507c75a73..d5e595bb35fc38 100644 --- a/.github/skills/create-dnceng-kbe/SKILL.md +++ b/.github/skills/create-dnceng-kbe/SKILL.md @@ -69,7 +69,11 @@ select a different action. ## Execute the requested action -1. Verify the requested action and apply the requested lookup mode: +1. Before using any candidate signature, error text, logs, or other supplied + evidence in an external lookup, stop when the candidate contains potential + security-sensitive material. Do not create any GitHub issue, AzDO work item, + comment, draft, lookup query, or other external artifact. +2. Verify the requested action and apply the requested lookup mode: - With `reuse-supplied`, require a conclusive dnceng lookup. - With `complete-if-needed`, reuse conclusive supplied evidence; otherwise run the dnceng duplicate and recurrence lookup before drafting. @@ -77,9 +81,6 @@ select a different action. `complete-if-needed`. The lookup may return an existing issue or block an unsafe duplicate, but it must not select a different draft action. -2. Stop when the candidate contains potential security-sensitive material. Do - not create any GitHub issue, AzDO work item, comment, draft, or other - external artifact. 3. Load the authoritative external form and guidance. Verify that the requested action and supplied evidence are compatible with the current form. 4. Write one local Markdown review artifact. Prefer the session diff --git a/.github/skills/pr-failure-scan/references/servicing-triage.md b/.github/skills/pr-failure-scan/references/servicing-triage.md index 0917be4b5a1d3e..b8bcbc1bf2a15f 100644 --- a/.github/skills/pr-failure-scan/references/servicing-triage.md +++ b/.github/skills/pr-failure-scan/references/servicing-triage.md @@ -28,20 +28,33 @@ For each runtime-owned failure: 1. Record the target release branch and selected failure time. 2. Use the tracker and fix evidence from the orchestrator's shared KBE lookup. Add draft evidence from `create-kbe` only when that skill was invoked. -3. If an open tracker matches the same root cause, reuse it regardless of its - first reported branch. Report any matcher gap that prevents the release leg - from being recognized. -4. The shared KBE instructions normally search for merged fix PRs from the last +3. If an open `Known Build Error` issue with a valid matcher covers the same + root cause, reuse it regardless of its first reported branch. Report any + matcher gap that prevents the release leg from being recognized. +4. If only a plain area-team tracker matches, retain it as cross-link and + ownership context but continue KBE eligibility analysis. A tracker without + the `Known Build Error` label and valid matcher is not a KBE substitute and + must not suppress an otherwise eligible release KBE. +5. The shared KBE instructions normally search for merged fix PRs from the last 14 days. If a matching KBE is closed as fixed, inspect its linked fix PRs regardless of merge date. A fix may have been on main for longer than 14 days without ever reaching the target release branch. -5. Verify whether the effective fix is present in both main and the target +6. Verify whether the failing build's source revision contained the effective + fix. A rerun of an older revision does not become a recurrence merely because + its `finishTime` is after the fix merged: + - if the source revision lacked the fix and the current target branch now + contains it, classify the failure as historical and already addressed; + - if the source revision lacked the fix and the target branch still lacks it, + evaluate a release propagation gap or backport; + - classify a post-fix recurrence only when the failing source revision + contained the effective fix. +7. Verify whether the effective fix is present in both main and the target release branch. Do not rely only on commit ancestry because servicing fixes may be cherry-picked under different commit IDs. -6. If no linked fix is available, perform a targeted merged-PR search using the +8. If no linked fix is available, perform a targeted merged-PR search using the tracker number and stable signature. Do not enumerate unrelated branch history. -7. Inspect the applicable `dotnet/dotnet` VMR branch only when the selected +9. Inspect the applicable `dotnet/dotnet` VMR branch only when the selected build, tracker, or fix evidence identifies VMR consumption or codeflow. Absence from a search result or absence of a recent failing build is not proof @@ -51,10 +64,11 @@ that a branch is unaffected. Report these independently because more than one can apply: -- `trackerStatus`: shared tracker, closed tracker, no tracker, or unclear +- `trackerStatus`: open KBE, plain tracker, closed KBE, no tracker, or unclear - `matcherStatus`: matched, matcher gap, not applicable, or unclear -- `propagationStatus`: synchronized, backport needed, main fix needed, - VMR sync gap, cross-branch recurrence, or unclear +- `propagationStatus`: synchronized, historical failure already addressed, + backport needed, main fix needed, VMR sync gap, cross-branch recurrence, or + unclear - `recommendedAction`: none, correct matcher, request backport, fix main, investigate VMR sync, or human review diff --git a/.github/workflows/shared/create-kbe.instructions.md b/.github/workflows/shared/create-kbe.instructions.md index 17b69d6826a4a0..78c6eb7a38ee6a 100644 --- a/.github/workflows/shared/create-kbe.instructions.md +++ b/.github/workflows/shared/create-kbe.instructions.md @@ -115,6 +115,18 @@ relevant comments. A failed, filtered, incomplete, ambiguous, or unreadable lookup is not an empty result: classify it as `dnceng-lookup-blocked` and do not draft or publish a new issue. +If a candidate is closed as a duplicate, follow only explicit duplicate links +and read each linked issue body and relevant comments until reaching the +canonical issue that is not itself a duplicate. Track visited issues. If a link +is missing or ambiguous, the chain is cyclic, or any read is inconclusive, +classify the result as `dnceng-lookup-blocked`. + +Use the canonical issue's state, closure time, and linked fix evidence for +classification. An open canonical issue always yields `existing-dnceng-kbe`, +even when the initially matched duplicate is closed. A closed duplicate does +not establish that the failure was fixed and must not by itself produce a +recurrence draft. + Classify the result as exactly one of: - `existing-dnceng-kbe`: an open issue covers the same root cause; From a275f8fc45ac3dadb0587669ebacf0ffc60dce71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viviana=20Due=C3=B1as=20Chavez?= Date: Tue, 24 Nov 2026 12:04:32 -0800 Subject: [PATCH 3/4] Address remaining KBE triage feedback Make dnceng lookup windows explicit, preserve runtime KBE dedup before infrastructure routing, document the scheduled scanner's runtime-only scope, and add a bounded servicing-only historical fix resolver. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 17757b0e-9837-4682-8c2b-2789d4de4019 --- .github/skills/pr-failure-scan/SKILL.md | 18 +++--- .../references/servicing-triage.md | 58 +++++++++++++++++++ .github/workflows/ci-failure-scan.lock.yml | 2 +- .github/workflows/ci-failure-scan.md | 5 ++ .../shared/create-kbe.instructions.md | 33 +++++++++-- 5 files changed, 102 insertions(+), 14 deletions(-) diff --git a/.github/skills/pr-failure-scan/SKILL.md b/.github/skills/pr-failure-scan/SKILL.md index d6c1ceb69f6464..8a2a4f45adff77 100644 --- a/.github/skills/pr-failure-scan/SKILL.md +++ b/.github/skills/pr-failure-scan/SKILL.md @@ -137,19 +137,23 @@ For each candidate failure, do the following: - **unrelated**: continue with KBE lookup and handling; - **unclear**: search for existing tracking, but keep any proposed new issue as a non-publishable review draft until the relationship is resolved. -3. Use the shared destination-classification section when runtime ownership is - not already established. -4. For a runtime candidate, extract the narrowest signature and run the existing - shared runtime KBE lookup flow from +3. Extract the narrowest signature and run the existing shared runtime KBE + lookup flow for every unrelated or unclear candidate from `.github/workflows/shared/create-kbe.instructions.md`. -5. Classify the runtime candidate into exactly one of these buckets: +4. Classify the runtime lookup into exactly one of these buckets: - **new KBE needed** - **existing KBE matched but Build Analysis likely missed it** - **unhandled** -6. For a dnceng candidate, preserve the shared dnceng classification and either + Retain a matching plain tracker as cross-link context rather than treating it + as a KBE substitute. +5. If a verified open runtime KBE matches, report it and stop destination + routing for that candidate unless an explicit migration was requested. +6. When no open runtime KBE matches, use the shared destination-classification + section if runtime ownership is not already established. +7. For a dnceng candidate, preserve the shared dnceng classification and either report the existing issue, prepare a new/recurrence draft, prepare a non-publishable review draft, or mark the failure unhandled. -7. When the PR targets `release/.`, read and follow +8. When the PR targets `release/.`, read and follow [`references/servicing-triage.md`](references/servicing-triage.md) after the normal runtime lookup and before any live publication. diff --git a/.github/skills/pr-failure-scan/references/servicing-triage.md b/.github/skills/pr-failure-scan/references/servicing-triage.md index b8bcbc1bf2a15f..c381ec0d903022 100644 --- a/.github/skills/pr-failure-scan/references/servicing-triage.md +++ b/.github/skills/pr-failure-scan/references/servicing-triage.md @@ -60,6 +60,62 @@ For each runtime-owned failure: Absence from a search result or absence of a recent failing build is not proof that a branch is unaffected. +## Historical servicing fallback + +Keep the shared 30/90-day closed-KBE and recurrence barriers unchanged. Use +this release-only fallback immediately before finalizing a **new KBE needed** +result, and only when all of these are true: + +- the PR targets `release/.` and the failure is runtime-owned; +- the normal shared lookup completed successfully and found no verified open or + recent closed KBE that determines the outcome; +- existing tracker or fix evidence does not already determine propagation; +- the candidate satisfies the normal signature-specificity and stability gates; +- the failing source SHA, target release branch, and main branch are known; +- a composite search key has at least two independent stable anchors, such as a + full test or method plus a distinctive assertion, an invariant error phrase + plus leg root, or source symbol plus assertion and file or assembly. + +Do not use a test stem, class name, generic exception, or build leg alone. + +### Phase 1: historical fix search + +1. Search merged runtime PRs across all dates using the composite key. +2. Admit at most 10 unique PR candidates for the signature. Fully read every + candidate body and diff. If a query has more results, narrow it; if it cannot + be narrowed to a complete result set, stop for human review. +3. Require one unambiguous effective fix for the same root cause. Multiple + plausible fixes, unreadable/filtered results, or uncertain patch identity + stop for human review. + +### Phase 2: old closed KBE as a fix index + +Run this phase only when Phase 1 finds no fix candidate: + +1. Search closed runtime KBEs across all dates using the same composite key. +2. Admit at most 10 unique issue candidates. Fully read every issue and relevant + comments. +3. Follow only explicit duplicate links, with at most 5 hops per chain and at + most 20 total issue reads for the signature. Missing or ambiguous links, + cycles, filtered reads, or a budget overrun stop for human review. +4. Use an old KBE only to discover verified fix provenance. It is not an active + KBE substitute and does not change the generic 90-day recurring-signature + policy. + +### Classify by effective fix presence + +- failing source lacks fix; target release now has it: historical failure, + already addressed; +- failing source and target release lack fix; main has it: release propagation + gap or backport candidate; +- failing source contains fix and still fails: post-fix recurrence; +- main also lacks fix: main fix needed; +- effective patch presence or applicability is ambiguous: human review. + +A complete zero-result fallback returns to the ordinary **new KBE needed** +decision with `no historical servicing evidence found`; it is not proof that no +older issue ever existed. Never invoke `/backport` automatically. + ## Result fields Report these independently because more than one can apply: @@ -71,6 +127,8 @@ Report these independently because more than one can apply: unclear - `recommendedAction`: none, correct matcher, request backport, fix main, investigate VMR sync, or human review +- `historicalLookupStatus`: not run, no evidence, fix found, old KBE indexed, + budget exceeded, ambiguous, or blocked Before recommending a backport, verify that the fix is a small targeted change for a security bug, regression, or reliability issue, consistent with the diff --git a/.github/workflows/ci-failure-scan.lock.yml b/.github/workflows/ci-failure-scan.lock.yml index e8f0598351af22..ed9977541eca67 100644 --- a/.github/workflows/ci-failure-scan.lock.yml +++ b/.github/workflows/ci-failure-scan.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"70eff27aa5105085acc90bc79351ce1bdfde87aac7b36edffe51677955af9796","body_hash":"8e0ad1a56cebe53256a4759c9aeafd44909c23330d5120ac045d0d932b44f329","compiler_version":"v1.0.1","strict":true,"agent_id":"copilot","agent_model":"gpt-6.1-sol","engine_versions":{"copilot":"1.0.103"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"70eff27aa5105085acc90bc79351ce1bdfde87aac7b36edffe51677955af9796","body_hash":"0cc11725eeac006f8665d0fb620ee3861119359fd3bfdc729eaae09926cfe7df","compiler_version":"v1.0.1","strict":true,"agent_id":"copilot","agent_model":"gpt-6.1-sol","engine_versions":{"copilot":"1.0.103"}} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_PAT_0","COPILOT_PAT_1","COPILOT_PAT_2","COPILOT_PAT_3","COPILOT_PAT_4","COPILOT_PAT_5","COPILOT_PAT_6","COPILOT_PAT_7","COPILOT_PAT_8","COPILOT_PAT_9","GH_AW_DEFAULT_OTLP_ENDPOINT","GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"9000827ccba6bdab643e8b6fd33ac0654aef8333","version":"v8.0.2"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"949feb2413d6458794dcd2491c4babbbce0c15c1","version":"v7.1.0"},{"repo":"actions/upload-artifact","sha":"cf430e030ddbb5b0abf93d22962f4752f3646cd9","version":"v7.0.2"},{"repo":"github/gh-aw-actions/setup","sha":"221ba4f4319de6b8e809d1a15528b3ae6a818aa5","version":"v1.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.29.0","digest":"sha256:b14bd399376180b5649a9324be3b50fbfc82bfe8f0c80045840416b5a4e65b96","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.29.0@sha256:b14bd399376180b5649a9324be3b50fbfc82bfe8f0c80045840416b5a4e65b96"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.29.0","digest":"sha256:baff00b856a4bdc93bce134928c70af3d3492f2e518757115042040674d56b0b","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.29.0@sha256:baff00b856a4bdc93bce134928c70af3d3492f2e518757115042040674d56b0b"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.29.0","digest":"sha256:6e0cbf7f980beb78b5461563a8164f6439ca959bc93733d5a6b52972e523ed50","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.29.0@sha256:6e0cbf7f980beb78b5461563a8164f6439ca959bc93733d5a6b52972e523ed50"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.5.0","digest":"sha256:d3544a4222e7efeeeb38669d8a1af0c72691c55b8f6506b15aa5920f7f31b7bc","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.5.0@sha256:d3544a4222e7efeeeb38669d8a1af0c72691c55b8f6506b15aa5920f7f31b7bc"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:11c2c544876cdbaffefe0f7f1283b74838c209654b4934a78e23ed11f750490f","pinned_image":"ghcr.io/github/gh-aw-node@sha256:11c2c544876cdbaffefe0f7f1283b74838c209654b4934a78e23ed11f750490f"}],"mcp_servers":[{"name":"github","tools":["issue_read","pull_request_read","search_pull_requests"]},{"name":"mcpscripts","tools":["search-kbe-issues"]},{"name":"safeoutputs","tools":["create_issue","noop","report_incomplete","report_missing_data","report_missing_tool"]}],"threat_detection":{"mode":"enabled"},"admission":false} # This file was automatically generated by gh-aw (v1.0.1). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # diff --git a/.github/workflows/ci-failure-scan.md b/.github/workflows/ci-failure-scan.md index 9b87db6fc241b5..4c6026067046a2 100644 --- a/.github/workflows/ci-failure-scan.md +++ b/.github/workflows/ci-failure-scan.md @@ -158,6 +158,11 @@ To suggest changes, edit this file or comment on the issues it files — the [`c The agent runs read-only. All writes go through `safe-outputs`. +This scheduled scanner is runtime-KBE-only. It does not invoke the optional +destination-routing or dnceng lookup sections in the shared KBE instructions, +and it cannot draft or publish issues in `dotnet/dnceng`. Continue to handle +infra-shaped noise through the existing scanner skip and tally rules. + ## Hard rules — non-negotiable 1. **All writes via `safe-outputs`.** No `issues: write`, no `contents: write`. Don't try to use `gh` to write. The only output is `create_issue`. diff --git a/.github/workflows/shared/create-kbe.instructions.md b/.github/workflows/shared/create-kbe.instructions.md index 78c6eb7a38ee6a..1bf4a9663fa636 100644 --- a/.github/workflows/shared/create-kbe.instructions.md +++ b/.github/workflows/shared/create-kbe.instructions.md @@ -82,11 +82,22 @@ If the candidate may contain a security issue, stop public KBE processing and report the required private escalation path. Do not create a GitHub issue, AzDO work item, comment, or public draft. -For a runtime repository candidate, continue with -[Search for an existing KBE](#search-for-an-existing-kbe). +Before routing any candidate to dnceng, run the normal runtime KBE lookup, +including open and recently closed KBEs, plain trackers, and existing PRs. This +preserves the previous behavior for pipelines excluded from Build Analysis: -For an infrastructure candidate or infrastructure review, run the dnceng lookup -below before selecting any creation action. +- if a verified open runtime KBE matches, report or reuse it and do not create a + dnceng issue unless an explicit migration was requested; +- if only a plain tracker matches, retain it as cross-link context but continue + destination and KBE eligibility analysis because it is not a KBE substitute; +- if the runtime lookup is blocked or inconclusive, stop for human review rather + than creating a dnceng issue. + +For a runtime repository candidate, continue with the normal runtime lookup and +classification. + +For an infrastructure candidate or infrastructure review with no matching open +runtime KBE, run the dnceng lookup below before selecting any creation action. @@ -99,8 +110,8 @@ Read the current authoritative sources before classifying a dnceng result: - Arcade `Documentation/Build Analysis/KnownIssues.md` - dnceng `Documentation/TeamProcess/DevGuide/IssueTrackingGuidance.md` -Search open and recent closed `dotnet/dnceng` issues using progressively -narrowed combinations of: +Search open and closed `dotnet/dnceng` issues using progressively narrowed +combinations of: 1. the full stable error signature, 2. assertion, exception, or task error text, @@ -110,6 +121,16 @@ narrowed combinations of: 5. build leg and originating repository, 6. relevant service or package-feed name. +For closed `dotnet/dnceng` issues, use the following windows: + +- The normal closed dnceng search uses `closed:>=<30-days-ago>`. +- After that misses, widen to `closed:>=<90-days-ago>` only when checking a + suspected recurrence with the same stable signature. Do not use a test stem, + generic exception, or task name alone for the widened search. +- Do not run an unbounded dnceng history search from this shared flow. Older + infrastructure history requires explicit human review or separate, + caller-specific guidance. + Preserve complete search responses and inspect every plausible issue body and relevant comments. A failed, filtered, incomplete, ambiguous, or unreadable lookup is not an empty result: classify it as `dnceng-lookup-blocked` and do not From f4b678acd3bb77ce045d6b4c2035750cbf940269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viviana=20Due=C3=B1as=20Chavez?= Date: Wed, 25 Nov 2026 06:08:42 -0800 Subject: [PATCH 4/4] Update dnceng Known Build Error form reference Point dnceng KBE drafting at the current known-build-error.yml issue form so fail-closed form validation no longer blocks the infrastructure path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 17757b0e-9837-4682-8c2b-2789d4de4019 --- .github/skills/create-dnceng-kbe/SKILL.md | 2 +- .github/workflows/shared/create-kbe.instructions.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/skills/create-dnceng-kbe/SKILL.md b/.github/skills/create-dnceng-kbe/SKILL.md index d5e595bb35fc38..d791e77a99d806 100644 --- a/.github/skills/create-dnceng-kbe/SKILL.md +++ b/.github/skills/create-dnceng-kbe/SKILL.md @@ -18,7 +18,7 @@ is warranted or whether the result should be draft-only or live. Read the current versions of these sources before drafting: -1. [dnceng infrastructure Known Issue form](https://github.com/dotnet/dnceng/blob/main/.github/ISSUE_TEMPLATE/z-build-break-infrastructure-issue-template.yml) +1. [dnceng Known Build Error form](https://github.com/dotnet/dnceng/blob/main/.github/ISSUE_TEMPLATE/known-build-error.yml) 2. [Arcade Known Issues guidance](https://github.com/dotnet/arcade/blob/main/Documentation/Build%20Analysis/KnownIssues.md) 3. [Arcade Known Issue JSON steps](https://github.com/dotnet/arcade/blob/main/Documentation/Build%20Analysis/KnownIssueJsonStepByStep.md) 4. [dnceng issue tracking guidance](https://github.com/dotnet/dnceng/blob/main/Documentation/TeamProcess/DevGuide/IssueTrackingGuidance.md) diff --git a/.github/workflows/shared/create-kbe.instructions.md b/.github/workflows/shared/create-kbe.instructions.md index 1bf4a9663fa636..636f1dc4c6d60b 100644 --- a/.github/workflows/shared/create-kbe.instructions.md +++ b/.github/workflows/shared/create-kbe.instructions.md @@ -105,8 +105,8 @@ runtime KBE, run the dnceng lookup below before selecting any creation action. Read the current authoritative sources before classifying a dnceng result: -- `dotnet/dnceng` infrastructure Known Issue form: - `.github/ISSUE_TEMPLATE/z-build-break-infrastructure-issue-template.yml` +- `dotnet/dnceng` Known Build Error form: + `.github/ISSUE_TEMPLATE/known-build-error.yml` - Arcade `Documentation/Build Analysis/KnownIssues.md` - dnceng `Documentation/TeamProcess/DevGuide/IssueTrackingGuidance.md`