Skip to content

feat(workspace): log every move of the working copy - #110

Open
PiquelChips wants to merge 1 commit into
feat/events-oplog-damagefrom
feat/events-log-moves
Open

PiquelChips wants to merge 1 commit into
feat/events-oplog-damagefrom
feat/events-log-moves

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

To take a command back, a workspace must know where its working copy was before. Nothing recorded that: workspace only names where it is now.

Every move of the working copy is now logged in the op log. The entry is made durable with the workspace file that names the new revision, so it costs no extra sync. It says where the working copy moved from and to, and why. Either a command recorded its draft, a command such as new or edit moved it, or it was created. A command that records the draft along with its own records logs the draft's move with its own. If the pointer commit fails, the draft's move stays pending for the next commit to log.

Each workspace's store writes for an Actor. The actor holds the command line, kept as text so an argument that isn't UTF-8 is never an error. It also holds the workspace's root, which is now canonical however it was spelled, nested paths that don't exist yet included. So the op log names each working copy one way.

Benchmarks: status and new are unchanged by the op log, measured with just bench-git on the whole stack.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0ea01ba5-e374-4ae6-8c17-87a0884347c0
Commits

Reviewing files that changed from the base of the PR and between 272099d and 64da092.

Files selected for processing: 6

  • apps/origin-src/src/cli.rs
  • apps/origin-src/src/oplog.rs
  • apps/origin-src/src/workspace/land.rs
  • apps/origin-src/src/workspace/mod.rs
  • apps/origin-src/src/workspace/registry.rs
  • apps/origin-src/tests/cli.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PiquelChips
PiquelChips added this pull request to stack #165 November 22, 2026 14:59
@PiquelChips
PiquelChips force-pushed the feat/events-log-moves branch 2 times, most recently from 1673d78 to 2c483b9 Compare November 22, 2026 18:54
To take a command back, a workspace must know where its working copy was
before it. Nothing recorded that: `workspace` only names where it is now.

Every move of the working copy is now logged in the op log, as an entry
made durable with the `workspace` file naming the new revision, so it
costs no sync of its own. An entry says where the working copy moved
from and to, and why: a command recorded its draft, a command such as
`new` or `edit` moved it, or it was created. A command that records the
draft along with its own records logs the draft's move with its own.

Each workspace's store writes for an `Actor`: the command line, as text
so that an argument that isn't UTF-8 is never an error, and the
workspace's root, which is now canonical, however it was spelled, so the
op log names each working copy one way.
@PiquelChips
PiquelChips force-pushed the feat/events-log-moves branch from 2c483b9 to 64da092 Compare November 22, 2026 19:20
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