The student can play the piece. Mostly. There's still an awkward corner, the ending needs work, and last week the middle was better than it is today.
So it stays on the assignment. After a while, the student has a folder full of music that's nearly done and very little they feel ready to play for someone.
Decide what this piece was for
Was it introducing a rhythm, preparing for a performance, or giving the student something enjoyable to play? Those goals need different finish lines.
A first encounter with a new technique may have done its job before the whole piece reaches recital standard. A concert piece needs time for starts, endings, and getting through under pressure. Say which job you're working toward.
Choose a few things you'll listen for. For example: a steady pulse through the middle section, the agreed fingering at the shift, and an ending the student can reach without stopping. Keep the standard appropriate to their current level.
Practice putting it together
If you spend every lesson fixing isolated measures, make time to reconnect them. Try a short lead-in to the difficult spot, then continue beyond it. Hear the join rather than just the repaired measure.
Practice the ending before another full run. Start from different landmarks so the student has places to recover if something goes wrong.
Then hear the whole piece without correcting each slip. Afterward, ask what held together and what still prevented the performance they wanted.
Set a day to play it for someone
If the student wants a small performance goal, agree on one: play it for a family member, make a recording with permission, or bring it to a low-pressure studio sharing session. Give them a date and enough time to prepare.
A student who doesn't want an audience can still have a final lesson run-through. The point is to decide when you'll hear it as a complete piece.
After that, discuss whether to keep it in a short repertoire rotation, revisit it later, or move on. Note anything unfinished that deserves work elsewhere.
You can return to a piece after learning other music. Closing this assignment doesn't require pretending that nothing could ever be improved.