_smithers_attempts.jj_pointer. The time-travel API replays a run
to one of those points, restoring the filesystem from the captured pointer and
discarding graph snapshots recorded after the attempt began, rolling the run’s
timeline back to it.
The public, facade-exported surface is two functions: revertToAttempt, the
low-level VCS restore, and timeTravel, 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. A missing
attempt or pointer returns success: false. Crossing an unresolved external
effect throws TIME_TRAVEL_SIDE_EFFECT_BLOCKED with the boundary report in
the error details.
timeTravel
Restores VCS to a previous attempt, then resets the target node (and optionally its dependents) topending so the engine re-runs from there. Use this to resume
a run: it cancels later attempts, deletes their output rows, discards frames
recorded after the attempt started, and flips the run back to running.
SmithersDb
required
The database adapter for the run, as returned by the authoring factory’s
db
layer. See SmithersDb.TimeTravelOptions
required
Promise<object>
timetravel.js · TimeTravelOptions.ts · Tests timetravel.e2e.test.jsx · See also Revert, revertToAttempt
revertToAttempt
Restores the working copy to an attempt’s JJ pointer and discards DB frames recorded after the attempt started. Files-only: it doesn’t reset nodes, cancel attempts, or change run status, leaving the graph untouched. Use it when you need only the filesystem state of a past attempt. UnliketimeTravel, both
iteration and attempt are required.
SmithersDb
required
The database adapter for the run. See
SmithersDb.RevertOptions
required
Promise<object>
Both
revertToAttempt and timeTravel need JJ on PATH and a JJ-initialized
workspace; 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.External-effect boundary
Marked tool calls and Tasks are checked before history moves. Discard operations compensate entries with a registered handler before changing VCS or database history. Replays and running forks never compensate the parent run. Every result carries:unknown like succeeded. A process may stop after an
external API accepted a request but before Smithers recorded the response.
Pass force: true only when double execution or external drift is acceptable.
Git commits, ref changes, worktree writes, and git push are exempt. GitHub
API mutations are not.
Source 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 facade exports. Use those
instead of importing non-exported functions from the package.
- CLI overview for
fork,replay,rewind,snapshots, andtimeline. See Time-travel commands compared to disambiguaterewind,replay,timetravel, andrevert. - 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