I was able to solve the trouble with the help of another Sphere programmer who submitted a correct Lua program a few years ago (thanks, Miorel!):
local lInput
repeat
lInput = io.read ('*n')
if lInput ~= 42
then io.write (lInput .. '\n')
end
until lInput == 42
The only difference between this code and my original is that I moved the local declaration of lInput outside the repeat loop. I'm guessing that the scope of a local variable inside the repeat loop does not extend to the loop's until line. Therefore, the lInput inside the loop isn't the same lInput in the until evaluation. That later one would never get any value, much less 42, and the program would never end.
If you'd like to post the above code as a solution to TEST for others to see, I'd be honored!