Files
4b101755a1 ci(eval): harness sanity gate + baseline scaffold (#67)
Phase 3 (BugHunter). The full ablation eval (run_eval*.py — skills-on vs
skills-off on a self-grading target) needs Docker + Burp + an authed claude CLI,
so it runs locally, not in CI. But the harness around it can silently rot. This
adds the CI-able half plus a place to record the real numbers:

- .github/workflows/eval-harness.yml — on eval/ changes: py_compile every
  eval/*.py, run the oracle parser self-test, run the new harness sanity test.
  Network-free; contents: read.
- eval/test_harness.py — asserts (1) every eval/*.json config parses with the
  keys the runners expect, (2) oracle_portswigger classifies the lab-status
  widget correctly, (3) fp_app.py starts and serves every path in fp_cases.json
  (keeps the FP-trap app and its ground-truth cases in sync). Stdlib, localhost.
- eval/BASELINE.md — the local run procedure + a results table to fill in
  (skills-on/off solve-rate delta) and commit after a real run.

Building test_harness caught two bugs in my own probe (not the app): appending a
canary to an exact-match route corrupted it, and urllib auto-followed the
open-redirect trap's 302 to a 404. Fixed (query-aware URL + no-follow opener);
fp_app and fp_cases are in sync.

The real skills-on/off baseline is produced by running the eval locally and
committing BASELINE.md — CI can't run it.

Co-authored-by: Sachin Sharma <elementalsoul@Sachins-MacBook-Pro.local>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 21:13:55 +05:30

36 lines
951 B
YAML

name: eval-harness
# Sanity-checks the eval/ benchmark WITHOUT running the full agent eval (which
# needs Docker + Burp + an authed claude CLI and can't run on a hosted runner).
# Keeps the oracle parser, JSON configs, and the FP-trap app from rotting.
on:
pull_request:
paths:
- "eval/**"
- ".github/workflows/eval-harness.yml"
push:
branches: [main]
paths:
- "eval/**"
workflow_dispatch:
permissions:
contents: read
jobs:
harness:
name: eval harness sanity (network-free)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: py_compile all eval scripts
run: python3 -m py_compile eval/*.py
- name: oracle parser self-test
run: python3 eval/oracle_portswigger.py
- name: harness sanity (configs + oracle + fp_app)
run: python3 eval/test_harness.py