Vally harness and CI workflow updates - #380
Merged
Merged
Conversation
Split from #375: harness output capture and runner updates, new copilot-client tests, and CI workflow updates (rename vally-evaluation to run-vally-evaluations, test-harness tweaks, actions-lock). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9429ad33-6f31-4ec5-ba00-0f11b5afb82e
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Vally test harness to capture richer generation output (including raw model responses) and to better handle Copilot generation failures, while also adjusting CI workflows to run Vally evaluations under updated tooling/permissions.
Changes:
- Extend harness result types and reporting to include
rawResponsefrom generation. - Add Copilot generation retry/error-classification logic and improve runner error output behavior (especially for JSON output).
- Update GitHub Actions workflows for harness link-sync checks and Vally evaluation execution (renamed workflow, updated Node/Vally versions, permissions, and PR scoping).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/harness/types.ts | Adds rawResponse to evaluation results and updates defaults/signatures. |
| tests/harness/runner.ts | Captures rawResponse, adds generation failure findings/suggestions, and adds JSON error output helpers. |
| tests/harness/ralph-loop.test.ts | Updates mocks/tests to satisfy the new rawResponse field and formatting changes. |
| tests/harness/copilot-client.ts | Adds typed Copilot generation errors, retry/backoff, configurable timeout/retries, and improved code extraction heuristics. |
| tests/harness/copilot-client.test.ts | Adds unit tests for extractCode and classifyCopilotError. |
| .github/workflows/test-harness.yml | Expands skill link sync verification to include Python in addition to Rust. |
| .github/workflows/run-vally-evaluations.yml | Renames/updates the Vally workflow, updates tool versions, permissions, and PR scoping behavior. |
| .github/aw/actions-lock.json | Adds a locked entry for github/gh-aw-actions/setup@v0.81.6. |
Comment on lines
+347
to
351
| if (s && typeof s.disconnect === "function") { | ||
| await s.disconnect(); | ||
| } else if (typeof s.destroy === "function") { | ||
| } else if (s && typeof s.destroy === "function") { | ||
| await s.destroy(); | ||
| } |
Comment on lines
+879
to
+899
| function classifyCliError(error: unknown): CliErrorKind { | ||
| if (error instanceof CopilotGenerationError) { | ||
| return error.kind; | ||
| } | ||
|
|
||
| const message = error instanceof Error ? error.message.toLowerCase() : ""; | ||
| if ( | ||
| message.includes("authentication failed") || | ||
| message.includes("bad credentials") || | ||
| message.includes("401") | ||
| ) { | ||
| return "auth"; | ||
| } | ||
| if (message.includes("timeout") || message.includes("session.idle")) { | ||
| return "timeout"; | ||
| } | ||
| if (message.includes("rate limit") || message.includes("429")) { | ||
| return "transient"; | ||
| } | ||
| return "fatal"; | ||
| } |
This was referenced Jul 15, 2026
Member
Author
This was referenced Jul 15, 2026
richardpark-msft
left a comment
Member
There was a problem hiding this comment.
Bringing over some comments to this PR.
LarryOsterman
added a commit
that referenced
this pull request
Jul 22, 2026
The file was removed on this split branch under the assumption it belonged only to PR #380, but #380 already merged it into main unchanged. Since the merge-base copy matched main, merging this branch would have deleted the file from main. Restoring it to main's version so this branch carries it through untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
LarryOsterman
added a commit
that referenced
this pull request
Jul 28, 2026
…383) * Add Vally skill-effectiveness experiments and Python test scenarios Split from #375: adds the Vally skill-effectiveness experiment framework (run-skill-experiments.ps1, run-all-evals.ps1, generate-skill-experiments.ps1, compare-experiment.mjs), standardized vally eval/experiment yaml and scenarios.yaml for ~40 Python skills, shared Python grader tooling, and harness runner script/dependency updates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9429ad33-6f31-4ec5-ba00-0f11b5afb82e * Update vally version * Update package info * Fix review comments: delete artifact, fix exception handling, add exclude-pattern support * Fix review 4708288806 comments: exceptions, duplicate files, tab check, PS1 fixes * Removed experiment specific evaluations; cleaned up existing eval.yaml files * Removed bogus files * test: cover python static graders * fix: address all 10 comments from review 4739490318 * fix: rename grader_model to judge_model in all Python eval specs (Vally 0.10) * Improved reliability of prompts * Fixed test harness for azure-appconfiguration-py skill * Fix --junit output path and update Node.js version prerequisite * Fix fastapi-router-py template.py to use {{}} placeholder syntax * fix: update Node.js version to 22 in test-harness workflow * fix: skip template Python files containing {{...}} placeholders in syntax check * fix: remove invalid 'execution' and 'portability' fields from GraderMetadata * fix: allow esbuild builds in tests workspace * fix: restore required vally grader metadata * fix: remove obsolete execution and portability fields from rust-cargo-build-failure grader * Fix remaining review thread feedback * Fixes from rust branch * Apply remaining changes * Fix grader metadata typing * Remove test-harness.yml workflow (belongs to PR #380) * Fix remaining review thread feedback * Restore test-harness.yml deleted in error The file was removed on this split branch under the assumption it belonged only to PR #380, but #380 already merged it into main unchanged. Since the merge-base copy matched main, merging this branch would have deleted the file from main. Restoring it to main's version so this branch carries it through untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Add @microsoft/vally-cli to test devDependencies and update lockfile * Fix Windows-only backslashes and README pnpm --dir path - tests/run-all-evals.ps1: Replace backslashes with forward slashes in customGraderPluginDir, customGraderDistEntry, and vallyCmd paths so that Join-Path resolves them correctly on Linux/macOS. - tests/scenarios/README.md: Fix 'pnpm --dir ../../../..' (repository root) to 'pnpm --dir ../../..' (tests/) and update the experiment file and output-dir paths to be relative to tests/. * Move Vally expect_skills constraints into each stimulus * Fix azure-eventhub-rust review feedback * Fix remaining fastapi and eval review issues * Updated timeouts on skills * Fix review 4766529446: experiment evals, vally probe, timestamps, dead params, version gate * Removed skill_effectiveness_eval.yaml files for python * Repoint python skill experiments to eval.yaml and remove generator script Completes 27ae1ab: the eval.yaml deletions were committed but the experiment repoints (skill_effectiveness_eval.yaml -> eval.yaml) and the generate-skill-experiments.ps1 deletion were left unstaged, so git status kept showing them. Commit them so the python experiments reference the single general-purpose eval.yaml. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 82323067-0922-476e-8f08-4659317988ab * Regenerate rust skills and add guidance on structures. * Fix 5 issues from review 4768872057: pnpm-workspace bool, cargo clippy -D warnings, compare-experiment score check, run-skill-experiments local vally, README pylint install step * Cleaned up eval job; simplified storage skills somewhat * Fix azure-mgmt-apimanagement-py: remove invalid require_envvar from DefaultAzureCredential * Fix cargo clippy --D warnings in Rust eval files and fix -rs typo in run-skill-experiments.ps1 * Fix pydantic-models-py: simplify template to prevent file truncation in evals The base_create_response_indb stimulus was failing Python syntax and idiomatic checks because the LLM generated oversized Python files (with helpers and section comments) that got truncated during writing. Changes: - Reduce template.py from 124 to 48 lines using concise ConfigDict pattern, inline Field calls, and brief docstrings - Update SKILL.md examples to use ConfigDict (modern Pydantic v2) - Remove verbose section separators and boilerplate comments * Fix pydantic vally camel_case_aliases workspace output path * Fix vally CI: add file save instructions and improve error handling examples - pydantic-models-py eval: add file save instruction to base_create_response_indb prompt so agents write a .py file, fixing "No Python files found" grader failure - azure-ai-translation-document-py eval: add file save instructions to both stimuli for deterministic grader behavior - azure-ai-translation-document-py skill: rewrite Basic Document Translation section with complete self-contained example including try/except HttpResponseError; remove invalid require_envvar=True parameter from DefaultAzureCredential() * Fix review 4790830267: add file save instructions and fix eval output key collision - Thread 97: Add 'Save the code to <file>.py in the current workspace.' to all eval stimuli that use Python graders but lacked explicit file output paths, preventing deterministic grader failures when models respond without saving files. Affected: agent-framework-azure-ai-py, azure-ai-contentsafety-py, azure-ai-contentunderstanding-py, azure-ai-ml-py, azure-ai-projects-py, azure-ai-textanalytics-py, azure-ai-transcription-py, azure-ai-translation-text-py, azure-ai-vision-imageanalysis-py, azure-ai-voicelive-py, azure-containerregistry-py, azure-cosmos-db-py, fastapi-router-py, m365-agents-py, azure-storage-queue-py - Thread 98: Include eval filename in output key in run-all-evals.ps1 so that eval.yaml and skill_effectiveness_eval.yaml in the same vally/ folder write to separate output directories, preventing JUnit file and run-dir lookup collisions * Removed experimental files that are no longer needed * fix: add #Requires -Version 7.0 to run-all-evals.ps1 (review 4739841645) * Fix 6 issues from review 4791599641: workspace file requirements and producer open() &str fix * Fix all review #4791806947 comments: syntax checks, compare-experiment, package/workflow versions, dead params, exit code tracking * Fix azure-ai-projects-py: wrong import paths and invalid credential parameter * Fix review 4791806947: add save instructions to eval.yaml stimuli, fix blob-rust ignore_for_fail, fix skill-creator Rust guidance - Add 'Save the code to file.py' instructions to all eval.yaml stimuli missing them (31 stimuli across 18 Python scenario files) so the workspace-only syntax/pylint graders can find the .py files - Remove error_exceptions from Post-prompt graders in azure-storage-blob-rust/vally/eval.yaml (keep only on trajectory analysis), preventing genuine E0277 compilation failures from being masked as successful builds - Fix #[non_exhaustive] guidance in skill-creator/SKILL.md: distinguish between externally constructible structs (use ..Default::default()) and truly non_exhaustive structs (use constructor/builder or default-then-mutate) to avoid E0639 compile errors * Fix azure-monitor-opentelemetry-py: add explicit connection_string example, fix invalid credential param - Replace "Explicit Configuration" section with "Explicit Connection String" section showing connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"] with try/except - Remove invalid DefaultAzureCredential(require_envvar=True) parameter (not a valid API) - Update capabilities.md to reflect renamed section This fixes the azure-monitor-opentelemetry-py-eval explicit_connection_string scenario which was failing Python syntax and idiomatic checks because the skill lacked a canonical example for the connection_string parameter pattern. * Fix --junit flag, add datetime import, add rust grader plugin support in experiments - run-all-evals.ps1: Remove filename arg from --junit flag; Vally 0.10 treats it as boolean - pydantic-models-py/SKILL.md: Add missing 'from datetime import datetime' import in camelCase Aliases example - run-skill-experiments.ps1: Mirror rust-cargo-build-failure grader plugin detection/build/pass from run-all-evals.ps1 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Copilot-Session: 9429ad33-6f31-4ec5-ba00-0f11b5afb82e Copilot-Session: 82323067-0922-476e-8f08-4659317988ab
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.
Split from #375 (2 of 5).
Updates the Vally test harness code and CI workflows:
tests/harness/runner/output-capture changes, newcopilot-client.test.ts,ralph-loopandtypesupdates.github/workflows/— renamedvally-evaluation.yml->run-vally-evaluations.yml,test-harness.ymlupdate.github/aw/actions-lock.json