Thanks, that's a careful read, and you put the limit more plainly than the post did. Yes: the command list is rebuilt from keystrokes and echo at the edge of the session, so it shows what the person typed, not what the shell ran. An alias shows up as the alias, and anything the remote side runs by itself never appears as a "command" at all. That's why the replay of the output is the main record and the command list is the second one, there to search, not to stand alone. Proof of what actually executed would have to come from the host itself, such as auditd or shell history shipped off the machine, and EnvMap doesn't claim that. Agreed on the PTY point too. The staircase took a while precisely because nobody expected a mode set on our side to reach the remote shell.
