Skip to content

A cargo run that takes a build slot over can run another worktree's app #317

Backlog

Description

@bfcarrasco

Found by the judge on #316, not blocking.

cargo run takes no lock, as its app may run for hours. With more worktrees running cargo run at the same time than there are build slots (6 by default), a worktree that takes a slot over marks its sources while the slot's previous owner may still be building in it, and can then run the other worktree's app.

Reproduction: BSTACK_CARGO_SLOTS=2, four worktrees whose src/main.rs prints their number, one shared CARGO_TARGET_DIR, node plugins/bstack/scripts/cargo-lock.mjs cargo run --offline --quiet in all four at once. One of them printed another worktree's number.

The built app at debug/<name> is one path for all worktrees, which #316 names as not done; the judge did not separate the two causes.

Acceptance criteria

  • With the reproduction above, every worktree prints its own number, or the wrapper refuses the run with a message that says why.

Activity

  1. added
    needs-triage
    on Dec 4, 2026
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

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions