Skip to content

Pause scheduled workers after repeated terminal configuration failures #2255

Description

@federicodeponte

Problem

A scheduled Floom worker with a deterministic configuration error can create a failed run on every fire indefinitely.

Current code has two separate failure paths:

  1. Scheduler preflight creates a synthetic failed run for a declared missing secret.
  2. Run execution records a failed run and invokes the pause policy.

Only the execution path invokes the pause policy. The scheduler-preflight path can therefore repeat forever. The pause policy also recognizes only missing_secret, even though llm_model_not_configured is equally terminal until configuration changes.

The missed-fire path currently persists schedule_missed. The canonical taxonomy requested by downstream analytics is scheduler_missed.

Reproduction

  1. Create an enabled scheduled worker that declares a required secret.
  2. Do not configure the secret.
  3. Let the scheduler fire three times.
  4. Observe three synthetic failed rows with no engine-level worker pause.

Acceptance criteria

  • Synthetic scheduler preflight failures participate in the same consecutive-failure policy as execution failures.
  • Threshold defaults to 3 and remains configurable.
  • missing_secret and llm_model_not_configured are terminal configuration codes.
  • Consecutive scheduled failures from transient classes such as timeout, E2B transport, or provider errors do not pause the worker.
  • The third qualifying failure sets enabled=false and writes the existing paused manifest state once.
  • Missing-secret failures persist error_code=missing_secret at the failure site.
  • Missed scheduler fires persist error_code=scheduler_missed at the failure site.
  • Tests cover two failures, the third failure, mixed errors, manual provenance, and transient exclusions.

Cloud owner notification and multi-tenant persistence are intentionally outside this public issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions