writes: delegated rollback to a prior source revision (#28) - #41
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.ts—sourceCommits+parseGitLog(read-onlygit log); unit-tested.src/op-runner.ts— generalized to run anychantinvocation (run()), so rollback shares the single running-guard + stream + PR-extraction + capture with ops./api/history(recent commits) +/api/rollback?to=<ref>(delegated).prevent.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/historyreturns commits;/api/rollbackvalidates. tsc +node --checkclean; 51 tests (+3 history). Full PR-open E2E lights up with chant 0.18.10.