@@ -4857,7 +4857,7 @@ func TestTransform_PathMatchingEdgeCases_AllowAll_PolicyMoreGeneral(t *testing.T
48574857
48584858func TestTransform_PathMatchingEdgeCases_AllowAll_NestedWildcardPolicies (t * testing.T ) {
48594859 // AllowAll: Multiple nested wildcard policies with no exceptions
4860- // All policies should attach to catch-all operations
4860+ // Broader wildcard policies should also apply to nested wildcard operations
48614861 transformer , _ := setupTestTransformer (t )
48624862
48634863 policies := []api.LLMPolicy {
@@ -4916,8 +4916,9 @@ func TestTransform_PathMatchingEdgeCases_AllowAll_NestedWildcardPolicies(t *test
49164916 nestedOp := findOperation (spec .Operations , "api/v1/*" , "GET" )
49174917 require .NotNil (t , nestedOp , "api/v1/* GET should exist" )
49184918 require .NotNil (t , nestedOp .Policies )
4919- assert .Len (t , * nestedOp .Policies , 1 )
4920- assert .Equal (t , "NestedPolicy" , (* nestedOp .Policies )[0 ].Name )
4919+ assert .Len (t , * nestedOp .Policies , 2 )
4920+ assert .Equal (t , "TopLevelPolicy" , (* nestedOp .Policies )[0 ].Name )
4921+ assert .Equal (t , "NestedPolicy" , (* nestedOp .Policies )[1 ].Name )
49214922
49224923 // Find api/* operation
49234924 topOp := findOperation (spec .Operations , "api/*" , "GET" )
0 commit comments