1. A polishing endpoint detection system, comprising: a light source to direct a light to a substrate while the substrate is being polished; a spectrometer to measure a sequence of current spectra of light reflected from the substrate while the substrate is being polished; and a controller configured to store a predetermined criterion for detecting an endpoint using a selected peak or valley in a spectrum of light, receive the sequence of current spectra from the spectrometer, identify the selected peak or valley in each current spectrum in the sequence of current spectra, wherein the selected peak or valley persists with at least an evolving location or width through the sequence of current spectra, measure one or more of a current location and a current width of the selected peak or valley in the current spectrum, and generate a signal to halt polishing of the substrate when the current location or the current width, respectively, of the selected peak or valley satisfies the predetermined criterion.