_smithers_attempts.jj_pointer. The commit ID pins the exact workspace state even when later attempts amend the same JJ change. revert restores the workspace to that state and discards any graph snapshots recorded after the attempt began, rolling the run’s timeline back to that point in time.
API reference: Time Travel lists every revert and time-travel export, its options, and links to source and tests.
revert checks every marked external effect that
would be crossed. It runs registered handlers in reverse order, then prints an
effect-boundary report. The report is printed for blocked, compensated,
forced, and clean operations.
--no-revert skips handlers. --force crosses any effects that remain,
records SideEffectBoundaryCrossed, and marks the run for attention. Without
--force, unresolved succeeded, unknown, revert-failed, or
revert-stale effects stop the command with
TIME_TRAVEL_SIDE_EFFECT_BLOCKED.
Git commits, branch changes, worktree writes, and git push are exempt.
GitHub issues, comments, releases, and PR merge state are external effects.
Requirements
- JJ in
PATH(brew install jjorcargo install jj-cli) - Workspace is a JJ repository (
jj git initorjj init) - The target attempt was completed when JJ was available (otherwise no pointer was captured)
Programmatic
adapter is the SmithersDb instance for the run’s database.
revertToAttempt never throws for a missing attempt or missing JJ pointer: it returns { success: false, error: string }, so inspect result.success to detect failures. On success it returns { success: true, jjPointer: string }.
timeTravel when you want the higher-level reset flow: it can restore VCS, reset the target node, and reset dependent nodes after the selected attempt.