In this paper we provide an exact solution to the linear receding-horizon control problem in discrete time, a problem of long-standing interest. Considered are nominal systems with state space models that vary in time, whose controllers have access to the precise statespace model of the plant for a fixed number of steps into the future, but only have foreknowledge of the set of model values beyond this horizon. In fact, considered is a more general scenario where evolution within the latter set may be governed by an automaton. We provide a necessary and sufficient convex condition for the existence of a linear output feedback controller that can uniformly exponentially stabilize such a system, and do the same for a related disturbance attenuation problem. Each condition is in terms of a nested sequence of semidefinite programs, where (a) feasibility to any element provides an explicit controller; and (b) infeasibility implies that a controller does not exist for a given exponential decay rate. A simple physically-motivated example is used to illustrate the results, and in particular provides an instance in which foreknowledge of a model is required to stabilize it.