Background
The repository-cloning implementation in src/engine/connection/repository_clone/mod.rs uses a synchronous Tokio runtime handle (tokio::runtime::Handle) to drive async container exec calls. The test suite does not exercise concurrent clone invocations, multi-threaded runtime scenarios, nested runtime contexts, or cancellation under interleaving.
Required action
Add tests covering:
- Concurrent clone calls on the same container (verify no shared-state corruption).
- A multi-threaded Tokio runtime context (e.g.,
#[tokio::test(flavor = "multi_thread")]).
- Nested runtime contexts (block_on called from within an async context).
- Cancellation: a future dropped before completion does not leave the mock exec client in an inconsistent state.
Document any single-threaded-per-request guarantee directly in code if one exists.
References
Background
The repository-cloning implementation in
src/engine/connection/repository_clone/mod.rsuses a synchronous Tokio runtime handle (tokio::runtime::Handle) to drive async container exec calls. The test suite does not exercise concurrent clone invocations, multi-threaded runtime scenarios, nested runtime contexts, or cancellation under interleaving.Required action
Add tests covering:
#[tokio::test(flavor = "multi_thread")]).Document any single-threaded-per-request guarantee directly in code if one exists.
References
#80(repository cloning — 4.2.1): Repository cloning (4.2.1) #80