Skip to content

test(buzz-acp): pin exact-match boundary for unadvertised model variants (#4004) - #4054

Open
iroiro147 wants to merge 1 commit into
block:mainfrom
iroiro147:claude/issue4004-20260801
Open

test(buzz-acp): pin exact-match boundary for unadvertised model variants (#4004)#4054
iroiro147 wants to merge 1 commit into
block:mainfrom
iroiro147:claude/issue4004-20260801

Conversation

@iroiro147

Copy link
Copy Markdown

Summary

Refs #4004.

The issue reports Buzz Desktop letting a user set composer-2.5[fast=false] while the cursor-agent ACP catalog only advertises composer-2.5[fast=true] — so the session silently runs (and bills) the wrong variant.

The runtime boundary that decides this lives in resolve_model_switch_method / model_in_catalog (crates/buzz-acp/src/acp.rs): both match the desired model id against the fresh session/new catalog by exact string equality. The miss is intentional and load-bearing — the pool's fallback arm (crates/buzz-acp/src/pool.rs:955-977) consumes it to emit a control_result { status: "unsupported_model" } frame so the desktop rejects the pick instead of silently no-op'ing.

Changes

Two regression tests under acp.rs::tests pin that boundary against a cursor-agent-shaped catalog (one model, [fast=true] only):

  • resolve_model_switch_method_misses_unadvertised_bracket_variant
  • model_in_catalog_misses_unadvertised_bracket_variant

Both assert the bracket-suffixed variant composer-2.5[fast=false] does not match when the harness never advertised it — the exact behavior the silent-billing report depends on for detection.

Why test-only

The detection + surfacing chain already exists in current main (exact-match miss → unsupported_model frame → desktop live-pick rejection via liveSwitchOutcome). The reporter's observed silent fallback is consistent with running a harness/desktop build older than that chain. This PR pins the contract so the boundary can't regress silently; it deliberately does not add fuzzy/bracket-insensitive matching, which would trade a loud, fixable UX miss for silent execution of a model the user did not select — the failure mode #4004 is itself reporting.

Test plan

cargo test --lib -p buzz-acp           # 663 passed (661 existing + 2 new), 0 failed
cargo clippy -p buzz-acp --all-targets # clean

…nts (block#4004)

Cursor-agent's ACP catalog advertises `composer-2.5[fast=true]` as the only
Composer 2.5 model id. When the desktop persists an unadvertised variant like
`composer-2.5[fast=false]`, the exact-match in `resolve_model_switch_method`
and `model_in_catalog` must miss so the pool's fallback arm
(`pool.rs:955-977`) surfaces `unsupported_model` to the desktop instead of
silently applying the agent default (billing the user against `fast=true`).

Two regression tests under `acp.rs` pin the boundary with a
cursor-agent-shaped session/new catalog.

Refs block#4004.

Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant