Problem
The agent guide documents that bare cargo build and bare cargo check fail
at the workspace root:
# Build (per-target aliases — bare `cargo build` fails at the workspace root)
# Check compilation (per-target aliases — bare `cargo check` fails at the workspace root)
There is no equivalent warning for bare cargo test, even though the same
constraint applies: the workspace spans adapters for wasm32-wasip1,
wasm32-unknown-unknown, and native targets, so a bare cargo test /
cargo test --workspace tries to compile the Fastly adapter for the host
target.
Why it surfaced now
Until PR #923, the warning existed in exactly one place: the "Fallback
Summary" in the old AGENTS.md redirect stub, which read:
Do NOT use bare cargo test --workspace — it will attempt to compile the
Fastly adapter for the host target.
That stub is removed by #923 (correctly — it was a duplicated, drift-prone
copy of the rules). The rest of its content is redundant with the main guide,
but this one sentence has no counterpart there, so the guidance is lost.
Note this is a pre-existing gap in the main guide rather than a defect
introduced by #923 — the removal just makes it visible.
Proposed fix
Add the bare-cargo test caveat alongside the existing aliases in the
"Testing & Quality" section, matching the phrasing already used for
cargo build and cargo check:
# Run all Rust tests — use workspace aliases (bare `cargo test` fails at the
# workspace root: it compiles the Fastly adapter for the host target).
Context
Found while reviewing #923.
Problem
The agent guide documents that bare
cargo buildand barecargo checkfailat the workspace root:
There is no equivalent warning for bare
cargo test, even though the sameconstraint applies: the workspace spans adapters for
wasm32-wasip1,wasm32-unknown-unknown, and native targets, so a barecargo test/cargo test --workspacetries to compile the Fastly adapter for the hosttarget.
Why it surfaced now
Until PR #923, the warning existed in exactly one place: the "Fallback
Summary" in the old
AGENTS.mdredirect stub, which read:That stub is removed by #923 (correctly — it was a duplicated, drift-prone
copy of the rules). The rest of its content is redundant with the main guide,
but this one sentence has no counterpart there, so the guidance is lost.
Note this is a pre-existing gap in the main guide rather than a defect
introduced by #923 — the removal just makes it visible.
Proposed fix
Add the bare-
cargo testcaveat alongside the existing aliases in the"Testing & Quality" section, matching the phrasing already used for
cargo buildandcargo check:Context
Found while reviewing #923.