Skip to content

Document that bare cargo test fails at the workspace root #1092

Description

@aram356

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions