Skip to content

Add release readiness (Go/No-Go) to agent test reports - #4

Merged
cursor[bot] merged 6 commits into
mainfrom
cursor/readiness-report-083e
Sep 24, 2026
Merged

cursor[bot] merged 6 commits into
mainfrom
cursor/readiness-report-083e

Conversation

@Doringber

Copy link
Copy Markdown
Owner

Stacked on #3 (goal-based regression cases).

What

Every JSON/HTML report now carries a readiness block: evidence for a human release decision.

  • Always blocking: no executed scenarios, failed/errored scenarios, security failures, duplicate writes.
  • Persona segments: scenarios with an attached RegressionRunEvaluation are grouped by persona (weakest first). --agent-min-persona-pass-rate turns a weak persona into a blocking reason.
  • Baseline comparison: --agent-baseline=<previous report.json> lists regressions (blocking), pass-rate drops, scenarios not run, token growth >20%, and fingerprint changes (model, prompt_version, agent_version, knowledge_version) as notes. A missing or unreadable baseline is a note, never a crash.
  • Opt-in enforcement: --agent-enforce-readiness fails the session on NO-GO. Default is report-only.
  • New knowledge_version config (AGENT_TEST_KNOWLEDGE_VERSION) for RAG / knowledge-base version.
  • agent_scenario.attach_regression_evaluation(evaluation) fills case id, goal, persona, pass rate, and runs on the scenario.
  • Public API: ReadinessPolicy, evaluate_readiness, load_report for use outside pytest.

No new dependencies. All new report fields are optional, so existing reports and callers are unaffected.

Tests

  • tests/test_readiness.py (39 tests, parametrized) covers policy validation, blocking reasons, persona segments, baseline rules, JSON round-trip, HTML rendering/escaping, plugin session handling, and an end-to-end pytester run with enforcement.
  • Full suite: 264 passed, 19 skipped. The 3 failures were already there before this PR (test_version.py x2 and test_cursor_agent_client_normalizes_malformed_tool_payloads[malformed_event1]).
  • readiness.py 100% coverage; total 88%.
  • mypy and ruff show no new errors; the existing ones (json_report.py expected_mcp_servers and long HTML/CSS lines) are unchanged.
Open in Web Open in Cursor 

cursoragent and others added 6 commits September 24, 2026 17:35
Adds a Scorer protocol (sync or async), deterministic built-in scorers
(required terms, forbidden terms, required fields), assert_score on a single
execution, and assert_pass_rate / assert_score_rate on repeated runs. Score
outcomes flow into the existing JSON and HTML report assertion tables.

Co-authored-by: Dor Ingber  <Doringber@users.noreply.github.com>
Co-authored-by: Dor Ingber  <Doringber@users.noreply.github.com>
Regression cases accept optional goal, persona, runs and behavior fields.
Built-in behavior checks (required/forbidden terms, required fields) apply in
evaluate(); named scores and min_pass_rate apply in evaluate_runs() and run(),
which executes a case repeatedly and reports per-run failures.

Co-authored-by: Dor Ingber  <Doringber@users.noreply.github.com>
Co-authored-by: Dor Ingber  <Doringber@users.noreply.github.com>
…on, and opt-in Go/No-Go enforcement

Co-authored-by: Dor Ingber  <Doringber@users.noreply.github.com>
Co-authored-by: Dor Ingber  <Doringber@users.noreply.github.com>
@cursor
cursor Bot changed the base branch from cursor/behavior-regression-cases-083e to main September 24, 2026 18:34
@Doringber
Doringber marked this pull request as ready for review September 24, 2026 18:34
@cursor
cursor Bot merged commit da74083 into main Sep 24, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants