Files
buzz/crates
Tom Brow 7e7ec731cd test(cli): keep the raw refusal exit test independent of BUZZ_* env (#9733)
## Summary

Follow-up to #9653. Its new test
`cli_exits_nonzero_when_the_relay_refuses_a_raw_publish` went through
`run_from_args`, which resolves credentials from the caller's
environment. With `BUZZ_AUTH_TAG` set (as it is for agents run by the
ACP harness), the test client's key doesn't match the auth tag and the
test exits 3 instead of 2.

The check moves to an integration test,
[`tests/raw_publish_exit.rs`](c77555c348/crates/buzz-cli/tests/raw_publish_exit.rs),
that runs the built `buzz` binary against a fake relay answering
`accepted:false`, with every `BUZZ_*` variable removed from the child
only. It asserts exit 2, empty stdout, a `relay_error` and one
submission, so it covers the binary's real route and exit mapping.

## Regressions

None: test-only change.

### Validation

Ran the `buzz-cli` suite with a junk `BUZZ_AUTH_TAG` and
`BUZZ_FEDERATED_IDENTITY_TOKEN` set. Replacing the `Cmd::Raw` dispatch
with `Ok(())` makes the new test fail.

---------

Signed-off-by: Tom Brow <tomb@block.xyz>
2026-11-19 20:13:00 +00:00
..