Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,43 @@ Crash points are serialized. Concurrent operations are not explored for race con
### Linux Only (v0.1)

The current implementation uses Linux-specific APIs (`SIGKILL`, `/proc`). macOS and Windows support is not yet available.

---

## Integration Constraints (v0.1)

### One `first::test()` Per `#[test]`

| Pattern | Status |
|---------|--------|
| One `first::test()` per `#[test]` | ✅ Supported |
| Multiple `first::test()` in one `#[test]` | ❌ Undefined |

**Rationale**: The orchestrator manages process lifecycle. Nested or sequential calls conflict.

### Async Tests Not Supported

| Pattern | Status |
|---------|--------|
| `#[test]` (sync) | ✅ Supported |
| `#[tokio::test]` | ❌ Not supported |
| `#[async_std::test]` | ❌ Not supported |

**Rationale**: FIRST uses `fork()` + `SIGKILL` — async runtimes don't survive this.

### Not Thread-Safe

| Pattern | Status |
|---------|--------|
| Single-threaded `.run()` closure | ✅ Supported |
| `crash_point()` from spawned threads | ❌ Undefined |

**Rationale**: Crash point counter uses atomic state but determinism requires single-threaded execution.

### No Nested Workspaces

| Pattern | Status |
|---------|--------|
| User-managed dirs inside `env.path()` | ✅ Supported |
| Expecting FIRST to manage nested isolation | ❌ Not supported |

Comment on lines +181 to +187

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This section is missing a rationale, unlike the other sections under 'Integration Constraints'. Adding a rationale would improve clarity for users and maintain consistency in the document. The limitation seems to be due to global state like environment variables and a fixed temporary directory.

Suggested change
### No Nested Workspaces
| Pattern | Status |
|---------|--------|
| User-managed dirs inside `env.path()` | ✅ Supported |
| Expecting FIRST to manage nested isolation | ❌ Not supported |
### No Nested Workspaces
| Pattern | Status |
|---------|--------|
| User-managed dirs inside `env.path()` | ✅ Supported |
| Expecting FIRST to manage nested isolation | ❌ Not supported |
**Rationale**: FIRST relies on global resources like environment variables and a fixed base directory (`/tmp/first`) for orchestration. Nested test environments would conflict over these resources, leading to undefined behavior.

9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
//! });
//! }
//! ```
//!
//! # Limitations (v0.1)
//!
//! - One `first::test()` per `#[test]` function
//! - Async tests (`#[tokio::test]`) not supported
//! - Not thread-safe (`crash_point()` from spawned threads is undefined)
//! - No nested workspaces
//!
//! See `docs/limitations.md` for full details.

mod env;
mod orchestrator;
Expand Down