• 
      

    Spec: tasks framework

    Review Request #15167 — Created July 12, 2026 and updated

    Information

    Reviewers

    This is a spec I've been working on detailing a new tasks framework.
    I've spent a while thinking about and fleshing out how we keep track
    of tasks for monitoring, as well as how we can handle errors and
    restarts (unlike Review Bot's and doc converter fire-and-forget,
    for things like e-mail sending we need to be able to monitor and heal
    if things go wrong).

    
     

    david
    Review request changed
    Change Summary:

    Fill in some holes:

    • Clarify retry with redacted parameters: task definition can re-mint any credentials. Any tasks with redacted kwargs and no override won't be retryable.
    • Don't store LOST state in order to prevent late completions from ending up with improper status. This simplifies the worker since we no longer need a reaper.
    • Clarify STARTED state and task acks.
    • Ensure dispatch is atomic with database state.
    • Spec out how worker deals with config changes: watch extension and siteconfig generations and gracefully restart
    • Better coordination of beat state and leaders on config change
    • A variety of smaller tweaks and fixes for consistency.
    Added Files: