Repository navigation
[ci-scan] Add evaluation infrastructure for the CI failure agentic workflows - #130087
Conversation
…rkflows Stand up an on-demand Vally eval harness for the ci-failure-scan, ci-failure-fix, and ci-failure-scan-feedback workflows. A maintainer runs it from a PR comment to check whether a prompt change or model switch keeps the output good before merging. Each spec runs the prompt against a staged offline fixture and grades the artifact with static regex checks plus binary LLM-judge dimensions at a 0.7 threshold. Comparison against scraped ground truth is left as a follow-up; this iteration only sets up the harness, spec layout, and fixture slots. Co-authored-by: Copilot <[email protected]>
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
There was a problem hiding this comment.
Pull request overview
Adds an on-demand GitHub Actions harness plus Vally eval specs to evaluate the three CI outer-loop agent workflows (scan / fix / feedback) against offline fixtures, producing a pass/fail report comment on the triggering PR.
Changes:
- Adds
ci-eval.yml, anissue_comment-triggered workflow that selects eval specs from/ci-* evalcommands, runsvally lint+vally eval, and posts/updates a single report comment. - Adds three Vally eval specs defining fixture staging, prompts, and graders for scan/fix/feedback.
- Adds Vally config + ignore rules, and placeholder fixture directories.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/ci-eval.yml | New slash-command-driven eval runner workflow that executes Vally and posts a report comment back to the PR. |
| .github/workflows/evals/ci-failure-scan.eval.yaml | Vally eval spec for the scanner workflow prompt + graders (file regex + LLM judges). |
| .github/workflows/evals/ci-failure-fix.eval.yaml | Vally eval spec for the fixer workflow prompt + graders enforcing tier policy and “no muting”. |
| .github/workflows/evals/ci-failure-scan-feedback.eval.yaml | Vally eval spec for the feedback/KPI tracker regeneration prompt + graders for grounding/completeness. |
| .github/workflows/evals/.vally.yaml | Vally configuration pointing at the eval spec directory and filename pattern. |
| .github/workflows/evals/.gitignore | Ignores Vally workspaces/output directories produced by local runs. |
| .github/workflows/evals/fixtures/scan/.gitkeep | Placeholder to ensure the scan fixture directory exists in-repo. |
| .github/workflows/evals/fixtures/fix/.gitkeep | Placeholder to ensure the fix fixture directory exists in-repo. |
| .github/workflows/evals/fixtures/feedback/.gitkeep | Placeholder to ensure the feedback fixture directory exists in-repo. |
Copilot's findings
- Files reviewed: 6/9 changed files
- Comments generated: 2
…bump - ci-eval.yml: grant issues:write (needed to post the report comment and reaction) and reduce pull-requests to read; paginate listComments so the sticky marker comment is found on busy PRs instead of posting duplicates. - eval specs: move judge_model/model from the discontinued claude-opus-4.6 to claude-opus-4.8. Co-authored-by: Copilot <[email protected]>
The ci-failure-* gh-aw workflows already authenticate the Copilot CLI engine with secrets.COPILOT_GITHUB_TOKEN, which is configured in the repo. Vally's executor reads the same COPILOT_GITHUB_TOKEN, so drop the invented COPILOT_EVAL_TOKEN and reuse the existing secret; no new secret is needed to run the eval. Co-authored-by: Copilot <[email protected]>
Add a pat_pool job that picks a random non-empty COPILOT_PAT_0..9 entry, and select the token in the eval job via a chained-ternary on the pool output, falling back to COPILOT_GITHUB_TOKEN. This mirrors the token rotation the gh-aw ci-failure-* workflows use (their compiled case() expression), spreading eval runs across the same pooled Copilot PATs. Co-authored-by: Copilot <[email protected]>
Pin the harness to @microsoft/[email protected] for reproducibility, and write workspaces/outputs/logs/report under $RUNNER_TEMP instead of the repo root so eval runs never leave untracked directories behind. Co-authored-by: Copilot <[email protected]>
Rewrite the three Vally specs to be self-contained: each runs the real workflow prompt as the agent against a small inline scenario and grades the emitted safe-output, with no recorded fixtures or network access. - ci-failure-scan: check the KBE against the static Known Build Error format (title, labels, sections, single json signature, match marker). - ci-failure-fix: check it created a fix PR or engaged owners. - ci-failure-scan-feedback: LLM judge that the feedback is constructive. Drop the empty fixtures directories and add a README describing the harness. All three verified end-to-end at 100% with a live agent. Co-authored-by: Copilot <[email protected]>
- Refuse to run on fork-head PRs before checkout: the eval runs untrusted PR content with a Copilot token, so restrict it to same-repo branches. - Always post a report; on a refused/skipped run explain why instead of only reacting with an eyes emoji. - Match the slash commands exactly or when followed by whitespace so '/ci-evaluate' no longer triggers the workflow. Co-authored-by: Copilot <[email protected]>
Vally averages grader scores, so a mis-scoring LLM judge can let a malformed output pass. Make the format guards strict: - ci-failure-scan: anchor the Labels grader to the full line so it requires exactly 'Known Build Error' plus exactly one blocking label. - ci-failure-fix: add a file-not-matches guard rejecting an output that declares both 'Type: create-pull-request' and 'Type: add-comment'. Co-authored-by: Copilot <[email protected]>
Rewrite the three eval specs from static inline scenarios to dynamic, live runs: the agent discovers a real, currently-failing outer-loop build (anonymous dnceng-public AzDO REST) or a real open Known Build Error / fixer PR (via gh), then emits the safe-output it would produce. Graders check the static safe-output format plus tool-calls evidence that the agent actually engaged live data, with LLM judges for conformance/behavior/constructiveness. Export GH_TOKEN (github.token) on the eval step so the agent's gh and AzDO discovery authenticate, and give the eval job a 120-minute timeout for the longer live runs. Update the evals README to describe the live approach. Co-authored-by: Copilot <[email protected]>
Drop the explanatory parentheses, colons, em dashes, and slashes from the prompt and description text in the three specs and the README, and rephrase into plain sentences. Leaves the format-bearing punctuation intact, including the Title, Type, Labels, and Linked KBE output tokens, the gh and curl commands, the URL paths, and the grader regexes. Co-authored-by: Copilot <[email protected]>
Local end-to-end resultsI ran all three specs end to end on my machine with the
The runs are live, so exact discoveries vary with what is failing at eval time. The fact that all 3 scored 100% indicates that the graders are too simple and need ground-truth scripts to check safe outputs against all failures. For simplicity, I'm introducing the infra now with simple graders, and will follow up with scraper scripts. |
The fix-or-engages-owners and is-constructive judges listed explicit fail conditions and then ended with "Otherwise fail.", which reads as a catch-all that fails even when the pass conditions hold. Drop the redundant trailing sentence so the rubric matches its intent. No grading behavior change. Co-authored-by: Copilot <[email protected]>
vitek-karas
left a comment
There was a problem hiding this comment.
Looks great as a starting point. Let's get this in.
Co-authored-by: Copilot <[email protected]> Copilot-Session: 8871f8da-e894-43e2-8c85-214b4df969fd
Co-authored-by: Copilot <[email protected]> Copilot-Session: 8871f8da-e894-43e2-8c85-214b4df969fd
vitek-karas
left a comment
There was a problem hiding this comment.
Just curious - the guard against the PR changing the eval harness. If we require human review for everything, does that really matter? Basically if the PR contains changes to the eval pipeline, then the results of that eval are "suspect" anyway.
|
I added it assuming that future iterations will use copilot mostly, to prevent it from weakening the evaluator to achieve a better score. You are right that it isn't needed when we have human in the loop. |
|
I'm not against it - in fact I would argue that ideally all actions which run on PRs should have this protection in them (ideally GitHub would have built-in functionality for this). I did some search on this - but it is apparently pretty complicated to do this (and no really built-in-way). |
…rkflows (#130087) ## Description This PR stands up the infrastructure for evaluating the three CI outer-loop agentic workflows, `ci-failure-scan`, `ci-failure-fix`, and `ci-failure-scan-feedback`, using [Vally](https://microsoft.github.io/vally/). It does not change the workflows themselves and does not wire the eval into required CI. It adds a harness a maintainer runs on demand by commenting `/ci-scan eval`, `/ci-fix eval`, `/ci-feedback eval`, or `/ci-eval` on a PR, at which point `ci-eval.yml` checks out the PR head, runs the affected Vally spec through the Copilot-SDK executor, and posts a single pass or fail report back. Each spec runs the real workflow prompt as the agent against a live task, where the agent discovers current data itself. The scanner queries the dnceng-public AzDO REST API for a real failing outer-loop build on main, extracts a signature, and emits a Known Build Error that is graded against the static KBE format and for tool-call evidence that it actually fetched a real build and searched existing KBEs. The fixer finds a real open Known Build Error, then either emits a fix PR shape with a real diff or hands off to owners, and is checked to never mute a test. The feedback workflow scans real recent scanner issues and fixer PRs and is judged to produce grounded, quantified, constructive feedback. Grading mixes cheap deterministic format checks with a few binary LLM judges at a 0.7 threshold, so a single grader can miss without failing the run. These are format and behavior gates, not ground-truth measurements, and the follow-up that compares what the workflows generate against the failures and KBEs that actually exist is deferred to a later iteration. --------- Co-authored-by: Milos Kotlar <[email protected]> Co-authored-by: Copilot <[email protected]>
Description
This PR stands up the infrastructure for evaluating the three CI outer-loop agentic workflows,
ci-failure-scan,ci-failure-fix, andci-failure-scan-feedback, using Vally. It does not change the workflows themselves and does not wire the eval into required CI. It adds a harness a maintainer runs on demand by commenting/ci-scan eval,/ci-fix eval,/ci-feedback eval, or/ci-evalon a PR, at which pointci-eval.ymlchecks out the PR head, runs the affected Vally spec through the Copilot-SDK executor, and posts a single pass or fail report back.Each spec runs the real workflow prompt as the agent against a live task, where the agent discovers current data itself. The scanner queries the dnceng-public AzDO REST API for a real failing outer-loop build on main, extracts a signature, and emits a Known Build Error that is graded against the static KBE format and for tool-call evidence that it actually fetched a real build and searched existing KBEs.
The fixer finds a real open Known Build Error, then either emits a fix PR shape with a real diff or hands off to owners, and is checked to never mute a test.
The feedback workflow scans real recent scanner issues and fixer PRs and is judged to produce grounded, quantified, constructive feedback. Grading mixes cheap deterministic format checks with a few binary LLM judges at a 0.7 threshold, so a single grader can miss without failing the run.
These are format and behavior gates, not ground-truth measurements, and the follow-up that compares what the workflows generate against the failures and KBEs that actually exist is deferred to a later iteration.