Skip to content

restart has no running? guard, so a poller steal inside interrupt makes two walkers #30

Description

@slowernet

Found by the #4 review. Poller#handle checks running? before starting a run; Supervisor#restart does not — it re-reads status == 'running' and calls start, and neither start nor Run.adopt guards either.

The reachable interleaving (narrowed but not closed by #4's reorder): a comment event pending across a tick, the poller steals the run between interrupt's row write and its Status write, sets the row running and starts a walker — then reap's restart re-reads running, calls start, and there are two walkers in one worktree.

Fix is one line — return if running?(run_id) in restart — plus a test. Reaching it needs a pending comment event surviving a tick (dispatch broke at the cap, or fail_event re-queued), so it is narrow, but the end state is the two-walker outcome half this queue exists to prevent.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions