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
16 changes: 16 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,22 @@ cargo test # unit + integration tests
cargo test -- --ignored # fixture tests (slower)
```

### Test fixtures

Rust crates under `tests/fixtures/*/` (e.g. `broken-rust/`, `perfect-rust/`, `source-only/`, `cfg-test-edge-cases/`) are
standalone fake projects the audits run against. They are intentionally **not** workspace members — making them members
would cause `cargo build` from the root to compile every fixture and would apply workspace-level lints, dependencies,
and profile overrides to them, changing what the audits see and defeating the purpose of the fixture.

Because there is no workspace, Cargo's `field.workspace = true` inheritance is unavailable. The edition on every fixture
`Cargo.toml` must be set explicitly and **must match the main crate's edition** (see the top-level `Cargo.toml`,
currently `edition = "2024"`). When the main crate bumps its edition (e.g. Rust 2027), bump every fixture in lockstep in
the same PR — a fixture lagging behind main is a silent skew that can mask audit regressions on edition-specific syntax.

The audits themselves parse fixture sources via tree-sitter and do not invoke `cargo build`, so the edition has no
effect on current audit behavior. The lockstep rule exists for the future case where an audit reads edition-specific
constructs, and for the general "the project tests against the edition the project ships with" principle.

## Spec source (principles)

The canonical specification of the 7 agent-readiness principles lives in
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/broken-rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "broken-rust"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
clap = { version = "4", features = ["derive"] }
2 changes: 1 addition & 1 deletion tests/fixtures/perfect-rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "perfect-rust"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
clap = { version = "4", features = ["derive", "env"] }
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/source-only/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "source-only"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
clap = { version = "4", features = ["derive"] }
Expand Down
Loading