I'm actually kind of on the fence on this one. Let me give an example that is pretty similar:
I make a Permanent (Invisible spell) Wall of Fire, then years later while I'm on another plane of existence, some hapless fool blunders into it. I happen to be Invisible at the time. Is my Invisibility canceled? I think clearly in this case it is not, but fundamentally this isn't actually very different at all than with the Cloudkill situation described. Does intent actually factor into this at all? If not, then the Cloudkill shouldn't make him become visible either. It's simpler to not factor intent. If you do, it makes things a LOT messier at the table. So I'm kind of leaning towards the invisibility not being canceled... but I still think it feels dirty.
It's not dirty at all, it's 100% legit. You can't perceive a person as a foe if you aren't aware of them.
Now wait just a minute... So you're saying you can stab
your friend and remain invisible?
Edit: Another line from the spell. Friend/foe doesn't matter.
The spell ends if the subject attacks any creature.
So it is entirely predicated on whether something is a
direct attack or not. The spell says you can trigger traps remotely (think roadside bomb with a detonator). If that doesn't break invisibility, I think it's pretty clear that someone walking into a Cloudkill wouldn't either. Neither would the spell expanding after cast to encompass them.
So yeah, I agree that the Cloudkill example given in the OP would not break invisibility (ignoring the part about not being able to summon it mid-air).