Repository navigation
feat(cli): sealed edits of issues, PRs and comments in private repos - #93
Merged
Merged
Conversation
dg issue edit, dg pr edit and the new dg issue edit-comment re-seal the whole content under the right epoch (a PR under its own) and replace only enc/epoch, through the same transform as a create (every private_collab_seal vector re-seals byte for byte). Every edit is guarded by the revision read (E607, new), refused for a document of another repo (so the document's own repo decides sealing) and for a non-author before any key work (E601); legacy plaintext next to enc is cleared. Scenario 19 covers the edits, the PR's unchanged epoch and base hash, the non-author and cross-repo refusals. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedNext included review available in 45 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (20)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Until now the CLI refused edits in a private repository. The web edited through
sealEdit. This PR adds the CLI equivalent:dg issue edit(title and body)dg pr edit(title and description)dg issue edit-comment <repo> <comment-id> --body/--body-file, new, for issue and PR comments.dg issue view --jsoncomments now carry anid.In a private repository, each edit works like this:
reseal_editre-seals it with the change applied throughseal_props, the same transform as a create.path, and an importer'simported.author/urlcarry over.a_reseal_edit_is_the_create_transform: re-sealing every sharedprivate_collab_sealvector gives the vector'sencbyte for byte.enc/epochare replaced. Any legacy plaintexttitle/bodystored next toencis cleared in the same replace.dg pr editwarns before signing when the PR's epoch is older than the repo's.replace_document_guardedrefuses a replace when another edit landed since: E607, new, documented indocs/errors.md.$revisionis an explicit Platform error.For every repository, public too:
Web
The web side of the same fixes is owned by review-parity PR 3 (branch
feat/web-review-ia), coordinated with that agent:importedprovenance insealEditexpectRepoId)expectedRevisionon comment editsThis PR is CLI and core only;
docs/security/private-repos.md§4.5 says which client guards what today.Tests
cargo clippy --workspace --all-targets --all-features -D warningsis clean, andcargo test --workspace --all-featurespasses.an_edit_is_refused_for_a_document_of_another_repoan_edit_by_a_non_author_is_refused_before_any_key_workan_edit_of_a_document_without_a_revision_says_soa_private_replace_clears_legacy_plaintext_next_to_enca_pr_edit_uses_the_pr_epoch_keys_only_while_held_and_not_burned(burned → E310, unheld → E307, held → its keys)a_replace_against_a_newer_revision_is_refusedan_edit_reseals_the_whole_content_and_replaces_only_enc_and_epochbaseRefNameHashare unchanged.🤖 Generated with Claude Code