EnergyVenom's picture
Patchwise Agent Studio: Oracle AI Agent Studio cycles
af1bee9 verified
|
Raw History Blame Contribute Delete
5.84 kB

Eval plan: P2P pilot

Owner: AI Architect · Updated 2026-10-09 ~16:36 IST for the pilot decisions · Status: plan. No eval has been run yet. There is no labelled data and no Fusion pod.

0. Pilot scope tiers (decision 5)

  • P1: must be scripted and run every cycle. P2: run if time allows (--include-p2). P3/P4: deferred, listed, not run.
  • The graph enforces this in select_scope(). Tier vocabulary = reports/generate_report.tier() (critical=P1, high=P2, medium=P3, low=P4).
  • Every metric below is reported per tier. Thresholds are judged on P1 first. P2 numbers are reported, and must not regress when P2 runs. P3 is excluded from metrics but counted as "deferred" so it can't vanish silently.
  • Golden-set items carry a tier field. Sampling is stratified so P1 has at least 50% of the items in G1.

1. What gets evaluated

The pilot is deterministic: rule-based triage, the QA-rule report, recipe lookup and the counts-only egress. So the evals are mostly regression tests on deterministic code plus accuracy of the triage rules against human labels. LLM evals only apply if the optional local-model triage notes are switched on.

# Component Metric(s) Pilot threshold (P1) Before reducing human review
E1 Triage classifier (triage/classifier.py) Macro-F1 over 4 classes; real-defect recall; real-defect precision; ECE of confidence; % unclassified real-defect recall ≥ 0.95, macro-F1 ≥ 0.80 recall ≥ 0.98 on ≥ 100 labelled P1/P2 failures, ECE ≤ 0.10, override rate ≤ 5% over 2 cycles
E2 Review threshold τ (now 0.6) share auto-decided at τ; real-defect recall among auto-decided pick the smallest τ with auto-decided recall ≥ 0.98 same
E3 Optional local-LLM triage notes (LOCAL_TRIAGE_HINTS=1) accuracy on items the rules left unclassified/low-confidence, vs human label must beat "no note" (human alone) on time-to-decision without lowering accuracy, or it stays off —
E4 Egress / routing (route_model) leak rate = any non-allowlisted key, non-int value or text in a frontier payload; every llm_calls frontier entry has task summary 0 leaks, 100% 0 leaks, plus an egress-log audit every cycle
E5 Go/no-go delegation graph decision == generate_report.summarize() on the same inputs; report counts == qa/audit.py (QA C5) 100% 100%
E6 Retry ownership attempts per case ≤ 2; Playwright retries = 0 in every attempt report; flaky = pass on attempt 2 100% 100%
E7 Scope filter P1 in scope = all P1 designed cases; P2 only with include_p2; P3 never run; deferred list complete 100% 100%
E8 Data recipe lookup every in-scope case resolves to an existing recipe in tests/data-recipes/ 100% (missing = gap, reported) 100%

E4–E8 are already covered for stubs by selftest.py (27 checks). They need re-running in PLAYWRIGHT_MODE=live once the specs carry case ids. Deferred evals (components removed from the pilot): LLM self-heal (false-heal rate), LLM test design (coverage recall), LLM report narrative.

2. Golden datasets (synthetic or mock-derived only)

Set Contents Source now Later Size
G1 triage Playwright failure records + human label ∈ {ui_change, data, timing, real_defect} + tier Fault injection on mock-app/: rename a button (ui_change), delete a seed supplier (data), add server delay (timing), break match tolerance or amounts in store.js (real_defect). Real amounts are kept in match cases. Labelled failures from client test pods (rollout: 50–100) 100, ≥ 50 P1, real_defect over-sampled
G2 egress Payloads: valid count dicts plus traps (amount keys, floats, strings, nested dicts, case ids as keys) Synthetic generator + samples of the egress log 200
G3 report agreement (raw Playwright JSON, expected counts and decision) Recorded live mock runs real runs every run
G4 scope Case sets with mixed or missing tiers Synthetic YAML tests/cases snapshots 20

Rules: versioned in Git, never edited to make a run pass, no client data or secrets. G1 labels need two humans. Report κ, and if κ < 0.7, fix the label guide first.

3. How evals run

  • Every PR touching p2p_graph.py, triage/classifier.py, reports/generate_report.py or qa/audit.py: run selftest.py plus python -m unittest discover -s triage/tests, then the G1/G2 scripts (harness not built yet; plain Python, no eval platform). Fail the PR on any threshold miss.
  • Every live mock cycle: E5/E6/E7 checks on the real run-summary.json. Log human overrides at the human_review gate, and append the confirmed labels to G1.
  • Determinism: rules are deterministic. If the local LLM is used, set temperature 0, pin the model digest and run 3× to report variance.
  • People-time metric: minutes spent per gate per cycle. That is the main cost (cost-estimate.md).

4. Autonomy ladder

Level 0 (pilot): a human approves cases, confirms every real-defect or low-confidence verdict, and owns every flaky test. Level 1: auto-accept non-defect verdicts ≥ τ on P2 only, once E1/E2 hold. P1 stays human-confirmed in the pilot. Demote automatically if any missed real defect is found later.

5. Known gaps

  • No labelled real failures exist. Mock-injected faults are likely easier than real Fusion failures.
  • All 65 current designed cases are P1, so P2/P3 tiering is untested on real data. Only the stub/synthetic sets cover it.
  • QA's C1 ("100% of scripts were run") would count deferred P2/P3 scripts as "not run", which conflicts with decision 5. It needs QA/Triage to scope C1 to in-scope tiers (see overengineering-review.md B6).