Feature: Sandbox manager commit concurrency
  Ensuring concurrent mutations are blocked during commit_all execution.

  Background:
    Given a sandbox factory instance
    And a sandbox manager with the factory

  Scenario: commit_all blocks concurrent sandbox creation for the same plan
    Given plan "plan-race" has a blocking sandbox commit harness
    When commit_all runs concurrently with sandbox creation for plan "plan-race" resource "res-new"
    Then the concurrent sandbox creation should wait for commit completion
    And commit_all should return 1 successful result
