Skip to content
Open
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
28 changes: 28 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,34 @@ test-unit:
# `cargo test --workspace`; without this step a manifest edit that
# diverges Rust from the corpus ships green.
cargo nextest run -p buzz-agent --lib
# buzz-acp harness: ACP prompt formatting, the event queue, and the pool
# lifecycle state machine. Pure in-process tests, no infra. Enumerated
# explicitly because nothing in CI runs `cargo test --workspace`;
# without this step the steer prompt-body invariants (which thread a
# mid-turn message anchors the agent's reply to) compile but never
# execute.
#
# Clearing the environment is load-bearing. `config.rs` asserts clap
# defaults through `CliArgs::parse_from`, which reads `#[arg(env)]`
# variables unconditionally, and its test module deliberately avoids
# `std::env::set_var` to dodge parallelism races — so those tests assume
# a fixed environment. Inside a buzz-acp-hosted agent it is not fixed:
# the harness sets the very variables the package under test reads.
#
# The whole `BUZZ_*` family goes, not a list of names: clearing the
# family gives these tests a deterministic no-Buzz-config environment,
# where a name list only approximates one — and the list is a function of
# the test set, so it drifts in both directions as tests are added.
# `BUZZ_ACP_LAZY_POOL` and `BUZZ_ACP_MULTIPLE_EVENT_HANDLING` break
# default assertions; `BUZZ_ACP_ALLOWED_RESPOND_TO` breaks a test whose
# premise is that the option is unset. Subshell so the steps above keep
# their environment.
(
while IFS= read -r var; do
unset "$var"
done < <(env | sed -n 's/^\(BUZZ_[A-Za-z0-9_]*\)=.*/\1/p')
cargo nextest run -p buzz-acp
)
else
./scripts/run-tests.sh unit
fi
Expand Down
Loading