Skip to content

Concurrent run requests can pass preflight together, and setup failures can leave analysis locked #35

In review

Description

@sh00kapic

Invoke Run Analysis twice while the first dependency prompt is open. Both requests can pass the isRunning check before either sets it. There is also a gap after the flag is set and before the cleanup block starts. For example, opening the source document for automatic entry points can reject if the file disappears during setup. Later invocations then report an analysis already in progress.

Expected behavior and verification

Acquire the run guard before the first asynchronous preflight step and release it on every exit. A second request must leave the active run’s sidebar status intact. Cover overlapping invocations and a setup failure followed by a successful retry.

extension.ts line 172 · extension.ts line 317

Activity

  1. added
    bug
    on Nov 20, 2026
  2. Arthurvroum commented on Nov 25, 2026

    @Arthurvroum
    Collaborator

    Fixed on branch 35-run-guard (c33791a), pull request #50.

    Run Analysis now runs inside runGuarded(). It takes the guard synchronously, before the first await, reports setup failures and releases the guard on every exit. A rejected second request only shows its warning and leaves the active run's sidebar status unchanged.

    Tests: a second request during an active run, two requests sent at once (only one runs), and a failing setup step followed by a successful retry. Unit and workspace suites pass locally (Linux).

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions