It is quite common for one partner to test positive and the other negative, even if they have been having sex without condoms.
Mostly this is explained by luck and the role of other risk factors. Over time, most people will catch HIV if they continue to be at risk.
Even though you have been exposed and not infected, you can still catch HIV in the future.
Now you know your partners HIV status you can still stay together and have sex safely. You can prevent infection by using condoms when having sex and not sharing needles or blood products with your partner.
The risk of transmission also drops dramatically if and when your partner uses HIV treatment for their own health.
This is an exciting new area of research.
The link between viral load and the risk of transmission has been known for at least ten years.
More recent studies have strengthened the link between an undetectable viral load and a reduced risk of transmission.
These are mostly heterosexual studies. There is little or no data on the impact of risk from anal sex (gay or straight). Much of the follow up in these studies is also from people who still use condoms.
An undetectable viral load does not mean zero risk but it does dramatically reduce the risk.
There has been at least one case of HIV transmission reported from anal sex with an HIV positive insertive partner who had an undetectable viral load and no STIs.