Skip to content

feat(store): never read the paths a remote withholds - #150

Open
PiquelChips wants to merge 1 commit into
feat/permissions-takeoversfrom
feat/permissions-withheld-store
Open

PiquelChips wants to merge 1 commit into
feat/permissions-takeoversfrom
feat/permissions-withheld-store

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

A clone of a server will lack the content of the paths its user may not read: its trees keep their entries, but the store doesn't have what they point to. Everything that reads trees would fail on them, or take them for changed.

Store::with_withheld makes a store that knows which paths its remote withholds, and tree operations never read them:

  • diffs skip them,
  • merges compare them by id, a withheld directory both sides changed being a conflict, as a file is,
  • walks leave them out, since what the store lacks it can't give.

Store::keep_withheld makes a working copy's snapshot keep what a revision holds at those paths, reading only the directories on the way to them, so files the user can't read stay in their snapshots as they were.

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: ca8dc554-29ec-41e6-a663-a59637220034
Commits

Reviewing files that changed from the base of the PR and between 60ee596 and 60fa9ae.

Files selected for processing: 2

  • apps/origin-src/src/store/mod.rs
  • apps/origin-src/src/tree.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/permissions-withheld-store branch 3 times, most recently from b541531 to bc27841 Compare November 22, 2026 18:54
A clone of a server will lack the content of the paths its user may not
read: its trees keep their entries, but the store doesn't have what they
point to. Everything that reads trees would then fail on them, or treat
them as changed.

`Store::with_withheld` makes a store that knows which paths its remote
withholds, and tree operations never read them: diffs skip them, merges
compare them by id, a withheld directory both sides changed being a
conflict, as a file is, and walks leave them out, since what the store
lacks it cannot give. `Store::keep_withheld` makes a working copy's
snapshot keep what a revision holds at those paths, reading only the
directories on the way to them, so files the user cannot read stay in
their snapshots as they were.
@PiquelChips
PiquelChips force-pushed the feat/permissions-withheld-store branch from bc27841 to 60fa9ae 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