  Solar wind electrons are accelerated and reflected upstream by the
terrestrial bow shock into a region known as the electron foreshock. Previously
observed electron spectra at low energies are consistent with a fast Fermi
mechanism, based on the adiabatic conservation of the magnetic moment ({\mu})
of the accelerated electrons. At higher energies, suprathermal power law tails
are observed beyond the level predicted by fast Fermi. The SWEA and STE
electron detectors on STEREO enable measurements of foreshock electrons with
good energy resolution and sensitivity over the entire foreshock beam. We
investigate the electron acceleration mechanism by comparing observed STEREO
electron spectra with predictions based on a Liouville mapping of upstream
electrons through a shock encounter. The foreshock electron beam extends up to
several tens of keV, energies for which the Larmor radii of electrons is tens
of km or greater. These radii are comparable to the scale sizes of the shock,
and {\mu} conservation no longer applies. We show that the observed enhancement
in the foreshock beam beyond fast Fermi levels begins at energies where this
assumption breaks down. We also demonstrate, using the Liouville mapping
technique, that the strahl plays an important role in the formation of the bump
on tail instability. We discuss this in the context of recent observations in
the foreshock and in solar wind magnetic holes.
