test: cover stdio lifecycle (#41) and complete hot-reload edge cases (#40)