Alameda county does something similar for health reasons. All home sales require pressure testing the sewer lateral. With replacement required if it fails before the deed can transfer or a loan is funded.
But the buyer gets the benefit of the repair. I'd probably push for at least a 50:50 split (or, have the line inspected before listing the house for sale, and if it needs repair add that to the asking price).