Asalamualaikum wa rahmatullahi wa barakatuhu,
I believe this is a very complicated topic, but I’ll try to sum it up in three points.
Don’t put people in a situation where they would have to: a) openly lie about something as important as fasting during Ramadan.
b) openly admit they’re not doing something Allah commanded them to do. It was private before but you forced it to become public, AND you put the person in a position where they could end up showing courage against Allah which is very very bad.
c) you’ll force them to explain a valid reason which may be a private matter and none of your business/not your concern. Edit: and let’s not forget it may be embarrassing for them to talk about.
If it’s for small talk then just don’t. I get it and I’m sure everyone else does too. We don’t know what else to say and without thinking just blurt it out, “so… are you fasting?” As muslims we should, and have to, think before we speak so take this as a reason to be more careful with your words.
Thoughts? Any situations where you will have to ask no matter what? Please note that whatever reason you give I will try to find a reason why you shouldn’t as well as how it could be handled in a different way. If I can’t find any alternative then I’ll admit that.