You still haven't explained how the keyword were there and assigned and then disappeared from either the image or the keyword list. I can assure you that LR does not arbitrarily remove keywords from images. I also think that you are probably the only person to have this problem. So, where do you think the error got into your catalog?
The keywords were there because I added them. Two years ago I began scanning 10,000 historical family images, identifying the people, locations and date or capture as best I could. Some I wasn't too sure about, but for portraits of myself, mother and father, I was pretty sure who they were. During this time I've had these images in and out of LR, trying to find a better DAM. Some were better in other ways, but I finished up back with Adobe. In fact, I've been with Adobe since version 1. Each time I've migrated I've checked and double checked the keywording and evolved the chronology based on year and month. Almost all the dates I come up with are estimates based on other estimates, often based solely on distant memories, hair style, location. or by guessing someone's age. I have lists of births , deaths, marriages and divorce, the cars I and my father owned, and many other clues to work from, but not necessarily the precise date surrounding all those events.
I'm continuously reviewing the images and why anomalies get noticed. It's an obsession and continues to be an ongoing process and will do till someone, Adobe or other, comes up with something better. Fuzzy dates and a visual timeline would help, but I do make use of Numbers, OmniOutliner, MindNode, Ninox Database and temporary scraps of paper.
Despite my extended experience with databases, including database design and writing of SQL code in a previous life, I'd never really paid much attention to the LR checkboxes for ancestors until recently. Any alterations of that kind are a cause for concern, so I backup before changing anything and search for possible errors during and immediately after.
Finally, to further answer your question, I don't think any software engineer would be arrogant enough to claim their software was absolutely bug free, so it would be absurd for me to claim 100% certainty about missing keywords. However, with a small number of photographs which are particularly memorable and key to the dating structure, I am sure those keywords had been previous added, checked and double checked.
P.S. You haven't really answered my original question. What exactly does "Test Integrity before backing up" actually do?