Some one called @MrOvershoot
I don’t work in flour milling now!
I retired after 31 years in it, though it’s not changed in the 2 1/2 years since I finished.
IMO and with my knowledge based on storage of 1000’s Tonne’s at a time, after 6 months it starts to drop off in baking quality that’s for a strong white bread flour 12.5% protein and above.
White cake/biscuit flour up to a year but you will have variable results if your product has fruit in i.e. in a cake it will all sink to the bottom.
Brown & wholemeal flours can go off in 3 months depending on the wheat germ level, wheat germ goes rancid pretty quickly as the natural oils degrade.
If your plain flour has been in a cool dry dark place & well sealed then it should be OK, obviously if it has a musty smell then it probably has flour beetle in it pretty much all flour has the possibility to have confused flour beetle or flour mite’s in due to their eggs being so small that they are impossible to sift out with even the finest sieve meshes.
Some cake flour will have been heat treated to kill off a particular enzyme that effects the baking process and by doing so will kill any eggs.