Skip to content

fix(kb): a crashed run's leftover running state reads as the new sync's progress #20833

Open

Description

@mrveiss

Problem

autobot-backend/knowledge/connectors/job_state.py read_job_state: while the sync lease is held it returns the stored state whenever its status is running. If the previous run crashed and left a running state, and a new sync then claims the lease, the poller shows the old run's sources_done, sources_total and worker_id as the new run's progress until the new run writes its own state.

Found in review of #20804. The window is from lease claim to the new run's first state write.

Acceptance criteria

  • While the lease is held, a stored running state is shown only when it belongs to the run holding the lease (for example by matching job_id or started_at against the lease owner); otherwise the answer is starting.
  • A test covers a leftover running state from a crashed run under a new lease.

Activity

  1. github-actions commented on Nov 5, 2026

    @github-actions
    Contributor

    needs-structure: this issue is missing:

    • a phase:M1.<k> label matching milestone M1 - Seamless install and consistent docs: found none
    • a native parent issue (add one, or write Parent: #N in the body), unless this is an umbrella with sub-issues

    The label clears on the next issue event once all three are present (#19522).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugSomething isn't workingneeds-structureMissing goal milestone, matching phase label or native parent (#19522)

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions