fix(ci): make no-new-getattr guard stable in shallow PR checkouts (#38480)