Skip to content

fix(report): disclose recovered agent judge calls - #332

Merged
zpzjzj merged 4 commits into
alibaba:mainfrom
huong8373tt-beep:fix/report-recovered-agent-judge
Oct 23, 2026
Merged

zpzjzj merged 4 commits into
alibaba:mainfrom
huong8373tt-beep:fix/report-recovered-agent-judge

Conversation

@huong8373tt-beep

Copy link
Copy Markdown
Contributor

Summary

  • preserve a machine-readable judge_recovery marker in report.json when agent_judge accepts a valid final message after an agent-call error
  • distinguish the stable recovery paths agent_call_error and correction_call_error without serializing provider error text
  • preserve recovery metadata for grouped/multi-judge outcomes while keeping grading.json unchanged

Validation

  • go test ./internal/judge ./internal/report -count=1
  • go test ./internal/evaluator -run TestMultiJudge -count=1
  • go test ./internal/judge ./internal/report ./internal/runner ./internal/evaluator -run 'Test(AgentJudge_RecoversTimedOutSessionWithValidJSON|JSONReporter_RecordsRecoveredJudgeCall|GroupedEvaluationReportsKeepJudgeIdentity|BuildReportInput_RecordsRecoveredJudgeCall|MultiJudgeRecordsRecoveredAgentJudgeCall)$' -count=1
  • go vet ./internal/judge ./internal/report ./internal/runner ./internal/evaluator
  • git diff --check

go test -race could not run in this Windows environment because CGO_ENABLED is disabled. The full ./internal/runner suite also has an existing Windows symlink-permission prerequisite failure (A required privilege is not held by the client); the targeted runner regression passes.

Related to #321.

Slai Agent Runtime assisted with investigation, implementation, and testing. The account owner reviewed and authorized this contribution.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-10-21T21:09:19.598791Z c8c3f5b 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.

@CLAassistant

CLAassistant commented Oct 21, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@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: c8c3f5b75c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread internal/report/reporter.go Resolved

@zpzjzj zpzjzj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The implementation addresses #321: recovery metadata survives the single-judge report path and grouped judge outcomes, while grading.json stays unchanged and provider error text is not serialized. Local go test -race ./internal/judge ./internal/report ./internal/runner ./internal/evaluator passed. Additional temporary checks for recovered correction calls and healthy correction calls also passed.

Please address the CI blocker before merging. I also recommend adding the correction-path assertions below to the permanent regression coverage. The earlier changelog feedback has already been addressed in this head.

Comment thread internal/judge/agent_judge.go Resolved
Comment thread internal/judge/agent_judge.go Resolved
@huong8373tt-beep

Copy link
Copy Markdown
Contributor Author

Thanks — addressed in 3f41b1a and 6715808.

  • Restructured the correction path to satisfy the lint gate; the current head now has all 13 CI checks passing.
  • Added permanent regression coverage for a recovered correction call (Recovered == true, Reason == "correction_call_error") and for a healthy correction call (Recovery == nil).
  • Updated the grouped-report assertion to use the stable correction_call_error contract value.

The earlier changelog feedback remains included. Please let me know if you would like any further adjustments.

@huong8373tt-beep
huong8373tt-beep force-pushed the fix/report-recovered-agent-judge branch from 6715808 to 1c263fe Compare October 22, 2026 04:46

@zpzjzj zpzjzj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@huong8373tt-beep
huong8373tt-beep force-pushed the fix/report-recovered-agent-judge branch from 1c263fe to 4be10ec Compare October 23, 2026 02:52
@huong8373tt-beep

Copy link
Copy Markdown
Contributor Author

Rebased onto the current main and resolved the single additive CHANGELOG.md conflict while retaining both release-note entries. The PR is now mergeable again.\n\nTargeted regression verification passed after the rebase:\n- go test ./internal/judge -run '^(TestAgentJudge_RecoversTimedOutSessionWithValidJSON|TestAgentJudge_CorrectionCallErrors)$' -count=1\n- go test ./internal/report -run '^(TestJSONReporter_RecordsRecoveredJudgeCall|TestGroupedEvaluationReportsKeepJudgeIdentity)$' -count=1\n- go test ./internal/evaluator -run '^TestMultiJudgeRecordsRecoveredAgentJudgeCall$' -count=1\n- go test ./internal/runner -run '^TestBuildReportInput_RecordsRecoveredJudgeCall$' -count=1\n- git diff --check upstream/main...HEAD\n\nA broad local package run is not clean on this Windows host because unrelated environment-dependent tests require symlink privilege and the external opencode executable; I am therefore not presenting that broad run as passing. The rebased branch is ready for the repository checks and re-review.

@zpzjzj
zpzjzj added this pull request to the merge queue Oct 23, 2026
Merged via the queue into alibaba:main with commit ad5f533 Oct 23, 2026
17 of 19 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.

3 participants