The localized breakdown and repair of passive surfaces during pitting