Skip to content

fix(s12): keep the cron queue running after a turn fails - #667

Open
jianyx1 wants to merge 1 commit into
shareAI-lab:mainfrom
jianyx1:fix/s12-keep-cron-queue-running
Open

jianyx1 wants to merge 1 commit into
shareAI-lab:mainfrom
jianyx1:fix/s12-keep-cron-queue-running

Conversation

@jianyx1

@jianyx1 jianyx1 commented Nov 28, 2026

Copy link
Copy Markdown

Fixes #656.

An exception escaping a scheduled turn could terminate the background queue processor while the scheduler kept accepting jobs. A failing Stop hook is enough to reproduce it: the first prompt reaches the model, but the next due prompt never runs.

The processor now reports the failed turn, releases the existing agent lock, and polls again. The regression delivers two one-shot jobs through the same loop and verifies that the first is not replayed after its Stop hook fails. The English, Chinese, and Japanese lesson snippets and the generated web lesson are synchronized.

Validation:

  • Python 3.11: 504 tests and 118 subtests passed. The new regression fails on unmodified main with the uncaught Stop hook exception.
  • A separate run with a real queue processor thread and a local model stub delivered both jobs and shut down normally.
  • Web production build and TypeScript check passed.

AI assistance: Codex investigated the failure, implemented the patch, and ran the validation.

This branch has not been deployed

No deployments
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.

s12: an uncaught exception in queue_processor_loop kills the delivery thread permanently — cron deliveries silently stop

1 participant