HSK10+
gōngkuīyīkuì
to fail through lack of a final effort
功亏一篑 (功虧一簣)
lit. to ruin the enterprise for the sake of one basketful; to fail through lack of a final effort; to spoil the ship for a ha'penny worth of tar (idiom)
CC-CEDICT