test(buzz-acp): pin exact-match boundary for unadvertised model variants (#4004) - #4054
Open
iroiro147 wants to merge 1 commit into
Open
test(buzz-acp): pin exact-match boundary for unadvertised model variants (#4004)#4054iroiro147 wants to merge 1 commit into
iroiro147 wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #4004.
The issue reports Buzz Desktop letting a user set
composer-2.5[fast=false]while the cursor-agent ACP catalog only advertisescomposer-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 freshsession/newcatalog 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 acontrol_result { status: "unsupported_model" }frame so the desktop rejects the pick instead of silently no-op'ing.Changes
Two regression tests under
acp.rs::testspin that boundary against a cursor-agent-shaped catalog (one model,[fast=true]only):resolve_model_switch_method_misses_unadvertised_bracket_variantmodel_in_catalog_misses_unadvertised_bracket_variantBoth 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_modelframe → desktop live-pick rejection vialiveSwitchOutcome). 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