Smart AIs like Cortana do not have a literal lifespan of 7 years. Their minds have a safe, stable lifespan of 7 years before AI’s begin to “think themselves to death” in a state known as rampancy. It is around this time that these AIs are decommisioned before they can cause any major harm. Cortana was corrupted by the Gravemind and received a wealth of information from Alpha Halo and the Ark, so her condition could be much worse. It is not known how this will affect Cortana at the moment, but she will still be rampant.
Like the AI in The Cole Protocol, rampant but still able to handle herself and others… perhaps Cortana will be the same way. Maybe John will find something that will stabilize Cortana or take most of the weight of information off her. We’ll know when we play Halo 4’s campaign.
As of right now Cortana has crossed over into what is called Meta Stability.
Most A.I. don’t make it past the third stage of Rampancy.
Since Cortana is one of the few that did make it to the fourth stage, she became a “real person”.
I’m going to assume that Cortana also found Forerunner data on how to extend her longevity.
Probably something related the Forerunner Monitors or Ancillas, seeing as they can live for thousands of years.