fix(validator): dead-letter jobs after uncaught worker eval errors (#50)#135
Closed
RealDiligent wants to merge 3 commits into
Closed
Conversation
RealDiligent
force-pushed
the
fix/critical-issue-worker-dead-letter-on-error-v2
branch
from
July 13, 2026 02:42
1084f96 to
323e6b3
Compare
Collaborator
MiniRouter evaluation resultSubmission for RealDiligent on math500 failed during evaluation.
Metrics
Error
|
Collaborator
MiniRouter evaluation resultSubmission for tmimmanuel on math500 failed during evaluation.
Metrics
Error
|
…ini-router#50) Mark claimed JobQueue rows and submissions failed instead of rolling back into an endless re-queue loop. Adapted for the JobQueue worker path and added Postgres-backed regression tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Postgres rejects FOR UPDATE on the nullable side of the worker's outer join; scope row locks to JobQueue so process_once can claim jobs in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
validator_session uses a nested transaction that process_once cannot see; seed queued jobs through a committed session_factory instead. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #50.
When
process_once()hit an uncaught evaluation error, it rolled back the in-flight transaction and re-raised. That restored the claimedJobQueuerow and submission toqueued, so the same job could be picked again forever and block the queue.This PR dead-letters the claimed job and submission in a fresh transaction after rollback, returns from
process_once()instead of re-raising, and logs GitHub publish failures.Adapted for the current JobQueue-based worker (supersedes closed #51).
Test plan
validator/tests/test_worker.pywith Postgres-backed regression teststest-validatorpasses