And a reasonable response in any case is "Yah, I know you said that but I don't like to do sloppy work and there were clearly a number of different edge cases that needed to be handled for this to work reliably."
Yes, this is what we do at my company. It's the only way this sort of thing is valid IMO... it's not a race, but I want to see demonstration of reasonable output.
And I'd rather somebody admit that they took longer, say 4 hours to get to the 80% because they were a bit rusty, their IDE on their private machine wasn't as expected (e.g. Intellij CE vs the Ultimate at work), they had to look up how to bootstrap a service from 0 because they hadn't done that in ages even at work etc. than to under deliver a 20% solution in the 2 hours asked.
Limits are fine if you ask me. Give me a couple days in which I can do this on my own time and if my kid needs me for something 10 minutes after I started I can deal with it and just come back to the test an hour later. Specific hours? Screw you, not even gonna start.
I'm with the GP here, I'd much rather give them a few days and advise how much time they should spend on it than give them a strict timebox - it allows for a lot more flexibility with other responsibilities.
And this would be the opposite for me. Someone properly thinking out the edge cases and handling them (or at least pointing them out in comments) would be much more useful in the roles I'd be hiring for.
I need a stable system that can tolerate the real world and handle messy inputs without shitting the bed. A new hire that shows they consider their inputs and handle edge cases is a better fit to me than someone who focused on that 80% solution and didn't bother sanitizing inputs and crashes because of it.