Skip to content

writes: delegated rollback to a prior source revision (#28) - #41

Merged
lex00 merged 1 commit into
mainfrom
feat/28-rollback
Jul 14, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/28-rollback

Conversation

@lex00

@lex00 lex00 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Closes #28 (epic #23). Depends on chant #873 (lifecycle rollback), shipping in chant 0.18.10.

Pick a past source commit → open a reviewable PR restoring source to it. Never a direct cloud write: a human merges, then a gated Sync applies — rollback rides the same delegated/gated path as Sync/Adopt. Mirrors Adopt (both open a PR).

  • src/history.tssourceCommits + parseGitLog (read-only git log); unit-tested.
  • src/op-runner.ts — generalized to run any chant invocation (run()), so rollback shares the single running-guard + stream + PR-extraction + capture with ops.
  • server/api/history (recent commits) + /api/rollback?to=<ref> (delegated).
  • web — Rollback control: commit picker + confirm; the PR link surfaces via the existing pr event.

Design note

Target is a git commit of source — live lanes frames aren't source-reconstructable, so they stay a visual reference (frame↔commit correlation is a future add). chant runs the rollback in an isolated worktree (#873), so triggering it doesn't disturb the branch of the checkout behold serves.

Verified

/api/history returns commits; /api/rollback validates. tsc + node --check clean; 51 tests (+3 history). Full PR-open E2E lights up with chant 0.18.10.

Pick a past source commit → open a reviewable PR restoring source to it (chant
lifecycle rollback, #873). Never a direct cloud write: a human merges, then a
gated Sync applies — the rollback rides the same delegated/gated path as Sync/Adopt.

- src/history.ts: sourceCommits + parseGitLog (read-only git log); unit-tested.
- src/op-runner.ts: generalized to run any chant invocation (run()), so rollback
  shares the single running-guard + stream + PR-extraction + capture with ops.
- server: /api/history (recent commits) + /api/rollback?to=<ref> (delegated).
- web: Rollback control — commit picker + confirm; the PR link surfaces via the
  existing pr event.

Target is a git commit of source (lanes frames aren't source-reconstructable —
they stay a visual reference). tsc + 51 tests (+3 history). Full PR-open E2E lights
up with chant 0.18.10 (#873); /api/history + validation verified live.
@lex00
lex00 merged commit 6dedaa1 into main Jul 14, 2026
1 check passed
@lex00
lex00 deleted the feat/28-rollback branch July 14, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lanes: rollback an env to a prior revision from the timeline (Argo rollback/history)

1 participant