Another gotcha: the BSSMAP Handover Failure message is only sent from BSC to MSC, not in the other direction.
3GPP TS 48.008: "3.2.1.16 HANDOVER FAILURE
This message is sent from the BSS to the MSC via the relevant SCCP connection. It indicates to the MSC that there has
been a failure in the resource allocation process on handover, and that the handover has been aborted."
"3.1.5.3.2 Handover Failure
If a HANDOVER FAILURE message radio interface message is received from the MS on the old (main) channel by the
old BSS, the old BSS shall then send to the MSC the BSSMAP HANDOVER FAILURE message [...]"
So again, the current osmo-bsc behavior is correct and tests are sufficient. A Handover Failure is always received in form of an RR Handover Failure from the MS, and forwarded as BSSMAP Handover Failure to the MSC.
The MSC never sends a Handover Failure to the BSC. FYI, osmo-bsc ignores incoming BSSMAP Handover Failure message (which is fine, since the MSC should never send it).
20190709164917197 DMSC INFO Rx MSC DT1 BSSMAP HANDOVER FAILURE (osmo_bsc_bssap.c:1045)
20190709164917197 DMSC NOTICE Unimplemented msg type: HANDOVER FAILURE (osmo_bsc_bssap.c:1068)
All of the avenues where I suspected failure mentioned in this issue have been explored and things actually are completely fine.
Will spread some comments in the code to clarify for the next person wondering about this...