How to execute script on balena ssh login to container?

After a bit of digging on the ssh -t options I found this known issue if I’m not mistaken @nucleardreamer ?

I’ve been looking for an easy way to run scripts on ssh login and this was helpful:
Medium: Using Automator to Insert text with a Shortcut Key on Mac

I’ve been able to add shortcuts for common scripts like pytest --disable-pytest-warnings since the ssh shell does not remember previous commands in the same way basic terminal does. The challenge with testing is that the container you are testing also restarts each time you update the code or the tests, causing a loop of ssh back into the container and running the test script again. Any other insights on this appreciated.