Constraining the origin of the rising cosmic ray positron fraction with the boron-to-carbon ratio