There are three major things that will effect the "natural" shelf life of the compote, in that they could extend it considerably past the normal shelf life of the ingredients individually:
How sweet is it? If it is sufficiently sugary, to the level of a jam or jelly, the sugar in the compote will act as a preservative.
This is because any bacteria or mold that try to colonize the product will be dessicated, as water exits their cells into the sugar medium via osmosis.
The problem here is that sugar is hydrophylic, and will easily attract water from the environment when the jar is opened, or when a wet spoon is put into it. If the surface becomes diluted with water, and thus the sugar is less concentrated, mold can get a foothold. So this kind of product is best stored in the refrigerator once opened.
How acid is it? Very, very acidic foods are less hospitable to most pathogens.
How salty is it? This one doesn't usually apply to compote recipes, but high enough salt levels also make foods inhospitable to most pathogens, again due to the dessication of their cells via osmotic pressure.
The specific recipe you linked to--at least the compote portion itself, excluding the vinegar syrup and the rest of the recipe--appears to have none of the characteristics that lead to a long shelf life. It should be held no longer than its most vulnerable ingredient, which would be the weak sugar syrup, so it is probably good for several days to a week in the refrigerator.
Now, in general, things named compotes tend to be far sweeter, and far more acidic than the recipe you have linked to.
In these cases, as ElindilTheTall points out, a very, very sweet recipe (jelly-like or jam-like sweetness) will last for many weeks in the refrigerator, and a couple of weeks at least at normal room temperature.
Finally, many compotes are amenable to home canning, if they are sufficiently acidic.
Canning has risks, especially for botulism, so you should only use recipes and methods from a very reputable source when doing canning, to ensure that the product is sufficiently acidic to be safe for the canning method used. Follow all of the techniques and prescriptions in the methods, as well, but I won't turn this into an essay on canning, which is not my area of expertise.
For those compotes that are properly canned, you should get an indefinite shelf life prior to opening, as long as the seal on the canning jar remains intact.
True chocolate, made with cocoa butter, especially of the non-milk variety has a very long shelf life when stored in dry, cool conditions. The fact that the shape is a chip rather than a bar or disc or callet is not really relevant, except for the total surface area on which blooming can occur.
Chocolate is very, very dry, which discourages mold, bacteria, or other micro-flora or micro-fauna from growing, not even counting the preserving effect of theobromine and other alkali in the chocolate.
It also resists rancidity very well. Stored properly, it can last for many years safely.
Many brands of chocolate chips are not true chocolate, because the manufacturer may have used less expensive fats than cocoa butter, which do not have such excellent storage properties. Assuming you have a quality chocolate chip made from real chocolate, the issues you may find include:
- Sugar bloom, where the sugar comes to the surface due to moisture dissolving it and then leaving it on the surface when it evaporates
- Fat bloom, where the cocoa butter separates out onto the surface for reasons not thoroughly understood
- The chocolate can lose its temper from warming and cooling cycles, if it gets too warm; this will change its texture to softer, more gritty, and less pleasant
- The cocoa butter could go rancid (which I have never experienced)
The first three are aesthetic and cosmetic issues, but the chocolate can still be used in recipes or melted down and re-tempered.
Having it go rancid would be cause to throw it out--but chocolate is very hardy, and resists rancidity--so if it tastes fine, it is still usable.
After two years, you are quite likely to have experienced bloom. The chips will look like they have a white coating, and may feel gritty. While this makes it less pleasant to eat out of hand or in applications where it won't be melted down, it will still perform well in recipes where it is melted.
They are certainly safe to eat (again, assuming real chocolate, and no rancidity), but they may not have the same pleasant texture and crispness that you would expect. This is why manufacturer's give them a best by date.
Note: you can tell whether they are real chocolate by the ingredient list (at least in the US, and other places with comparable labeling laws). Real chocolate will consist of:
- Cocoa solids, cocoa, cocoa mass, cocoa butter, cocoa nib, or chocolate liqueur (all words indicating products of the cocoa bean)
- Sugar
- Flavoring (such as vanilla or salt)
- Perhaps lecithin as an emulsifier
Signs that the product is not real chocolate include other ingredients, especially other fats in lieu of cocoa butter (which is comparatively expensive, and marketable to the cosmetics industry).
Milk chocolate, which also contains milk solids and milk fat will not last as long, but still probably has a shelf life measured in years when stored under proper (cool, dry) conditions.
White chocolate chips do not have the additional preservative effects of the cocoa solids and their alkali, and also have dairy solids and possibly milk fat, so they have the shortest shelf life of all. It also tends to pick up off flavors if not in a perfectly sealed, air tight container. White chocolate, I would not keep more than year or so.
Of course, chips that are made from other ingredients than true chocolate are going to have a shelf life based on their ingredients, but I cannot speak to that, and anyway, in my mind, they are not worth storing.
See also:
Why does dark chocolate turn white after being in cold for some time?
Best Answer
In a sealed package, (not getting into what date may be printed on it for "expiration") practically speaking, sealed and dry, it appears to keep "essentially forever."
Once opened, not nearly so long, though that is not something I've done much personal experimentation with.