Skip to content

fix(eval): surface pending-merge branch and raw grader response in failures - #1704

Merged
christso merged 1 commit into
mainfrom
fix/results-pending-merge-and-grader-diagnostics
Jul 6, 2026
Merged

fix(eval): surface pending-merge branch and raw grader response in failures#1704
christso merged 1 commit into
mainfrom
fix/results-pending-merge-and-grader-diagnostics

Conversation

@christso

@christso christso commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two diagnostics gaps found during a live dogfood of AgentV v5 against a real
downstream consumer (WiseTechGlobal/WiseTechAcademy.Evals, mid-migration to
v5).

  • Results auto-push conflict warning read as data loss. When
    directPushResultsWithDetails hits a genuine results-content conflict on
    the configured results branch, it already pushes the local run to a temp
    agentv/results-sync/... branch instead of dropping it (per
    docs/adr/0007-conflict-free-results-sync-without-force-push.md). But
    maybeAutoExportRunArtifacts only printed the block reason ("...resolve it
    with a GitHub pull request"), never the sync branch name or its compare
    URL. A user seeing that warning has no way to tell the results actually
    made it to a real, pushed branch. Fixed to print the pending_merge branch
    and compare URL when present.

  • LLM grader parse failures discarded the raw model response. A parse
    failure only surfaced the JSON.parse error (e.g. Unexpected identifier "This"), not what the model actually said. This makes a genuinely useful
    class of failure — a grader misrouted at a non-JSON-returning target, or a
    model ignoring the JSON-only instruction — much harder to diagnose than it
    needs to be. Fixed to include a truncated raw-response preview in the skip
    reason.

How this was found

Live dogfood run against WiseTechAcademy.Evals: evals/ace-search-subset/n1.eval.yaml,
real default target (staging search CLI) + real openai LLM-rubric graders.

  • First run errored with JSON Parse error: Unexpected identifier "This" /
    "They" on both LLM-rubric graders. Root cause turned out to be on the
    consumer side (their PR feat: add retry configuration with exponential backoff for AI providers #40 migration dropped grader_target: grader from
    targets.yaml, so the grader silently self-graded against the search CLI
    instead of the LLM target) — but AgentV's error message gave no hint of
    this; only the raw-response preview added here would have shown "this
    looks like a search answer, not a JSON verdict" immediately.
  • The same run's results auto-push hit a real branch divergence (other
    same-day dogfood runs had already advanced agentv/results/v1), correctly
    fell back to a sync branch, but the printed warning didn't say so.

Second (fixed) run passed at 97% with the corrected consumer-side config;
its console output demonstrates the new warning:

Warning: skipping results export: Results branch agentv/results/v1 diverged from the remote and could not be auto-merged: a genuine results content conflict remains (remote dc101b77c494, local 3a022e40a675). The remote branch is unchanged and no history was rewritten; resolve it with a GitHub pull request.
Warning: results were pushed to 'agentv/results-sync/20260706T122714Z-agentv-results-v1-614154' instead — they are not lost. Merge that branch into agentv/results/v1 with a pull request: https://github.com/WiseTechGlobal/WiseTechAcademy.Evals/compare/agentv%2Fresults%2Fv1...agentv%2Fresults-sync%2F20260706T122714Z-agentv-results-v1-614154?expand=1

Full evidence (screenshots, README with root-cause writeup): agentv-private
branch evidence/wisetechacademy-evals-agentv-v5-dogfood-2026-07-06.

Validation

  • bun test packages/core/test/evaluation/graders.test.ts apps/cli/test/commands/results/remote-auto-export.test.ts — 68 pass, 0 fail (includes 4 new tests: 3 for formatPendingMergeWarnings, 1 regression for the raw-response preview).
  • tsc --noEmit clean for apps/cli and packages/core.
  • biome check clean on all touched files.
  • Live dogfood against WiseTechAcademy.Evals (see evidence branch above) — both new warnings observed exactly as designed in a real run.

Not done here (left for human review)

  • Dashboard sync-status UI has the same "reads as lost" gap for its own
    agentv/results/v1 conflict banner ("Local and remote results histories
    have diverged... resolve manually"). That's a different code path
    (apps/dashboard/src/lib/project-sync-status.ts / RunSourceToolbar.tsx,
    pull-based sync) than the one fixed here (push-based eval run auto-export),
    and a real UI change rather than a message-plumbing fix. Flagging as a
    follow-up rather than expanding this PR's scope.

Not merging — leaving open for review per this session's checkpoint policy.

🤖 Generated with Claude Code

…ilures

Discovered during a live WiseTechAcademy.Evals v5 dogfood run:

- When a results auto-push hits a genuine content conflict,
  directPushResultsWithDetails already pushes the local run to a temp
  agentv/results-sync/... branch instead of dropping it (docs/adr/0007), but
  the CLI warning only printed the block reason ("...resolve it with a GitHub
  pull request") with no mention of the branch or its compare URL. That reads
  as "results were lost" when they were not. Surface the pending_merge branch
  name and compare URL in the warning.

- An LLM-rubric grader parse failure only carried the JSON.parse error (e.g.
  `Unexpected identifier "This"`), discarding the raw model text. When a
  grader is misconfigured to point at a non-JSON-returning target, the error
  gives no clue what the model actually said. Include a truncated raw-response
  preview in the skip reason.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: bb16a8c
Status: ✅  Deploy successful!
Preview URL: https://10d11372.agentv.pages.dev
Branch Preview URL: https://fix-results-pending-merge-an.agentv.pages.dev

View logs

@christso
christso merged commit 589c01a into main Jul 6, 2026
8 checks passed
@christso
christso deleted the fix/results-pending-merge-and-grader-diagnostics branch July 6, 2026 12:41
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