I'm fine with a failed roll alerting her if her existence was decided prior to the roll. I'm not fine with the roll failing and the DM saying "hmm, it's a kitchen, I guess a cook is involved".
Decided in what way? Written down in some way? Included in some boxed text? Statted out as full fledged NPC?
Is it not enough to simply imagine that a manor house or castle or similar dwelling would have servants, and that one of the most common types of servants would be a cook?
Do we also need to have the night watchmen similarly decided ahead of time? The innkeeper? Every single NPC that might exist in the town?
Is the estate in question actually defined enough that the GM knows where the map is? That would improve the scenario somewhat, from my perspective. But that kind of detailed mapping seems to require more prep than these games want.
Or is it just known vaguely, like "in the study on the second floor", with no other details known?
In the example as presented, we have no idea. That’s why its usefulness as an example has been challenged. I mean… I think it’s enough to get the idea across to those unfamiliar with it (or, I would have thought that, prior to this thread), but it’s nota very solid example at all.
How all that would be handled depends very much on the game in question, and then, upon the GM in question.
Assuming the game was 5e D&D and the GM was me, I’d have some notions about those things… the location of the map and so on. I’d likely also telegraph the presence of someone moving around beyond the door.
If I did decide that fail forward was the best way to handle this, then I wouldn’t have the cook scream already. I’d have the thief open the door, see the cook, whose eyes would go wide… clearly she’s about to scream. Then I’d ask the players what they’d do.
First, the cook isn't rolled on a wandering monster table, it's appearing in response to a completely unconnected pick lock roll.
People keep saying unconnected. But it can be connected simply. It’s already been pointed out how.
Second, it's the middle of the night when the cook would be in a deep sleep, yet the roll teleports the cook to the kitchen awake and ready to spot the party, because pick lock fail. It's not as if being in the kitchen during sleep hours is some routine thing for the cook. There's almost no chance of the cook being there.
This is a very simplistic way to view it.
Why must the cook be in a deep sleep? Why can’t she be in the kitchen? The lord breaks his fast at dawn… she needs to begin prep at least a couple hours prior. Or perhaps she sleeps on a cot in the kitchen? Or in a nook just off the kitchen?
I mean… it’s easy to shoot down ideas. To make things not work when you can decide anything. But to make something work? To look at the situation and then take dice rolls into consideration and then come up with a new situation that makes sense and honors the result? That takes some skill.
There are any number of possibilities. You just have to be a nimble GM to handle this kind of approach.