As the Stark, Targaryen and Lannister armies vie for war - and ready against the ever-growing threat of the White Walkers - Game of Thrones appears to have been secretly crafting its own meta narrative, suggesting that Samwell Tarly is an in-universe George R.R. Martin and author of novel series A Song of Ice and Fire.
In Season 7 Episode 2 "Stormborn", we rejoined with Sam now an apprentice in the Citadel as he trains to become the Night's Watch's own Maester and research ways to fight against the encroaching long night. He's an assistant to Archmaester Ebrose, who during a library visit reveals that he's writing "A Chronicle of the Wars Following the Death of King Robert I". Sam quips back that he'd call it "possibly something a bit more poetic".
Now those familiar with Westerosi lore will know that another way to frame "the wars after Robert's death" is "the very show we're watching now"; Game of Thrones starts in the final days of Robert's reign, with the never-ending run of deaths and betrayals catalyzed by his murder. The implication is pretty clear: the book Archmaester Ebrose is working on is the show's own version of George R.R. Martin's A Song of Ice and Fire, something that many are now expecting for Sam to finish up.
This has been a popular fan theory since the end of Season 6 when Sam first arrived at the Citadel; the reveal of the Maester's home base having a hanging lamp identical to the one seen in the opening sequence teased some bridge between the story we're being told and its method of telling. This latest step furthers that, bringing the book into existence and leaving little doubt to its meaning. At present it appears is that Ebrose is the one writing it, but the framing puts the onus on Tarly finishing (and titling) the tome.
A major turn like this would be a real justification of Sam's somewhat meandering plot line. Yes, he's recently learned about the presence of dragonglass on Dragonstone (albeit something he already suspected care of Stannis) and started work on curing Jorah Mormont's grayscale, so the thread isn't without merit, but nevertheless, when the show is running apace towards epic confrontation his awkward family politics felt quaint. Having this all be building towards an author reveal earns it such a prominent amount of screen time.
If true, this would be a rather revealing plot point, indicating that Sam not only survives to the end of the show but presumably winds up becoming a Maester himself. That would obviously, in turn, mean the White Walkers' rampage is stopped, although few fan theories suggest anything else; practically it sees the most unlikely of Thrones leads - Sam was first introduced as a pathetic Night's Watch recruit - become its ultimate chronicler.
Of course, at this point it's unclear if this was a solitary mention for fans to pick up on or the indication of a major forward-focusing plot point. However, we definitely have evidence there's more to it - at least in the book mythology. Author George R.R. Martin's adoration of The Lord of the Rings mastermind J.R.R. Tolkien is well-documented - his second middle initial is a direct reference and Thrones is explicitly written as a subversion of fantasy tropes formed by the Middle-earth legendarium - and this may be his most overt homage; The Hobbit and The Lord of the Rings are both in-universe texts, written by Bilbo and Frodo Baggins respectively recounting their adventures, allowing Tolkien to pass comment on the nature of storytelling in what was initially an experimentation in language.
Presuming that this is something showrunners Benioff and Weiss have lifted from the author's notes for his yet unpublished final two parts, The Winds of Winter and A Song of Spring (something they're still doing despite the show now forging its own course), it would seem Martin is indeed trying to emulate his idol's structure. We even have it involving a character named after a Rings hero, Samwise Gamgee.
More than just a wink-wink nudge-nudge moment, though, this could prove to be one of Game of Thrones' most thematically rich directions that consolidates many threads while resolving long-standing criticisms.