Deputising for the injured Bairstow, Foakes laid the platform for England's match-defining first-innings total with a century and followed it with an outstanding display of keeping. In the process he became not only the first England keeper to make a Test century in Asia (and only the second to make a century on debut) but equalled a record for the quickest dismissal by a keeper in their first innings when he took a catch from the second ball of the Sri Lanka reply.
But instead of presuming his performance would ensure he retains his position for the second Test, Foakes acknowledged Bairstow's record and the level of competition for places in the England squad. And, having arranged to take a winter away from cricket - Foakes had declined the opportunity to go on a Lions tour and planned to rest until his call-up as injury cover less than two-weeks ago - it seems he is viewing everything that comes his way as something of a bonus.
"Jonny, I think, will be fit [for the second Test]," Foakes said. "I guess he's the No. 1 and if I play one game I'm quite happy with that one.
"The big thing for me is just making my debut and being able to say I'm an England Test cricketer. Regardless of what's happened, that's such a special feeling that no-one can take away. To be honest if you asked me two weeks ago, I was having six months off, so to be sat here now is unbelievable."
It was noticeable that Bairstow was one of the first to congratulate Foakes when he walked off having made that first-innings century. And Foakes insisted he has had nothing but support from his team-mates.
"It's such a good team environment to walk into," he said. "Everyone wants everyone to do well. You can understand in some teams there's different guys going for different spots, but there's none of that."
Foakes' performance also drew praise from England's captain, Joe Root, who said he was relishing the tricky selection decisions he would have to make ahead of the second Test.
"It's really pleasing to see someone come in and really enjoy the occasion," Root said. "He wasn't overawed at all. He came in under pressure but played with maturity and an understanding of his own game in a difficult position. And he took every chance.
"We've some difficult selections ahead, but I'm not complaining about that. It's great to see the strength in depth in this squad. I'm going to enjoy that difficult selection meeting. It is going to be tough. But that's what you want. You want guys performing, you want to make those tough calls.
"Ultimately, it's about a group performing. Not making it about yourself being involved in the XI. It's about being part of this squad. I think that's the most important thing. The real achievement is to be part of this squad to hopefully go on to win this tour."
England will now break the long road journey to Kandy - a six-hour drive from Galle - by spending a night in Colombo, which is about a third of the way. They will mark Armistice Day on Sunday with a two-minute silence at their hotel in Kandy at 4.30pm local time, which is 11am back in the UK.