Indeed, I will rename it to psbt_session_id
to be more explicit. Sorry for being too handwavy on the ‘Generalization’ section - I added it for completeness as I think it’s practically useful, but it wasn’t the main focus, nor the part that worried me.
Thanks a lot for the comments, that’s very helpful!
EDIT: oh well, it looks like I'm out of time to edit the original post. But I will take into account the comments on the naming when I write the code!