Skip to content

feat(objects): give descriptions and payloads an object kind of their own - #138

Open
PiquelChips wants to merge 1 commit into
feat/permissions-workspace-lockfrom
feat/permissions-attachments
Open

PiquelChips wants to merge 1 commit into
feat/permissions-workspace-lockfrom
feat/permissions-attachments

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

A revision's description and a statement's payload were blobs, the same kind as a file's content. So any record could name a file's blob as its description or payload, and fetching the record would bring the file with it, whatever path it sits at. Once reading depends on paths, that's a way around it.

Descriptions and payloads are now attachments, an object kind of their own with its own id type, AttachmentId, so no record can carry a file's content.

  • Puts refuse a description that isn't an attachment, and a payload the repository holds as something else.
  • Fetching a record only brings the attachment it carries, never a blob.
  • A pushed core.conflict must come with its list, or find it stored, since reading the statement needs it.
  • Retention no longer walks every snapshot to keep payloads a file shares: an attachment never shares an id with a file.

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: a964884e-8209-498e-9689-4b755027116d
Commits

Reviewing files that changed from the base of the PR and between e76136b and b568a23.

Files selected for processing: 32

  • apps/origin-src/benches/land.rs
  • apps/origin-src/benches/server.rs
  • apps/origin-src/benches/sync.rs
  • apps/origin-src/src/annotations/mod.rs
  • apps/origin-src/src/annotations/retention.rs
  • apps/origin-src/src/conflict.rs
  • apps/origin-src/src/events.rs
  • apps/origin-src/src/http.rs
  • apps/origin-src/src/index.rs
  • apps/origin-src/src/queue/tests/mod.rs
  • apps/origin-src/src/queue/tests/policy.rs
  • apps/origin-src/src/remote.rs
  • apps/origin-src/src/service.rs
  • apps/origin-src/src/store/mod.rs
  • apps/origin-src/src/sync.rs
  • apps/origin-src/src/tree.rs
  • apps/origin-src/src/workspace/annotate.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/src/workspace/remote.rs
  • apps/origin-src/tests/cli.rs
  • apps/origin-src/tests/http.rs
  • crates/origin-client/src/lib.rs
  • crates/origin-shared/src/api.rs
  • crates/origin-shared/src/id.rs
  • crates/origin-shared/src/lib.rs
  • crates/origin-shared/src/object/mod.rs
  • crates/origin-shared/src/object/revision.rs
  • crates/origin-shared/src/object/statement.rs
  • crates/origin-shared/src/text.rs
  • docs/openapi.json
  • 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-attachments branch from c88cfa5 to 2b24352 Compare November 22, 2026 15:04
@PiquelChips
PiquelChips force-pushed the feat/permissions-attachments branch 2 times, most recently from 4b005ee to ab0b808 Compare November 22, 2026 18:54
… own

A revision's description and a statement's payload were blobs, the same
kind as a file's content. Any record could then name a file's blob as
its description or payload, and a fetch of the record would bring the
file with it, whatever the path it sits at: once reading depends on
paths, that's a way around it.

Descriptions and payloads are now attachments, an object kind of their
own with an id type of its own, `AttachmentId`. A record never carries a
file: puts refuse a description that isn't an attachment, or a payload
the repository holds as something else, and fetching a record only
brings the attachment it carries, never a blob. A `core.conflict` must
also come with its list, or find it stored, since reading the statement
needs it.

Retention no longer walks every snapshot to keep the payloads a file
shares: attachments never share an id with a file, so only descriptions
can keep a payload alive.
@PiquelChips
PiquelChips force-pushed the feat/permissions-attachments branch from ab0b808 to b568a23 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