My port of the serialization code is growing somewhat more cursed. I think I see a way to rescue some of it, but it'll need some test rewrites to reduce boilerplate first.
The basic issue I have to address is that a bunch of the StoryState deserialization in the C# version strongly expects the StoryState to already exist. This really isn't intuitive to me, but I can deal with it. The only logical value for the StoryState to start with is the initial value that can be generated by going through the global decl container. Currently, this is generated from a top-level function in the package root, but I can switch it to a class method easily enough.
In fact, I'll take care of some of that now. And when I did, I removed some imports and that made it fail with a circular import error. Somewhat. Cursed. (Am I going to need to write a distinct test run for importing each module at the top level of the test script? Because the fact that importing modules in the wong order can mess things up this bad is... bad.)
Anyway, I'm going to go lie down and try not to think about that too hard.