Skip to content

Concurrent resource actions can race on worktree state #5127

Description

@gregpriday

Overlapping resource lifecycle actions on the same worktree run concurrently with no serialization. If a user triggers Provision and then immediately triggers Check Status (or the auto-poll timer fires during a manual action), both execute in parallel, racing on the same monitor's lifecycleStatus and resourceStatus.

The auto-poll timer re-arms without awaiting the previous status check, so a slow status command can overlap with the next poll cycle or a user-initiated action.

In practice this is low probability — worst case is a stale badge or a confusing lifecycle status transition (e.g., badge briefly shows "provisioning" then jumps to "ready" from the poll). No data loss risk. But it makes the status badge unreliable under rapid interaction.

Introduced in PR #5007.

Metadata

Metadata

Assignees

Labels

backendMain process / backend

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions