Skip to content

feat: offline eval baselines and comparison (HY-241) - #409

Merged
whanyu1212 merged 3 commits into
developfrom
feat/hy-241-eval-baseline
Nov 6, 2026
Merged

whanyu1212 merged 3 commits into
developfrom
feat/hy-241-eval-baseline

Conversation

@whanyu1212

Copy link
Copy Markdown
Owner

What

  • Add offline report/compare commands with judge-to-reply integrity checks, compatibility validation, named regressions, timing/cost coverage and scenario-cluster intervals.
  • Commit separate dev and holdout snapshots from existing synthetic recordings: 12/15 dev, 9/9 holdout behaviour passes. Preserve known clearer-recovery failures.
  • Document reproduction, pre-merge comparison, exit codes and explicit token-rate estimates.

Why

HY-241 needs a reproducible baseline and a pre-merge diff command for future prompt/model/policy changes.

Refs #356

How it was tested

  • Full agent suite with PostgreSQL: 836 passed, including 26 baseline tests; safety statement/branch coverage remains 100%.
  • Ruff lint/format and full mypy checks passed.
  • Docs validation, formatting and production build passed.
  • Both snapshots regenerate deterministically; real CLI self-comparison exits 0 and dev-versus-holdout comparison exits 2.
  • Scoped complexity/duplication review; 20 selected judge-integrity/comparison mutants killed. One selected comparison site was reported uncovered.
  • Existing live coach and judge recordings reused; no new paid model calls. Reporting itself is offline.
  • Web checks and the full pre-commit suite were not rerun: no web application code changed.

Safety impact

None to runtime safety screening, crisis responses, memory writes or client state. This adds offline evaluation tooling and documentation. Approved recovery expectations and thresholds remain unchanged; known failures stay visible. Truncated/empty replies fail deterministic checks. Judge scores remain advisory pending human calibration.

Notes for the reviewer

  • Coach/Jev dollar costs and final-successful-attempt-only latency were not recorded and remain null. Optional explicit prices estimate recorded successful coach calls only. Recorded judge costs are separate.
  • Five dev and three holdout scenarios are too small to establish small quality gains. Intervals resample whole scenarios; constant cluster means yield null intervals, not zero uncertainty.
  • Prompt hashes identify source at recorded git revisions, not captured runtime instructions or dirty-tree/environment overrides.
  • Exit codes: 0 compatible/no new deterministic failures; 1 deterministic regression or incomplete conversation/judge coverage; 2 invalid/incompatible evidence. Judge changes are advisory, and an unchanged known failure does not make comparison exit 1.
  • Larger than the preferred PR size because it includes the complete reporting feature, 475 lines of generated snapshots and 434 lines of focused tests. No new dependencies.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T12:17:58.719661Z dbb9061 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbb9061df7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/agent/evals/baseline/report.py Outdated
Comment on lines +95 to +96
if row.status == "truncated" or any(turn.truncated for turn in row.turns):
outcome.issues.append("truncated reply")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve turn identities for truncation regressions

When a baseline conversation already contains one truncated turn, a candidate that truncates additional turns receives the same single "truncated reply" issue. Since comparison() detects regressions by subtracting issue sets, it reports no changed checks and exits 0 despite the new truncated replies; the increased metric is only advisory. Record truncation issues with their turn identities, as is already done for empty replies, so additional truncations are detected without failing an unchanged known truncation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 808f9d3. Truncation issues now include turn identities; a conversation-level fallback preserves detection for status-only recordings. Added regression tests covering additional, moved, unchanged and resolved truncations, CLI exit codes, and status-only truncation. The additional/moved cases failed before the fix. All 250 eval tests, Ruff and full mypy pass; three selected fallback mutations were killed. Both committed snapshots reproduce unchanged. Full application/DB tests were not rerun for this scoped offline-report fix.

@whanyu1212
whanyu1212 merged commit 8949c77 into develop Nov 6, 2026
6 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.

1 participant