-
Notifications
You must be signed in to change notification settings - Fork 160
Implement automated eval test suite for Angular Skills #17007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
20
commits into
master
Choose a base branch
from
copilot/implement-automated-eval-test-suite
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,771
−0
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5b7cca0
Initial plan
Copilot 23aecf0
feat: scaffold eval test suite with three skill tasks and CI workflow
Copilot ac1335a
refactor: improve regex readability in grader scripts per code review
Copilot f807aa3
fix: add explicit permissions to skill-eval workflow (CodeQL alert)
Copilot c183089
Merge branch 'master' into copilot/implement-automated-eval-test-suite
kdinev 6e7b838
fix: replace skill-eval package dep with self-contained local runner
Copilot b2047d8
fix: emit passRate/passAtK in result JSON so CI summary shows actual …
Copilot 1691296
Update evals/tasks/component-combo-reactive-form/solution/solve.sh
kdinev 2df335e
Update .github/workflows/skill-eval.yml
kdinev b22b13f
fix: tighten grader checks per review feedback
Copilot c684351
Merge branch 'master' into copilot/implement-automated-eval-test-suite
kdinev 94d4bf8
Update Node.js version in skill-eval workflow
kdinev 18f3e25
Update skill-eval.yml
kdinev 568b04d
Remove eval dependencies installation step
kdinev 5da6711
Merge branch 'master' into copilot/implement-automated-eval-test-suite
kdinev b181ca0
feat: add copilot-cli and gemini-cli agent modes to eval runner
Copilot 665264b
fix: use read -ra for safe array parsing, add TRIALS guard
Copilot b3fa973
Update skill-eval.yml
kdinev 1330989
rework CI workflow to always run against both copilot and gemini agents
Copilot a9da524
add agent prompt files, switch CI to npm scripts, clean up README
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,206 @@ | ||
| name: Skill Eval | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'skills/**' | ||
| - 'evals/**' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| # Job 1: Validate graders against reference solutions | ||
| validate_graders: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - name: Validate graders against reference solutions | ||
| working-directory: evals | ||
| run: npm run validate | ||
|
|
||
| - name: Upload validation results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: skill-eval-validation-results | ||
| path: evals/results/ | ||
| retention-days: 30 | ||
|
|
||
| # Job 2: Run evals against the Copilot agent | ||
| agent_eval_copilot: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - name: Install Copilot CLI | ||
| run: npm install -g @github/copilot | ||
|
|
||
| - name: Run eval against Copilot | ||
| working-directory: evals | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: npm run agent:copilot | ||
|
|
||
| - name: Upload Copilot eval results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: skill-eval-agent-copilot-results | ||
| path: evals/results/ | ||
| retention-days: 30 | ||
|
|
||
| # Job 3: Run evals against the Gemini agent | ||
| agent_eval_gemini: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - name: Install Gemini CLI | ||
| run: npm install -g @google/gemini-cli | ||
|
|
||
| - name: Run eval against Gemini | ||
| working-directory: evals | ||
| env: | ||
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
| run: npm run agent:gemini | ||
|
|
||
| - name: Upload Gemini eval results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: skill-eval-agent-gemini-results | ||
| path: evals/results/ | ||
| retention-days: 30 | ||
|
|
||
| # Job 4: Post combined summary comment on PRs | ||
| post_summary: | ||
| if: always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false | ||
| needs: [validate_graders, agent_eval_copilot, agent_eval_gemini] | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Download validation results | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: skill-eval-validation-results | ||
| path: evals/results/validation | ||
| continue-on-error: true | ||
|
|
||
| - name: Download Copilot results | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: skill-eval-agent-copilot-results | ||
| path: evals/results/copilot | ||
| continue-on-error: true | ||
|
|
||
| - name: Download Gemini results | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: skill-eval-agent-gemini-results | ||
| path: evals/results/gemini | ||
| continue-on-error: true | ||
|
|
||
| - name: Post summary comment | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
|
|
||
| function readResults(dir) { | ||
| const results = []; | ||
| try { | ||
| if (!fs.existsSync(dir)) return results; | ||
| const files = fs.readdirSync(dir).filter(f => f.endsWith('.json') && f !== 'baseline.json'); | ||
| for (const file of files) { | ||
| try { | ||
| results.push(JSON.parse(fs.readFileSync(path.join(dir, file), 'utf8'))); | ||
| } catch (e) { | ||
| results.push({ task: file.replace('.json', ''), error: true }); | ||
| } | ||
| } | ||
| } catch (e) { /* dir doesn't exist */ } | ||
| return results; | ||
| } | ||
|
|
||
| let summary = '## 📊 Skill Eval Results\n\n'; | ||
|
|
||
| // --- Validation results --- | ||
| const validation = readResults('evals/results/validation'); | ||
| if (validation.length > 0) { | ||
| summary += '### Grader Validation (reference solutions)\n\n'; | ||
| summary += '| Task | Pass Rate | Status |\n'; | ||
| summary += '|---|---|---|\n'; | ||
| for (const r of validation) { | ||
| if (r.error) { summary += `| ${r.task} | Error | ❌ |\n`; continue; } | ||
| const passRate = r.passRate != null ? `${(r.passRate * 100).toFixed(0)}%` : 'N/A'; | ||
| const status = r.passRate >= 1.0 ? '✅' : '❌'; | ||
| summary += `| ${r.task} | ${passRate} | ${status} |\n`; | ||
| } | ||
| summary += '\n'; | ||
| } | ||
|
|
||
| // --- Agent results --- | ||
| const copilot = readResults('evals/results/copilot'); | ||
| const gemini = readResults('evals/results/gemini'); | ||
|
|
||
| if (copilot.length > 0 || gemini.length > 0) { | ||
| summary += '### Agent Evaluation\n\n'; | ||
| summary += '| Task | Agent | Pass Rate | pass@k | Status |\n'; | ||
| summary += '|---|---|---|---|---|\n'; | ||
|
|
||
| for (const r of [...copilot, ...gemini]) { | ||
| if (r.error) { summary += `| ${r.task} | — | Error | Error | ❌ |\n`; continue; } | ||
| const taskName = r.task || 'unknown'; | ||
| const agent = r.agent || 'unknown'; | ||
| const passRate = r.passRate != null ? `${(r.passRate * 100).toFixed(0)}%` : 'N/A'; | ||
| const passAtK = r.passAtK != null ? `${(r.passAtK * 100).toFixed(0)}%` : 'N/A'; | ||
| const status = r.passAtK >= 0.8 ? '✅' : r.passAtK >= 0.6 ? '⚠️' : '❌'; | ||
| summary += `| ${taskName} | ${agent} | ${passRate} | ${passAtK} | ${status} |\n`; | ||
| } | ||
| summary += '\n'; | ||
| } | ||
|
|
||
| if (validation.length === 0 && copilot.length === 0 && gemini.length === 0) { | ||
| summary += '> ⚠️ No eval results found. The eval runs may have failed.\n'; | ||
| } | ||
|
|
||
| summary += '### Thresholds\n'; | ||
| summary += '- ✅ `pass@k ≥ 80%` — merge gate passed\n'; | ||
| summary += '- ⚠️ `pass@k ≥ 60%` — needs investigation\n'; | ||
| summary += '- ❌ `pass@k < 60%` — blocks merge for affected skill\n'; | ||
|
|
||
| await github.rest.issues.createComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| body: summary, | ||
| }); | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.