Whether we have a white plate or a yellow plate, in most cases, we are all still learning how to race. In the learning process, sometimes comes that moment of decision where it does not end up quite right, as in your example. Had the other rider pulled off the pass, it would be the highlight of the bench race with beer in hand. Luckily for all of us, this scenario happens more than the converse where friends are packing up your pits for you.
So as you are an up and coming racer, I will ask you some questions and please don't take them the wrong way as I agree whole-heartedly with Budman's assessment, but this is for you for the future
Did you hear or feel the rider coming up to you?
If first and second place went by, did you factor in that more riders may be coming?
If you did factor in that more were coming, did you inadvertantly stay off line a bit longer to allow someone an inside pass?
Something that I have been for the most part very lucky in my career, I have always been pretty good at hearing things. I think this was a 2-stroke thing as any funny noise could be your motor seizing. The other thing was that when riding a 2 stroke, when a 4 stroke would come near by, audible harmonics would change, and if it was a big twin, I could actually feel pulsations. In short, these sensitivities became like eyes behind my head and let me know where people were in and around me.
Also, learning to use my peripheral vision has been tremendous in my safety. Did you see him?
If you did, was it possible to stand your bike up a bit, but stay on your line?
Could you have used some front brake?
I am glad you are ok for the most part and sad that this happened to you and happy the air fence did it's job. But racing is a constant learning process and a constant state of processing information. Again, the things that I am asking you are not to make you feel bad, but perhaps things you could throw into your arsenal of tools or perhaps refine to hone your racecraft. But good on you for asking!
And I am pretty sure, or at least I hope, the other rider is processing information as to what to do the next time this same situation occurs and has refined the timing and/or the line to make the pass successful.
And in the spirit of keeping things positive, I would say that the young riders these days are not overly aggressive, but perhaps situationally under aware of the track in it's entirety as opposed to just their line....and I blame video games for this
humbly offered,
Kaz