This study considers a situation where a contractor receives an order that it commits to satisfy in full. The fulfillment of the contract requires manufacturing and inspection. Because the number of defective units within a produced lot is not known in advance, it is possible that after examining the lot, it is learned that the number of conforming units is short of the demand. If so, further manufacturing and inspection are required. Once enough conforming units are found, the inspection terminates, and the remaining uninspected units, as well as all defectives, are scrapped. Whereas previous `multiple production runs' studies implicitly assumed that inspection costs are negligible, we include these costs as a key part of the problem. It turns out that the optimal production lot size depends on the inspection cost. Our model is very general: We provide a framework to calculate the optimal batch and the expected number of inspections for any yield pattern, as well as for any inspection procedure. We also provide results and numerical examples concerning specific yield patterns that are common in practice.