> My main point is that following the spec doesn't guarantee shell scripts will be portable, which is a common misconception.
That feels like a failure in the spec. Your example illustrates it: echo has unspecified behavior that literally prevents it from being portable.
Is it possible portability is just not a feature of posix?
I honestly don't know! What I know is that there is an intersection of features that work with polyfills and tweaks in all shells. That intersection has a lot of the spec, but also has a lot that is not specified anywhere.
I started to build something here 12 years ago: https://github.com/Mosai/workshop. Then here 2 years ago: https://github.com/alganet/coral
Now I'm attacking it from another angle, trying to document what I learned methodically and share the tools I made for me with everyone else.