I question whether there was truly a better decision. Ignoring the root cause of the problem (where the air went), when faced with the decision of doing a CESA or scramble to a buddy that isn't exactly close....
CESA... Your training should have taken you through this and you should be comfortable with this. The ascent would have expanded the air in your lungs. You would have been able to "blow bubbles" on the ascent. Assuming this wasn't a deep dive and were within NDL, then there is a very, very small risk of diver injury due to decompression issues. I think this is a viable decision from the depth discussed by the OP.
Dive down to the buddy... Although this worked, I think some have missed a few potential problems. First, the buddy wasn't right there. That is the first breakdown in the buddy system. That would leave questions in my head about how good of a buddy that is. If the OP descended to the "buddy", would that buddy be good enough to not panic and allow for shared breathing? How would the buddy react when the frantic diver approaches? Could they unclip the octo? Does the octo work? Did they go over sharing procedures prior to the dive?
Second, if the OP and the buddy had the same dive profiles and same basic starting pressures, is the buddy extremely low on air as well? (since we still haven't determined that there was a loss of gas at some point in the dive!). Starting a buddy breathe in this situation could have endangered both divers as they could both be now 7 feet deeper and both out of air and in panic.
I am glad that everything worked out. When considering this decision, I don't see one option necessarily better than the other. Either was an option. Both had risks. Any small change in the events could have been disastrous.
Im all for the buddy system. However, I also believe that every diver needs to be self sufficient. You may be comfortable with how you will react in an emergency, but you have no idea how a "buddy" will react. You must be ready for this.
I think it is very important for the OP to find out what it was the caused the OOA situation and remedy that. Assumptions on what the cause was don't work. I don't see how a pushed drysuit inflator valve by the BC would not be noticed by the diver. The OP should have noticed a huge change in bouyancy as well as air blowing out the vent at a considerable rate. Both, good indications that there could be a problem. Just to all of a sudden realize you have no air just doesn't make sense (unless it was a gauge issue, and thus questioning whether the buddy was the right choice as they would be low on air as well.)