Solution (source code)

= Solution

\b[Printed <metric tensor>.] There is a genuine false premise. For the <metric tensor> actually printed, introduce $T=\sinh t$. Since $dT=\cosh t\,dt$ and $T$ ranges over all real values,
$$
\boxed{ds^2=-dT^2+dx^2.}
$$
This is global two-dimensional <Minkowski spacetime>, an example of how a <time-dependent lapse can disguise flat spacetime>. A future-directed <timelike geodesic> from the stated event, parametrized by <proper time> $s$, has
$$
T=Es,\qquad x=ps,\qquad E^2-p^2=1,\quad E>0,
\qquad t=\operatorname{arsinh}(Es).
$$
For $p\ne0$ the spatial position is unbounded, not periodic; $t$ is strictly increasing. The curve $p=1$, $E=\sqrt2$ is an explicit counterexample. Physically these are inertial particles moving at constant Minkowski velocity $p/E$. The nonlinear original time coordinate does not create a confining force.

\b[Likely intended spatial lapse.] The hint instead fits the different <metric tensor> $ds^2=-\cosh^2x\,dt^2+dx^2$, the unit-radius <two-dimensional anti-de Sitter spacetime> in global static coordinates. This interpretation is not substituted silently for the printed one. For that <metric tensor> the conserved energy is $E=\cosh^2x\,dt/ds$, and normalization gives
$$
\left(\frac{dx}{ds}\right)^2=\frac{E^2}{\cosh^2x}-1.
$$
Putting $y=\sinh x$ gives $\dot y^2+y^2=E^2-1$, hence an outgoing <geodesic> from the origin has
$$
\boxed{\sinh x=\sqrt{E^2-1}\sin s,\qquad
\frac{dt}{ds}=\frac{E}{1+(E^2-1)\sin^2s}.}
$$
The supplied <integral> shows that $t$ increases by $\pi$ over each proper-time half-period. Thus the spatial oscillation repeats after <proper time> $2\pi$ and coordinate time $2\pi$, with turning points $|x|=\operatorname{arcosh}E$. It describes gravitationally confined inertial motion in AdS. On the <universal cover>, $t$ is not identified and the worldline is not closed; identifying $t$ modulo $2\pi$ makes the <timelike geodesic> closed. For $E=1$ the central particle stays at $x=0$.