Skip to content

Harden vally comparison reliability - #887

Merged
AbhitejJohn merged 3 commits into
mainfrom
artl93-plan-perf-skill-reliability
Jul 17, 2026
Merged

AbhitejJohn merged 3 commits into
mainfrom
artl93-plan-perf-skill-reliability

Conversation

@artl93

@artl93 artl93 commented Jul 15, 2026 •

Copy link
Copy Markdown
Member

Summary

  • retry vally compare once when its report contains comparison-judge errors, keeping the result with fewer errors
  • preserve unmatched baseline/treatment trajectories and mark degraded reports as inconclusive
  • render inconclusive shadow results as warnings instead of skill failures
  • document failure classification and add focused adapter tests

The investigation confirmed the reported analyzing-dotnet-performance failure was a transient comparison timeout, while baseline agent timeouts were silently omitted as unmatched treatment trajectories. No skill, fixture, or eval content changes are needed.

Validation

  • node --check eng/vally-adapter/adapt.mjs
  • node --test eng/vally-adapter/adapt.test.mjs
  • dotnet run --project eng/skill-validator/src/SkillValidator.csproj -- check --plugin ./plugins/dotnet-diag
  • actionlint -shellcheck= -pyflakes= for all hand-authored workflows
  • replayed the captured Sonnet comparison data and confirmed three unmatched trajectories produce an inconclusive warning
  • reran the affected analyzing-dotnet-performance Sonnet 4.6 experiment locally with five workers: 18 of 22 trials succeeded and four baseline trials timed out at session.idle after 180 seconds; all 11 skilled trials completed. The updated adapter emitted conclusive: false, erroredCount: 0, and four named unmatched treatment trajectories rather than treating the seven matched comparisons as a complete result.

This validates the adapter’s containment behavior. The recurring baseline executor timeout remains an upstream Vally reliability issue.

Upstream tracking

Fixes #885

Quality and overfitting improvements remain separate in #886.

Retry transient comparison errors once, surface unmatched trajectories, and mark degraded reports as inconclusive.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 33efeadb-dcc9-4005-a63f-c5d832b06f45
Copilot AI review requested due to automatic review settings July 15, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the “vally shadow evaluation” path by making comparison results more reliable (retrying transient judge errors) and more explicit (surfacing unmatched trajectories), and updates CI rendering + documentation so inconclusive comparisons don’t look like skill regressions.

Changes:

  • Add a one-time retry for vally compare when the report contains errored trials, preferring the retry result if it reduces errors.
  • Preserve and report unmatched baseline/treatment trajectories, and classify affected verdicts as inconclusive (cannot pass).
  • Render inconclusive shadow results as warnings in the GitHub Actions summary, and document how to interpret these reliability signals; add focused adapter tests.
Show a summary per file
File Description
eng/vally-adapter/adapt.test.mjs Adds node-based tests for retry behavior and unmatched trajectory surfacing.
eng/vally-adapter/adapt.mjs Implements retry logic, adds conclusive + unmatched fields to verdicts, and adjusts pass/fail + summary icon behavior.
eng/skill-validator/src/docs/InvestigatingResults.md Documents how to interpret erroredCount, unmatched trajectories, and conclusive in vally shadow verdicts.
.github/workflows/vally-evaluation.yml Updates shadow-results summary rendering to show inconclusive verdicts as warnings.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/4 changed files
  • Comments generated: 0

@artl93
artl93 marked this pull request as draft July 15, 2026 22:18
@artl93
artl93 requested a review from Copilot July 16, 2026 08:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 3

Comment thread eng/vally-adapter/adapt.test.mjs Resolved
Comment thread .github/workflows/vally-evaluation.yml Resolved
@artl93

artl93 commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

Targeted Sonnet validation

I reran analyzing-dotnet-performance locally with the affected executor (claude-sonnet-4.6), claude-opus-4.8 as judge, one run per scenario, and five workers—the same concurrency used in CI.

  • 18 of 22 trials succeeded.
  • All 11 skilled trials completed.
  • Four baseline trials timed out with Timeout after 180000ms waiting for session.idle.
  • The four affected stimuli were Detects Aggregate+Replace chain and struct missing IEquatable, Detects compiled regex startup budget and regex chain allocations, Finds StringComparison.Ordinal missing and FrozenDictionary opportunities, and Identifies unsealed leaf classes and locale hierarchy patterns.
  • vally compare had zero judge errors.
  • The updated adapter emitted conclusive: false, passed: false, erroredCount: 0, and unmatchedTrialCount: 4, naming every unmatched treatment trajectory.

This reproduces the upstream baseline executor reliability problem and validates this PR’s containment behavior: the seven matched comparisons are no longer presented as a complete skill verdict.

Harden test diagnostics, pass workflow paths as arguments, and clarify the shadow-result schema.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 33efeadb-dcc9-4005-a63f-c5d832b06f45
@artl93
artl93 marked this pull request as ready for review July 16, 2026 09:32
Copilot AI review requested due to automatic review settings July 16, 2026 09:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new

@github-actions github-actions Bot added the pr-state/ready-for-eval PR is mergeable and awaiting evaluation label Jul 16, 2026
github-actions Bot added a commit that referenced this pull request Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Skill Validation Results

Skill Scenario Quality Skills Loaded Overfit Verdict
setup-local-sdk Basic local SDK setup with .NET 11 preview 3.0/5 → 5.0/5 🟢 ✅ setup-local-sdk; tools: skill, create / ✅ setup-local-sdk; tools: skill 🟡 0.21 ✅
setup-local-sdk Install a specific SDK version locally 3.0/5 → 5.0/5 🟢 ✅ setup-local-sdk; tools: skill 🟡 0.21 ✅
setup-local-sdk Set up local SDK with MAUI workload 4.0/5 → 5.0/5 🟢 ✅ setup-local-sdk; tools: skill, create / ✅ setup-local-sdk; tools: skill 🟡 0.21 ✅
setup-local-sdk Create team install scripts 4.0/5 → 5.0/5 🟢 ✅ setup-local-sdk; tools: skill, edit 🟡 0.21 ✅
setup-local-sdk Detect incompatible .NET host version 1.0/5 → 5.0/5 🟢 ✅ setup-local-sdk; tools: skill, report_intent / ✅ setup-local-sdk; tools: skill 🟡 0.21 ✅
dotnet-pinvoke Generate LibraryImport declaration from C header (.NET 8+) 5.0/5 → 5.0/5 ✅ dotnet-pinvoke; tools: skill ✅ 0.11 ✅
dotnet-pinvoke Generate LibraryImport declaration from C header (.NET Framework) 5.0/5 → 5.0/5 ✅ dotnet-pinvoke; tools: skill ✅ 0.11 ✅
nuget-trusted-publishing Set up trusted publishing for a new NuGet library 3.0/5 → 4.0/5 🟢 ✅ nuget-trusted-publishing; tools: skill ✅ 0.18 ✅
nuget-trusted-publishing Set up NuGet publishing without mentioning trusted publishing 3.0/5 → 5.0/5 🟢 ✅ nuget-trusted-publishing; tools: skill, report_intent, view ✅ 0.18 ✅
nuget-trusted-publishing Migrate existing workflow from API key to trusted publishing 3.0/5 → 4.0/5 🟢 ✅ nuget-trusted-publishing; tools: skill, report_intent, glob ✅ 0.18 ✅
csharp-scripts Avoid activating for language-agnostic calendar script 5.0/5 → 3.0/5 🔴 ✅ csharp-scripts; tools: skill, create / ✅ csharp-scripts; tools: skill 🟡 0.27 ❌
csharp-scripts Test a C# language feature with a file-based app 3.0/5 → 5.0/5 🟢 ✅ csharp-scripts; tools: skill, create / ✅ csharp-scripts; tools: skill, create, edit 🟡 0.27 ✅
csharp-scripts Compose a file-based app from helper files 5.0/5 → 5.0/5 ⚠️ NOT ACTIVATED 🟡 0.27 ❌ [1]

[1] (Isolated) Quality unchanged but weighted score is -0.5% due to: efficiency metrics

Model: claude-opus-4.6 | Judge: claude-opus-4.6

🔍 Full Results - additional metrics and failure investigation steps

To investigate failures, paste this to your AI coding agent:

For PR 887 in dotnet/skills, download eval artifacts with gh run download 29489275577 --repo dotnet/skills --pattern "skill-validator-results-*" --dir ./eval-results, then fetch https://raw.githubusercontent.com/dotnet/skills/f985aabc36aa18b65ffc9018214c1df65299cb00/eng/skill-validator/src/docs/InvestigatingResults.md and follow it to analyze the results.json files. Diagnose each failure, suggest fixes to the eval.yaml and skill content, and tell me what to fix first.

▶ Sessions Visualisation -- interactive replay of all evaluation sessions
📊 Session Analytics (preview) -- aggregated metrics across evaluation sessions

@github-actions github-actions Bot added waiting-on-review PR state label and removed pr-state/ready-for-eval PR is mergeable and awaiting evaluation labels Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Evaluation passed for f985aab. cc @ViktorHofer @JanKrivanek — please review.

@github-actions github-actions Bot added waiting-on-author PR state label and removed waiting-on-review PR state label labels Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 @artl93 — this PR has 1 unresolved review thread(s). When you're ready, please address the feedback and push an update; the triage bot will pick up the next state automatically. (Add the no-stale label to silence further pings.)

Keep shadow evaluation reliability documentation with its implementation.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 33efeadb-dcc9-4005-a63f-c5d832b06f45
Copilot AI review requested due to automatic review settings July 17, 2026 18:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new

@github-actions github-actions Bot added pr-state/ready-for-eval PR is mergeable and awaiting evaluation and removed waiting-on-author PR state label labels Jul 17, 2026
github-actions Bot added a commit that referenced this pull request Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Skill Validation Results

Skill Scenario Quality Skills Loaded Overfit Verdict
optimizing-ef-core-queries Optimize bulk operations with EF Core 7+ ExecuteUpdate and ExecuteDelete 5.0/5 → 5.0/5 ⚠️ NOT ACTIVATED 🟡 0.28 ❌
system-text-json-net11 Serialize JSON in .NET 11 with PascalCase property names 5.0/5 → 1.0/5 ⏰ 🔴 ✅ system-text-json-net11; tools: skill, read_bash / ✅ system-text-json-net11; tools: skill ✅ 0.08 ❌
system-text-json-net11 Type-safe JsonTypeInfo access without exceptions in .NET 11 3.0/5 → 5.0/5 🟢 ✅ system-text-json-net11; tools: skill, edit, view / ✅ system-text-json-net11; tools: skill, glob, edit, view ✅ 0.08 ✅
system-text-json-net11 Non-activation: camelCase JSON serialization on .NET 8 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.08 ❌ [1]

[1] (Isolated) Quality unchanged but weighted score is -0.0% due to: efficiency metrics

⏰ timeout — run(s) hit the (180s) scenario timeout limit; scoring may be impacted by aborting model execution before it could produce its full output (increase via timeout in eval.yaml)

Model: claude-opus-4.6 | Judge: claude-opus-4.6

🔍 Full Results - additional metrics and failure investigation steps

To investigate failures, paste this to your AI coding agent:

For PR 887 in dotnet/skills, download eval artifacts with gh run download 29604624626 --repo dotnet/skills --pattern "skill-validator-results-*" --dir ./eval-results, then fetch https://raw.githubusercontent.com/dotnet/skills/5bcd91ec1d20dbc6fb3717a31d81e69d00a1fda3/eng/skill-validator/src/docs/InvestigatingResults.md and follow it to analyze the results.json files. Diagnose each failure, suggest fixes to the eval.yaml and skill content, and tell me what to fix first.

▶ Sessions Visualisation -- interactive replay of all evaluation sessions
📊 Session Analytics (preview) -- aggregated metrics across evaluation sessions

@github-actions github-actions Bot added waiting-on-review PR state label and removed pr-state/ready-for-eval PR is mergeable and awaiting evaluation labels Jul 17, 2026
@artl93
artl93 requested a review from AbhitejJohn July 17, 2026 20:24
@AbhitejJohn
AbhitejJohn merged commit ab72985 into main Jul 17, 2026
37 checks passed
@AbhitejJohn
AbhitejJohn deleted the artl93-plan-perf-skill-reliability branch July 17, 2026 21:18
AbhitejJohn added a commit that referenced this pull request Jul 20, 2026
Collapses the parallel skill-validator + Vally eval pipeline into a single
Vally-only path while preserving every capability skill-validator provided:
PR gate, PR comment, dotnet/skills-data historical push, and the dashboard.
The skill-validator `check` linter is retained (skill-check.yml) pending
microsoft/vally #463.

- evaluation.yml: delete build-validator and the skill-validator `evaluate`
  job; single `evaluate:` job now uses vally-evaluation.yml. Forward the
  COPILOT_PAT_0..9 pool onto it (from #911) so the reusable workflow's token
  gate is satisfied. Rewire comment-on-pr / report-status / publish-* /
  deploy-dashboard onto `evaluate` and vally-results-* artifacts.
- vally-evaluation.yml: pin @microsoft/[email protected]; keep the #911 prepare
  guard; write the generated per-plugin experiment to $GITHUB_WORKSPACE so
  relative eval globs resolve.
- adapt.mjs: reconcile #887's runCompareWithRetry + conclusive/unmatched
  hardening with the consolidation helpers (nonActivation, compareByStim,
  roleToDashboard, etc.). Add consolidate.mjs and gen-experiment.mjs.
- build-replay-sessions.ps1: read Vally executor-session-logs/events.jsonl
  instead of skill-validator session output.
- Rename all tests/*/*/eval.vally.yaml to eval.yaml (Vally format is now the
  only eval format); author Vally evals for the four skills that lacked one.
- CONTRIBUTING.md + InvestigatingResults: point contributors at the Vally
  harness; drop non-public links.

Co-authored-by: Copilot <[email protected]>
AbhitejJohn added a commit that referenced this pull request Jul 21, 2026
* Make Vally the sole LLM eval engine, retiring skill-validator evaluate

Collapses the parallel skill-validator + Vally eval pipeline into a single
Vally-only path while preserving every capability skill-validator provided:
PR gate, PR comment, dotnet/skills-data historical push, and the dashboard.
The skill-validator `check` linter is retained (skill-check.yml) pending
microsoft/vally #463.

- evaluation.yml: delete build-validator and the skill-validator `evaluate`
  job; single `evaluate:` job now uses vally-evaluation.yml. Forward the
  COPILOT_PAT_0..9 pool onto it (from #911) so the reusable workflow's token
  gate is satisfied. Rewire comment-on-pr / report-status / publish-* /
  deploy-dashboard onto `evaluate` and vally-results-* artifacts.
- vally-evaluation.yml: pin @microsoft/[email protected]; keep the #911 prepare
  guard; write the generated per-plugin experiment to $GITHUB_WORKSPACE so
  relative eval globs resolve.
- adapt.mjs: reconcile #887's runCompareWithRetry + conclusive/unmatched
  hardening with the consolidation helpers (nonActivation, compareByStim,
  roleToDashboard, etc.). Add consolidate.mjs and gen-experiment.mjs.
- build-replay-sessions.ps1: read Vally executor-session-logs/events.jsonl
  instead of skill-validator session output.
- Rename all tests/*/*/eval.vally.yaml to eval.yaml (Vally format is now the
  only eval format); author Vally evals for the four skills that lacked one.
- CONTRIBUTING.md + InvestigatingResults: point contributors at the Vally
  harness; drop non-public links.

Co-authored-by: Copilot <[email protected]>

* Fix setup-local-sdk eval for Vally schema

The hand-authored setup-local-sdk eval used skill-validator grader/environment
schema that Vally rejects at validation (no stimuli executed):
- file-contains/file-not-contains graders require 'value:' not 'substring:'
  (output-contains correctly keeps 'substring:').
- environment.files entries require 'src:'/'dest:' (copy a fixture) rather than
  inline 'path:'/'content:'. Moved the global.json body into fixtures/global.json.

Verified with 'vally lint --eval-spec' (0 errors) across all 97 eval.yaml.

Co-authored-by: Copilot <[email protected]>

* Fix markdownlint violations in migration docs

Co-authored-by: Copilot <[email protected]>

* Address PR review feedback on eval migration

- Consolidate run-vally-evals.sh into a single neutral entrypoint
  eng/run-skill-evals.sh (deletes the thin wrapper; adapt.mjs stays in
  eng/vally-adapter/ since CI invokes it directly)
- Rename reusable workflow vally-evaluation.yml -> evaluation-run.yml and
  update all references/self-trigger regexes
- Rename local output dir vally-results -> eval-results
- Bake prerequisite preflight (Node 20+, GITHUB_TOKEN/gh) into the runner
- Simplify CONTRIBUTING "Running tests locally" prerequisites
- Scrub harness name from consumer-facing surfaces

Co-authored-by: Copilot <[email protected]>

* Reinstate overfitting detection under the Vally harness

Overfitting detection previously ran inside skill-validator's `evaluate`
command, which the Vally migration replaced, so it silently stopped running.
Reinstate it as a standalone step wired into the Vally pipeline:

- Add `skill-validator overfitting` command that discovers skills, parses
  each eval.yaml, runs the existing OverfittingJudge, and emits
  [{plugin, skill, overfittingResult}] JSON (per-skill failures non-fatal,
  bounded parallelism).
- Add a Vally-format parser bridge (ParseEvalConfigFlexible) so the judge
  handles the current stimuli/graders eval.yaml format; the legacy
  scenarios-only parser rejected all 98 evals, so the judge never ran.
- adapt.mjs: merge overfitting results onto each verdict via
  --overfitting <file> (keyed by plugin/skill); output is byte-identical
  when the flag is absent.
- evaluation-run.yml: build skill-validator (shared cache with check),
  run the judge per leg reading GITHUB_TOKEN, and pass --overfitting to
  adapt.mjs so the dashboard/skills-data consume it unchanged.

Co-authored-by: Copilot <[email protected]>

* Reconcile #919 Vally eval configs into the sole eval.yaml convention

PR #919 landed on main adding fresh Vally specs for three coverage-gap
skills (setup-local-sdk, convert-blazor-server-to-webapp, dotnet-webapi)
under the interim eval.vally.yaml filename. This branch collapses to a
single Vally spec named eval.yaml, so the merge left each skill with both
my migrated eval.yaml and #919's newer eval.vally.yaml (a git-clean but
semantic duplicate the pipeline would not discover).

Adopt #919's reviewed Vally content as the canonical eval.yaml for all
three skills and drop the redundant eval.vally.yaml files, preserving the
'sole eval.yaml, zero eval.vally.yaml' invariant. Content is byte-identical
to #919's blobs (b14121c / 47d4382 / 18a9362), which already passed
vally-evaluate on main.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-review PR state label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve vally reliability for transient comparison and unmatched trial timeouts

3 participants