The following is purely hypothetical (;-)).
Someone has the custom to not sell chametz gamur before Pesach, ie. real chametz items like cakes, cookies, bread, etc. They only sell things that might contain chametz, or things that aren't "Pesadik". As such, when they arrange the sale to the non-Jew, they didn't have in mind to sell any chametz gamur. Instead, the person's intent was to either consume, or seek out and destroy all chametz gamur before Pesach.
What would be the law if, by some unfortunate mix-up, they put all their chametz gamur items in their box of "chametz" items to be sold to the non-Jew. They realize their mistake on Pesach. Were these items included in the sale? I could look at this in two ways. It's basically as if they had explicit intent not to sell these items, as they were supposed to go in the garbage/fire and not in the box with the other things. They also never sell these items to a non-Jew. On the other hand, maybe you could say that had the person known they had chametz in their possession on Pesach, even chametz gamur, they would have sold it before Pesach. Or maybe it depends on how the sale is formulated? I believe it usually says any chametz in my possession. Although, you would still need intent to sell for it to actually take effect.1
Perhaps a more extreme example of this is when erev Pesach falls on Shabbos, so the person set aside two pieces of pita to eat during the Shabbos meal, before the prohibition of eating chametz kicks in. I believe in these instances the sale is conducted before Shabbos. What would be the law if these pitas went missing, and the person in the end didn't consume them on Shabbos. On Pesach they realize that they ended up in the bag in fridge with all the "chametz" items that were sold to the non-Jew. Were these pitas also sold? Or since the person had explicit intent before Shabbos to eat them on Shabbos, it's clear they weren't supposed to be sold. Yet again, maybe you can say that had they known they would have gone missing, they would have wanted to sell them.
Do the poskim discuss such cases?
1 I think the sale is meant to cover any chametz that somehow was missed during the search-and-destroy. I would think that this would include chametz gamur, as a safety measure, even for those who normally don't knowingly sell chametz gamur. My only concern is this case is different, as these items were meant to be destroyed, yet got mixed up and put in the wrong box.