Skip to content

Add worktree controls and upgrade git-internal - #30

Open
Ivanbeethoven wants to merge 3 commits into
mainfrom
agent/worktree-control-git-internal-0.8.5
Open

Add worktree controls and upgrade git-internal#30
Ivanbeethoven wants to merge 3 commits into
mainfrom
agent/worktree-control-git-internal-0.8.5

Conversation

@Ivanbeethoven

Copy link
Copy Markdown
Collaborator

Summary

  • add Antares worktree base binding, state inspection, and non-mutating refresh planning APIs
  • document the worktree state machine and Libra-facing control-plane workflow
  • upgrade git-internal to 0.8.5 and version the sled object cache to JSON-backed v2 keys

Root cause

git-internal 0.8.5 no longer implements bincode's Encode and Decode traits for Tree and Commit. The cache now uses the dependency's supported Serde implementation and isolates old cache entries with a v2 key namespace.

Validation

  • cargo check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 053c34bde0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/daemon/antares.rs
Comment on lines +2073 to +2076
if entry.cl.is_some() {
return Err(ServiceError::InvalidRequest(
"cannot bind a Libra worktree base to a mount with a CL layer".into(),
));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject CL remounts after binding a worktree base

This only rejects a CL layer that exists at bind time, but the existing POST /mounts/{id}/cl path can still be called after a clean mount is bound because build_cl never checks base_revision. In the sequence create clean mount → bind base → build CL, the visible FUSE tree is remounted with CL overrides while /worktree still reports the same base_revision and dirty=false because CL entries are excluded there, so Libra can compute status or refresh decisions against a different tree than users see. Please reject CL changes once base_revision is set, or clear the binding before allowing the CL remount.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 584abf0800

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/daemon/antares.rs
Comment on lines +2056 to +2059
let state = self.worktree_state(mount_id).await?;
if state.dirty {
return Err(ServiceError::InvalidRequest(
"cannot bind a worktree base after local upper-layer changes exist".into(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow idempotent base rebinds on dirty mounts

When a mount is already bound and then gets local upper-layer edits, retrying POST /worktree/base with the same base_revision now returns INVALID_REQUEST because the dirty check runs before the existing-base idempotency check. The new worktree contract documents same-base binding as idempotent, so client retries or reconciliation after any write will fail even though they are not changing the base; please allow an existing identical binding before rejecting dirty uppers.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ead0a035ce

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/daemon/antares.rs
Comment on lines +2085 to +2088
if entry.cl.is_some() {
return Err(ServiceError::InvalidRequest(
"cannot bind a Libra worktree base to a mount with a CL layer".into(),
));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject base binds while a CL remount is quiescing

Even with the new build_cl guard, /worktree/base can still race with an initial /cl request: build_cl sets the mount to Quiescing and drops the lock while entry.cl is still None, so this check can pass and set base_revision; when the in-flight CL remount later finishes, it does not recheck the base and leaves a bound Libra worktree with a CL layer. Please also reject non-Mounted/Ready states (or recheck in build_cl before committing the CL) so the documented CL-free base invariant cannot be violated under concurrent control-plane calls.

Useful? React with 👍 / 👎.

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