_smithers_attempts.jj_pointer. The time-travel API replays a run
to one of those points: it restores the filesystem from the captured pointer and
discards the graph snapshots recorded after the attempt began, so the run’s
timeline rolls back to that attempt.
The public, facade-exported surface is two functions. revertToAttempt is the
low-level VCS restore; timeTravel is the higher-level reset that can also reset
the target node and its dependents so the engine re-runs them.
SmithersDb adapter as their first argument. Neither throws
for a missing attempt or a missing pointer; they report failure on the returned
success boolean. Inspect result.success rather than wrapping the call in
try/catch.
timeTravel
Restore VCS to a previous attempt, then reset the target node (and optionally its dependents) back topending so the engine re-runs from there. This is the entry
point you want when you intend to resume the run: it cancels later attempts,
deletes the affected output rows, discards frames recorded after the attempt
started, and flips the run back to running.
The database adapter for the run, as returned by the authoring factory’s
db
layer. See SmithersDb.timetravel.js · TimeTravelOptions.ts · Tests timetravel.e2e.test.jsx · See also Revert, revertToAttempt
revertToAttempt
Restore the working copy to an attempt’s JJ pointer and discard DB frames recorded after the attempt started. This is files-only: it does not reset nodes, cancel attempts, or change the run status, so it leaves the graph untouched. Use it when you only need the filesystem state of a past attempt. UnliketimeTravel,
both iteration and attempt are required.
The database adapter for the run. See
SmithersDb.revertToAttempt and timeTravel need JJ in PATH and a JJ-initialized
workspace, and the target attempt must have completed while JJ was available
(otherwise no pointer was captured). See Revert for the
requirements and the equivalent CLI command.revert.js · RevertOptions.ts · Tests revert.test.js · See also Revert, timeTravel
CLI surface
The richer time-travel surface (fork, replay, rewind, snapshots, and timeline)
is driven through the CLI and the rewind RPC, not as facade exports. Reach for
those rather than importing non-exported functions from the package.
- CLI overview for
fork,replay,rewind,snapshots, andtimeline. - Revert for the
revertcommand that mirrorsrevertToAttempt. rewind-runRPC to rewind a run over the gateway.
time-travel/src · Tests time-travel/tests · See also CLI overview, Revert, rewind-run RPC