I have a spreadsheet to keep track of my oil -

it could be the CPA side of me or I am just OCD.
My oldest oil is a gallon jug of Chevron Delo 5W40 full synthetic dated February 2020. So it is 4 years 5 months.
The other thing I have a 21 quarts from 2021, 9 from 2022, 7 from 2023, 4 from 2024. Not counting partial bottles.
When it was new back in 2021 - I took off the cap and discovered the seal had been broken - the oil looks dark sort of black if I shine a flashlight into the open cap - but is more like dark honey if I pour it into another jug. Bottom of jug was clean.
So I am thinking still good.
Then I transferred it back to the original container and it has a foam on the top. 15 minutes later still foamy.
My choices -
Dump it at AutoZone
Use it next in the mower - which would take 5 years.
Keep it but start using the oil from from 2021 and if I get in a jam like a long stretch of generator usage then check it again and mix it up with Chevron Delo 15W40 that is newer.
It was on clearance at WM - I think it was $10 - logically it is still good - but risking damage to a $1K generator to save $10 in oil is not a great idea.