-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 2.31 KB
/
eval-coverage.yml
File metadata and controls
68 lines (60 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Eval Coverage Gap Check
# Runs on PRs that touch hook, tool, or prompt files.
# Detects when code changes affect eval-covered paths without adding new evals.
#
# This workflow is a prototype for GSoC integration into the gemini-cli CI.
# In production, it would run the scanner against the real evals/ directory.
name: Eval Coverage Check
on:
pull_request:
paths:
- 'packages/core/src/hooks/**'
- 'packages/core/src/tools/**'
- 'packages/core/src/prompt/**'
- 'evals/**'
jobs:
eval-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install eval toolkit
run: |
cd eval-toolkit
npm ci
- name: Run eval gap analysis
id: gaps
run: |
cd eval-toolkit
npx tsx src/cli.ts gaps ../evals --json > /tmp/gap-report.json
CRITICAL=$(jq '.gaps | map(select(.severity == "critical")) | length' /tmp/gap-report.json)
echo "critical_gaps=$CRITICAL" >> "$GITHUB_OUTPUT"
- name: Run simulator-based eval tests
run: |
cd eval-toolkit
npm test
- name: Comment on PR if new critical gaps
if: steps.gaps.outputs.critical_gaps > 0
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const report = JSON.parse(fs.readFileSync('/tmp/gap-report.json', 'utf8'));
const critical = report.gaps.filter(g => g.severity === 'critical');
const body = [
'## ⚠️ Eval Coverage Gaps Detected',
'',
`This PR touches hook/tool/prompt paths with **${critical.length} critical** eval coverage gaps:`,
'',
...critical.map(g => `- **${g.description}**${g.relatedChanges?.length ? ` (${g.relatedChanges.join(', ')})` : ''}`),
'',
'Consider adding behavioral evals for these paths. See [CONTRIBUTING.md](./eval-toolkit/CONTRIBUTING.md) for the eval authoring workflow.',
].join('\n');
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body,
});