here is how i test if food is edible:
method 1: take the food out, stare at it for a few minutes. if it doesn't move, it's still good.
method 2: open the fridge and yell "BOOO!!!". anything that doesn't run away in fear is still good.
more seriously: keeping food edible requires proper storage conditions. as long as the bread is kept dry, it is good. if it starts to harden that is a good indicator that it was dry enough. even hard bread is still edible if soaked in liquid.
but beware of humidity. mold is treacherous and initially invisible. once i see any bit of mold on a bread, then the whole loaf is lost.
on the other hand, on jam or cheese i'll just cut the mold away generously and eat the rest. with cheese especially i expect that most of the mold is edible anyways. i still cut it away though, just to be safe.
also, to help food keep fresh longer i don't buy sliced bread or cheese for example. the slices have more attack-surface and go bad faster. it's less of a difference for bread because mold can get through anyways, and slices will only dry up faster. with cheese and meat however, the smaller surface really helps to protect the inside.