mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Extract agent_model_discovery_config — a pure helper returning the command/args/model/provider/provider_env_var/env that get_agent_models consumes (the descriptor-backed successor to the deleted saved_agent_model_discovery_config). The command now destructures the struct instead of composing the resolvers inline, and both discovery tests assert on the helper. Review finding (Wren + Dawn, independently): the rewritten model_discovery_ignores_stale_record_for_linked_agent asserted on the two general-purpose resolvers directly, so mutating get_agent_models back to stale record.model/record.provider bytes survived the full suite — main's original test killed that exact mutation. With the helper as the tested seam, the mutation now fails the test. Test/refactor only; no production behavior change. Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>