Whoever the negotiation says. No Pennsylvania rule assigns the cost; it is a repair item like any inspection finding. Sellers commonly install before closing, credit the price at settlement, or split it, depending on leverage and timing.
More detail
Each standard outcome has a logic worth knowing before you argue for one. Seller-installs-before-closing gives the buyer a verified number and the seller control of the scope and vendor; its risk is calendar, since install plus verification must fit before settlement. A credit at closing moves fastest on paper and hands the buyer vendor choice, with the system going in after move-in; a written fixed-price quote during the inspection window keeps the credit honest, since an unpriced credit negotiation rewards whoever guesses more aggressively. Splits usually reflect a borderline number or shared urgency. Market temperature does the rest; in a competitive listing, buyers eat more of it, and in a slow one, sellers do. What serves both sides identically: a certified test report nobody disputes, a scoped quote with a real number on it, and a verification test with the PA DEP certification number closing the loop. That paperwork is the whole peace treaty. The disclosure FAQ explains what was known when, which is where these negotiations usually begin.