Skip to content

fix(validator): dead-letter jobs after uncaught worker eval errors (#50)#135

Closed
RealDiligent wants to merge 3 commits into
mini-router:mainfrom
RealDiligent:fix/critical-issue-worker-dead-letter-on-error-v2
Closed

fix(validator): dead-letter jobs after uncaught worker eval errors (#50)#135
RealDiligent wants to merge 3 commits into
mini-router:mainfrom
RealDiligent:fix/critical-issue-worker-dead-letter-on-error-v2

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

Fixes #50.

When process_once() hit an uncaught evaluation error, it rolled back the in-flight transaction and re-raised. That restored the claimed JobQueue row and submission to queued, 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

  • Added validator/tests/test_worker.py with Postgres-backed regression tests
  • CI test-validator passes

@github-actions github-actions Bot added docs Documentation changes eval Evaluation changes validator Validator backend changes labels Jul 13, 2026
@RealDiligent
RealDiligent force-pushed the fix/critical-issue-worker-dead-letter-on-error-v2 branch from 1084f96 to 323e6b3 Compare July 13, 2026 02:42
@tmimmanuel

Copy link
Copy Markdown
Collaborator

MiniRouter evaluation result

Submission for RealDiligent on math500 failed during evaluation.

field value
submission 98cfd2a4-57cd-4162-973c-cc35286ebc18
PR #135
repo mini-router/minirouter
benchmark math500
status failed
phase failed
progress 0/1
score pending
started 2026-07-13T02:42:29.373129+00:00
finished 2026-07-13T02:42:29.380373+00:00

Metrics

metric value
duration_seconds 0.01s
cost_usd $0.0000
cost_missing True
cost_ledger /home/ubuntu/codes/tmimmanuel/tiny-router-works/minirouter/data/workspaces/submissions/98cfd2a4-57cd-4162-973c-cc35286ebc18/cost_ledger.jsonl
missing_checkpoint True

Error

submission 98cfd2a4-57cd-4162-973c-cc35286ebc18 does not have a checkpoint to evaluate

@tmimmanuel tmimmanuel closed this Jul 13, 2026
@tmimmanuel

Copy link
Copy Markdown
Collaborator

MiniRouter evaluation result

Submission for tmimmanuel on math500 failed during evaluation.

field value
submission 98cfd2a4-57cd-4162-973c-cc35286ebc18
PR #135
repo mini-router/minirouter
benchmark math500
status failed
phase failed
progress 0/1
score pending
started 2026-07-13T02:42:46.882605+00:00
finished 2026-07-13T02:42:46.890799+00:00

Metrics

metric value
duration_seconds 0.01s
cost_usd $0.0000
cost_missing True
cost_ledger /home/ubuntu/codes/tmimmanuel/tiny-router-works/minirouter/data/workspaces/submissions/98cfd2a4-57cd-4162-973c-cc35286ebc18/cost_ledger.jsonl
missing_checkpoint True

Error

submission 98cfd2a4-57cd-4162-973c-cc35286ebc18 does not have a checkpoint to evaluate

RealDiligent and others added 3 commits July 13, 2026 10:46
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation changes eval Evaluation changes validator Validator backend changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validator worker re-queues submissions forever after uncaught evaluation errors

2 participants