The explanation is above - the specifications we are working from don't allow us to act unilaterally like that. In the case we are talking about, i.e. something calling delistResource(TMFAIL) there is nothing in the specs to say Narayana can or should then call setRO. I think your interpretation is that if one of the Xids ends up with TMFAIL then the whole transaction must abort but that isn't my reading of the specs.
No, if XAResource.end() throws an exception you can do MARK_FOR_ROLLBACK. However, the XAResource implementation may not have the proper checks in place, or it may choose to wait until commit() to throw a XAER_RMFAIL, and a lot of work could happen between those two places...
delistResource(xaRes, TMFAIL) will result in xaRes being removed from the intentions list so commit won't be called on it. Where do you think that is not the case?
Have you looked at the Narayana code? Did you understand what I said earlier about TMFAIL as a parameter to delistResource versus as a return code from end()?