Bluejay mentioned the ability to disobey as a criterion of sentience, but how do we even know that we have the ability to disobey? I don't mean in the simplistic sense of disobeying an instruction from somebody - computers can do that ('Illegal operation'; 'file not found' etc.). The implication seemed to be about disobeying your own programming, and I don't see any reason to assume that people can do that. How could we distinguish between someone disobeying the deterministic processes which determine how their brain works and somebody obeying them?
I think we need better definitions of obey and disobey to go down this path. Your examples are flawed in the sense that they define 'disobey' as being materially incapable of performing the command. When a computer tells you 'Illegal Operation' or something equivalent, it is very simply a deterministic result of being physically incapable of doing what you told it. There is very literally no possible way the electrons can flow down the wires of the integrated circuit in the exact pattern you specified.
An analogous equivalent for a human would be the the refusal to detect the smell of song. The physical reality of our universe does not permit that.
A better definition might be the choice or refusal to do something based on self-interest. This sort of kicks the can down the road a bit because now you have to define self-interest but it is scope reduction of the problem.
If a nation expects to be ignorant and free, in a state of civilization, it expects what never was and never will be. --Thomas Jefferson