Implements gated module/nomodule validation with test cases (#31321)
Implements gated module/nomodule validation with test cases (#31321)

PiperOrigin-RevId: 343904483

Co-authored-by: honeybadgerdontcare <63085ba608efd967a3367a0e366a2664a45e032b@google.com>
mhc-gh/amphtml,Gregable/amphtml,lannka/amphtml,danielrozenberg/amphtml,alanorozco/amphtml,honeybadgerdontcare/amphtml,ampproject/amphtml,ampproject/amphtml,jmadler/amphtml,alanorozco/amphtml,nexxtv/amphtml,rsimha-amp/amphtml,media-net/amphtml,danielrozenberg/amphtml,lannka/amphtml,sharethrough/amphtml,voyagegroup/amphtml,prateekbh/amphtml,media-net/amphtml,media-net/amphtml,honeybadgerdontcare/amphtml,ampproject/amphtml,sharethrough/amphtml,zhouyx/amphtml,jridgewell/amphtml,zhouyx/amphtml,lannka/amphtml,jridgewell/amphtml,media-net/amphtml,ampproject/amphtml,ampproject/amphtml,Gregable/amphtml,smartadserver/amphtml,smartadserver/amphtml,honeybadgerdontcare/amphtml,jmadler/amphtml,mhc-gh/amphtml,voyagegroup/amphtml,danielrozenberg/amphtml,media-net/amphtml,voyagegroup/amphtml,mhc-gh/amphtml,jridgewell/amphtml,sharethrough/amphtml,nexxtv/amphtml,prateekbh/amphtml,alanorozco/amphtml,alanorozco/amphtml,mhc-gh/amphtml,ampproject/amphtml,smartadserver/amphtml,jpettitt/amphtml,mhc-gh/amphtml,smartadserver/amphtml,lannka/amphtml,prateekbh/amphtml,jpettitt/amphtml,jmadler/amphtml,zhouyx/amphtml,danielrozenberg/amphtml,jpettitt/amphtml,danielrozenberg/amphtml,jmadler/amphtml,jmadler/amphtml,Gregable/amphtml,jpettitt/amphtml,jpettitt/amphtml,voyagegroup/amphtml,Gregable/amphtml,honeybadgerdontcare/amphtml,danielrozenberg/amphtml,lannka/amphtml,nexxtv/amphtml,nexxtv/amphtml,sharethrough/amphtml,voyagegroup/amphtml,jmadler/amphtml,voyagegroup/amphtml,jridgewell/amphtml,lannka/amphtml,media-net/amphtml,mhc-gh/amphtml,rsimha-amp/amphtml,jridgewell/amphtml,alanorozco/amphtml,nexxtv/amphtml,zhouyx/amphtml,danielrozenberg/amphtml,danielrozenberg/amphtml,alanorozco/amphtml,smartadserver/amphtml,jridgewell/amphtml,jpettitt/amphtml,rsimha-amp/amphtml,ampproject/amphtml,smartadserver/amphtml,voyagegroup/amphtml,rsimha-amp/amphtml,alanorozco/amphtml,Gregable/amphtml,honeybadgerdontcare/amphtml,sharethrough/amphtml,Gregable/amphtml,media-net/amphtml,zhouyx/amphtml,alanorozco/amphtml,lannka/amphtml,zhouyx/amphtml,rsimha-amp/amphtml,rsimha-amp/amphtml,jpettitt/amphtml,sharethrough/amphtml,nexxtv/amphtml,jridgewell/amphtml,prateekbh/amphtml,mhc-gh/amphtml,zhouyx/amphtml,nexxtv/amphtml,rsimha-amp/amphtml,Gregable/amphtml,prateekbh/amphtml,jpettitt/amphtml,ampproject/amphtml,Gregable/amphtml,media-net/amphtml,prateekbh/amphtml,honeybadgerdontcare/amphtml,prateekbh/amphtml,honeybadgerdontcare/amphtml,mhc-gh/amphtml