Let us assume for a moment that the codebase of the game is nice, clean and well documented (or if it’s not that it will be refactored until it is).
One possible way of achieving backward recorded game file compatibility would be to have the game keep one .dat fileset per version around and then in the code, define a GameRules Interface and have each version implement that Interface.
Inheritance and method overloading could be utilized to not have to duplicate unchanged rules in newer versions.
All game-logic specific code (e.g. damage calculations, pathing algorithms, unit behavior, targeting priorities and whatnot) would need to be encapsulated in the GameRules implementation class of each version.
The recorded-games-viewer inside the game could then simply grab the version number from the replay file, load the appropriate .dat fileset and instantiate the appropriate GameRules object and everything would “just work” from there.
I keep my fingers crossed, hoping that something like this will be implemented in the future.