It’s my understanding that any brake disc should originally be completely flat (no lip). I have also heard of discs being “skimmed” to remove any lip that has formed. The only issue here is that you do need a minimum thickness on any disc for it to be both legal, and more importantly, safe.
Excess lipping can cause brake squealing (other things can cause this too).
Brand new pads should sit (more or less) in the same “groove” that the old pads have worn into the disc, however, the fit is not likely to be perfect, so the edges of the new pads can be worn excessively at first if the discs have noticeable lipping, this can also affect braking, which is one of the reasons it’s wise to break new pads in carefully after first fitting.
So, to answer your question, the disc should be smooth to the edge.