Repository navigation
feat(private): seal issues, pull requests, comments and reviews in the CLI - #68
Merged
Merged
Conversation
…e CLI forge-core Collab seals the free text of issue/patch/comment/review into enc on a private repo (collab::private::seal_props: title, body, branch names, path; patch hashes become HMAC(K_ref,e, name)) and opens it on read, counting what does not open as hidden; unreadable reviews are never counted. Keys are resolved once per Collab (one command), and a renumbered create re-seals for its number. Releases stay refused on private repos; labels warn they are plaintext. Edits are judged by the late-content rule ($updatedAtBlockHeight, max with the created height) in Rust and TS. dg repo view explains E306/E307 instead of showing an empty repo. Per-type text caps (issue 5085, PR 5079, comment 5085, review 5088) in the spec and the error. New shared conformance case private_collab_seal (17 vectors) and three edit vectors (201 total), with runners in both harnesses; git-remote-dash --dump-collab; e2e scenario 17 on minted identities. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…via their targets Private collab reads require a key once (E306/E307 with the fix) instead of listing nothing; --dump-collab reaches comments and reviews through their issue or patch (they are not indexed by repo); scenario 17 accepts dedicated identities when minting is down. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Private PR bases follow D-501 too (read_private_merge_base takes the PR's opened_at, via pr_base_tips). The sealed-collab scenario is renumbered to 19 (17 and 18 are taken), mints under the shared qa-mint lock, and has its e2e README rows. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
One cached_keyring helper for RepoService and Collab; seal_if_private takes the content kind (TargetKind::content_kind); readable_all resolves keys once through private_keys/open_with; seal_props_with_nonce for the vectors only; open_doc takes the document by value; readable_target for issue/patch; the vector runner parses DocKind; dump_collab's by_target is a function. dg pr view reports hiddenComments like dg issue view. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedNext included review available in 28 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 (55)
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 |
Private::write_keys replaces an expect at the call site; visibility() inlined; Arc import; scope read once in base_ref_tips; the patch hash fields set in one loop; sealing_error takes the error by value; nonce12 and no key clones in the vector runner; imports tidied in dg and git-remote-dash; doc comments corrected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
PastaPastaPasta
added a commit
that referenced
this pull request
Sep 27, 2026
The web reader passed only $createdAtBlockHeight to open_content, so a removed member's edit of their own old-epoch issue or comment long after a rotation was shown. It now reads $updatedAtBlockHeight. Content created late stays 'late'; an edit that is late by the same rule is 'lateEdit' (the original text is gone), which maintainers see as 'edited after its author was removed; the original text is gone'. This matches the rule #68 adopts for the CLI. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
4 tasks done
…ling Seal imported provenance: imported.author and imported.url move into enc (TLV 13, 14; createdAt stays), and the importer reads its index through Collab, reads a private destination with the signer's keys (dry runs too), skips releases there and warns what stays readable. Sealed writes re-resolve the keys before each write (§5.3); reads keep one load per command. A document created in time but edited late by a removed author is Unreadable(LateEdit), said as such (a replace keeps only the new text); EarlierUse is judged by the newest write. E306 for a key source without an encryption key, E301 without an identity, and an existing but unreadable issue/PR says so instead of E102. pr list folds every row against one decrypted reflog; pr view reports hiddenReviews; patches_from_* are public-only; the private journal name is keyed with a local secret; the base name and label warnings are escaped/added; typed tooLarge in the vector runner; e2e mint lock falls back to flock and asserts a keyed base hash. Vectors: 205 (issue_imported, comment_imported_author_only, tlv_imported_in_issue, issue_created_late_and_edited_is_late; edited_after_rotation_late is now lateEdit). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Takes #67's openContent late-edit wording (same rule as the vectors) and keeps both e2e README rows. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
3 tasks done
PastaPastaPasta
added a commit
that referenced
this pull request
Sep 27, 2026
…al private edits Private-repo edits of issues and comments now re-seal through #67's sealEdit and replace only enc/epoch (no plaintext ever leaves); without a seal context a private edit is still refused. The issue page and list use #68's privateComposeBlock / composeCost / SealedLimit. dg issue list reads private issues through readable_all (decrypted for members); the CLI edit still refuses private repos (no sealed CLI edit yet). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Sep 27, 2026
PastaPastaPasta
added a commit
that referenced
this pull request
Sep 27, 2026
…chedDocument, open_for_write) Rebased onto master after #67, #68, #72, #73 and #74: the settings sections use the AA text shades the contrast test requires; the test fixture fills FetchedDocument.updated_at_block_height; the archive check opens through Session::open_for_write so dg pr create stays within the line limit. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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
The CLI now seals the free text of issues, pull requests, comments and reviews in private repositories (
docs/security/private-repos.md§4, §8). This is PR 2 of the private-repos plan. The web writers (#67) seal the same documents byte for byte, and a new shared conformance case checks that.Sealing (forge-core
collab)collab::private::seal_propsmoves every present sealed field out of plaintext and into the TLV:title,bodytitle,body,baseRefName,sourceRefNamebody,pathbodyimported.authorandimported.url(TLV tags 13, 14: they name the source org, repo and people).imported.createdAtstays plaintext.baseRefNameHash/sourceRefNameHashbecomeHMAC(K_ref,e, name)(§4.5).epochandenc. Everything else stays plaintext as designed (§7): numbers, targets,sourceRepoId,headOid,draft,replyTo,reviewId,commitOid, lines and side,verdict,commentCount.Collabseals on write when the repo is private:comment,review, the importer's numbered creates, and the journaled allocated creates;Collabopens on read:issue,patch, lists,comments_counted,reviews.RepoServiceandCollabshare onecached_keyringhelper. A PR list folds every row against one decrypted reflog, instead of re-reading it per PR.read_private_merge_basetakes the PR's opened-at time.Collabno longer refuses private repos. Releases still refuse them, because notes and assets are not encrypted in this release (§12.5).dg labelwarns that label names are plaintext.Other changes
Unreadable(lateEdit), shown as "edited after its author was removed; the original text is gone". A replace keeps only the new text, so showing it "as created" is not possible. This matches feat(web): create private repos and write sealed content from the browser #67.FetchedDocumentcarries$updatedAtBlockHeight.Collab, so it can find sealed provenance;dg repo viewon a private repo you can't read now explains E306 / E307 instead of showing an empty repo.dg issue viewanddg pr viewreporthiddenComments.pr viewalso reportshiddenReviews, and the list commands say why documents were hidden.patches_from_*are public-only.dg issue labelwarns that label names are plaintext.Conformance vectors (205 private vectors, up from 181)
private_collab_seal(19 vectors, two of them withimportedprovenance):tooLarge;private_doc_open__issue_edited_*(the late one islateEdit) and…__issue_created_late_and_edited_is_late; plus…__tlv_imported_in_issue.seal_props_with_nonce;sealForRepo;gen.pyregenerates them byte for byte.Coordination
$updatedAtBlockHeightand showslateEdit(done in feat(web): create private repos and write sealed content from the browser #67).Collabmethods. New write paths (create_once, F-1'supdate_*) add one line:self.seal_if_private(repo, ContentKind::…, props).Tests
lockf /tmp/qa-mint.lockaround each mint:git-remote-dash --dump-collabshows every document withepoch+enc, no plaintext title, body, branch or path, and a keyed base hash;Reviews
refactor(private)commit).patches_from_*, dry-run keys, late edits, escaping, the label warning.hiddenReviews, the EarlierUse height, typedtooLarge, and the e2e mint lock and base-hash assertion.🤖 Generated with Claude Code