Skip to content

fix(evaluator): judge skip_remaining failures on the final turn - #380

Merged
zpzjzj merged 5 commits into
alibaba:mainfrom
karanb192:fix/skip-remaining-final-turn
Nov 16, 2026
Merged

zpzjzj merged 5 commits into
alibaba:mainfrom
karanb192:fix/skip-remaining-final-turn

Conversation

@karanb192

@karanb192 karanb192 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A failed post_condition with on_fail: skip_remaining now leaves the case verdict to the judges, including on the final or only turn. Previously, the evaluator inferred that policy from later skipped turns, so these cases were forced to FAIL without judging.

multiTurnStatus reads the failed turn's policy from the configured turns, using its turn number with bounds and nil checks. The failed turn remains recorded as failed. The default policy and on_fail: fail still stop judging; TurnResult is unchanged.

Test plan

Checked after merging current main, using Go 1.26.10 and the pinned lint tools:

  • make verify
  • make test
  • make e2e
  • npm run docs:build

Regression tests cover final-turn and single-turn failures, skipped later turns, single and multiple judges, judge PASS and FAIL, executed-turn counts, and policy lookup defaults for missing configuration or invalid turn numbers.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 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-04T10:26:44.730549Z c7ba80f 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.

zpzjzj commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Could we pass the turns configuration directly to multiTurnStatus, rather than adding skipRemaining to TurnResult?

executeMultiTurnCase already has caseCfg, so the call could be multiTurnStatus(turnResults, caseCfg.Input.Turns). For a TurnFailed result, we could use TurnNumber - 1 to look up the corresponding turn's PostCondition.OnFail, with bounds/nil checks and the existing default of fail.

This should address the final-turn and single-turn cases without storing policy information in TurnResult that is already available in the configuration. The regression tests added here would still be useful with that approach.

@zpzjzj zpzjzj mentioned this pull request Nov 9, 2026
10 tasks done
Pass the configured turns to multiTurnStatus and look up the failed
turn's post_condition.on_fail there, instead of storing the policy on
TurnResult.
@karanb192

Copy link
Copy Markdown
Contributor Author

Done in 63aeb9a.

  1. multiTurnStatus now takes caseCfg.Input.Turns and looks up the failed turn's post_condition.on_fail by TurnNumber - 1.
  2. The lookup has bounds and nil checks and falls back to fail.
  3. skipRemaining is gone from TurnResult.
  4. The regression tests stay. I added a small table test for the lookup itself.

I also merged main to clear the changelog conflict and moved the entry to Unreleased.

@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

@zpzjzj
zpzjzj added this pull request to the merge queue Nov 16, 2026
Merged via the queue into alibaba:main with commit 732ff95 Nov 16, 2026
14 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