Skip to content

fix(workflow-eval): retry failed per-case submissions on poll - #995

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
paul/workflow-eval-retry-failed-submit
Oct 26, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
paul/workflow-eval-retry-failed-submit

Conversation

@paultancre-bt

@paultancre-bt paultancre-bt commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes SDK-617.

If submit raised for a per-case WorkflowTask or WorkflowScorer, the case stayed claimed and no submission record was written.

Every later poll() returned waiting, and submit never ran again, so the run could never complete.

This change records the failure the same way the batch path already does: a failed submission record with attempts. The existing retry branch in poll() now resubmits non-batch submissions too, with the same submission_id. This matches the JS SDK, which documents: "When submit throws, its items stay with that submission and it counts as pending. The next poll({ runId }) retries it with the same submissionId."

  • pending change: a failed per-case submission now counts in pending.poll / pending.webhook until it's retried. Failed batch reservations already count this way, and so does JS. That's why the assertion in test_submission_error_waits_for_independent_submissions changes from 2 to 3.
  • Lease key: the retry lease still uses _batch_key. It's a single-key lease, so the Redis Cluster slot grouping that _batch_key exists for doesn't matter here.
  • Out of scope: in webhook mode, a get_external_id failure after a successful submit is still unhandled. JS has the same gap.

Test: test_failed_submit_is_retried_on_poll fails on main and passes with this change.

A WorkflowTask or WorkflowScorer submit that raised left its case claimed
with no submission record, so the run stayed waiting forever. Record the
failure like batch submissions do, so the next poll() resubmits it. This
matches the JS SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-22T19:00:33.805308Z b9317eb PR opened
ℹ️ About Codex in GitHub

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

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

@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit 5b75086 into main Oct 26, 2026
98 checks passed
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) deleted the paul/workflow-eval-retry-failed-submit branch October 26, 2026 12:27
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