Write a Python function to find the longest consecutive sequence of sensor readings that fall within a specific operational threshold.
Treat consecutive readings as adjacent elements in the input order. Given a list of numeric readings and inclusive lower and upper threshold bounds, return the length of the longest contiguous sequence whose every reading is within the bounds. Return 0 when no reading satisfies the threshold.
def longest_threshold_sequence(readings, lower, upper):