test(agents): cover nil model catalog state

This commit is contained in:
ayattara
2026-09-09 01:13:42 +00:00
parent b8c2895f09
commit 6dba59d7a5
@@ -33,6 +33,12 @@ func TestApplyStartModelPolicyExecutorAuthority(t *testing.T) {
policy: StartModelPolicy{Model: "host-only-model", FallbackModel: "fallback"},
wantErr: `requested model "host-only-model" is unavailable (reason: catalog_empty)`,
},
{
name: "exact model with nil catalog state fails without calling executor",
state: nil,
policy: StartModelPolicy{Model: "host-only-model"},
wantErr: `requested model "host-only-model" is unavailable (reason: catalog_empty)`,
},
{
name: "advertised fallback is applied",
state: modelState("fallback"),