Skip to content

Add reviewed CLI rewind with stale-context checks - #107

Merged
vanedaltro merged 1 commit into
mainfrom
feat/daily-rewind
Nov 4, 2026
Merged

vanedaltro merged 1 commit into
mainfrom
feat/daily-rewind

Conversation

@vanedaltro

@vanedaltro vanedaltro commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

cyber sessions rewind <session> --to <message> --target code|conversation|both now previews an owned rewind without changing source files or the active conversation. Applying requires the exact reviewed --confirm <fingerprint>; stale Session/Location/snapshot context is refused.

  • Add typed owner preview/confirmation routes and generated SDK operations. Bind the preview to Session sequence, boundary, active tip, current/target/recorded snapshots, actual proposed patches, current exclusions and retained tool status.
  • Plan the actual three-way result in an isolated shadow Git index. Preserve unrelated owner files, report conflicts before applying, and recheck the reviewed current tree under the same workspace mutation lock as restore. Refresh admission before file writes; unsupported custom snapshot hosts fail closed.
  • Preserve inactive branches and independent tool recovery evidence. Retain native activity/backup evidence after a failed native acknowledgement or post-effect event commit. Refuse an existing legacy staged revert until explicitly committed or cleared.
  • Update guides, README, roadmap, CLI help and approved OpenSpec artifacts. Reconcile obsolete destructive-revert/search and root retry-count wording without claiming root structured-output implementation.

Validation on macOS: four real CLI/server/scripted-provider scenarios; four server ownership/recovery regressions; 12 real Git snapshot tests; 79 CLI unit tests including generated help; SDK typecheck and 128 tests (10 external tests skipped); current OpenAPI artifact check; CLI/server/snapshot all-target Clippy; strict OpenSpec validation (114 items), spec lint (0 errors, 25 warnings), formatting and diff checks. An unchanged-main branch-checkout baseline passed before edits. No external provider was called. All 19 checks passed on original head 53968990. After #106 merged, this branch was rebased to d53643e7; two OpenSpec conflicts were resolved while preserving both the revised scheduling and completed rewind evidence. The rewind implementation itself is unchanged. Fresh CI is running for the rebased head. Local composition checks passed: current OpenAPI artifact, SDK generation/typecheck/128 tests (10 external skips), strict OpenSpec validation (114 items), 80 CLI unit tests including generated help and binary recovery, and all four real CLI/server rewind/branch scenarios.

Part of #93, implementing task 2.2 after contract reconciliation. TUI rewind/undo/redo, broader crash/interrupt/restart acceptance, private non-Git snapshots and restore journaling, path rules/context, root structured output and JSONL input remain unfinished. Conversation-only rewind works without Git; code rewind currently requires the reviewed Git host. Existing one-step owner rewind and explicit revert routes retain their compatibility behavior. No arbitrary external-writer atomicity or complete historical exclusion reporting is claimed.

#106 is merged. Its manual binary-draft recovery is retained by this rebase, leaving only this goal PR open.

@vanedaltro
vanedaltro marked this pull request as ready for review November 3, 2026 20:35
@vanedaltro
vanedaltro merged commit d3c2733 into main Nov 4, 2026
19 checks passed
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.

1 participant