Skip to content

test(web): run the shared sealed-collab vectors through the web writer - #74

Merged
PastaPastaPasta merged 1 commit into
masterfrom
feat/private-collab-seal-runner
Sep 27, 2026
Merged

PastaPastaPasta merged 1 commit into
masterfrom
feat/private-collab-seal-runner

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

Summary

This is the follow-up to #67 and #68. The shared private_collab_seal vectors from #68 now also run through the web's real writer, and imported provenance is sealed and read back the way #68 specifies.

  • A new runner (lib/repo/private-writes.conformance.test.ts) drives every private_collab_seal__* vector (19 today) through sealContent, the pure core of sealForRepo, with the vector's fixed nonce.
    • lib/private/conformance.test.ts pins the reference transform. This one pins the code that writes: a sealed issue, PR, comment or review the web posts is byte for byte the CLI's.
    • A deliberate break of the imported handling fails 2 of the vectors, so the runner catches regressions.
  • Writer: sealForRepo now seals an importer's provenance, which feat(private): seal issues, pull requests, comments and reviews in the CLI #68 made normative:
    • imported.author and imported.url go into TLV 13 and 14;
    • imported.createdAt stays plaintext, alone in the object.
    • The seal itself moved into sealContent(keys, type, ownerId, data, seal = sealDoc), which the runner can call without an SDK. sealForRepo reads the write key and maps seal errors exactly as before.
  • Reader: decrypted importedAuthor and importedUrl go back into the document's imported object. An imported private PR still shows "imported" and links its original, and no flat TLV names leak into the view. Test: private-session.test.ts "an imported document's sealed provenance…" (it failed before the fold).

No web writer sets imported today; the importers are the CLI's. This keeps the web's sealing in parity for when one does, and makes the reader correct for documents the CLI importers write.

Traceability

Element Source
TLV 13 importedAuthor and 14 importedUrl sealed; imported.createdAt plaintext private-repos.md §4.3, §7 (#68)
Whole sealed document per type, byte for byte private_collab_seal__* vectors (#68)

Test plan

  • pnpm lint, pnpm exec tsc --noEmit.
  • pnpm test: 1533 pass on master 0ffdd74, including all 205 private conformance vectors and the new runner (20 tests: 19 vectors plus the count check).
  • Mutation check: breaking imported.author handling fails issue_imported and comment_imported_author_only.

🤖 Generated with Claude Code

The private_collab_seal vectors from #68 now also run through sealContent, the pure core of sealForRepo, with each vector's fixed nonce, so the documents the web posts are pinned byte for byte to the CLI's. sealContent seals an importer's provenance as the vectors require: imported.author and imported.url go into TLV 13 and 14, and imported.createdAt stays plaintext.

On read, decrypted provenance goes back into the imported object, so an imported private PR still links its original.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: cabb0d8c-9ca5-451e-b8fa-793d68fedded

📥 Commits

Reviewing files that changed from the base of the PR and between 0ffdd74 and 19ee4bd.

📒 Files selected for processing (4)
  • forge-web/lib/repo/private-content.ts
  • forge-web/lib/repo/private-session.test.ts
  • forge-web/lib/repo/private-writes.conformance.test.ts
  • forge-web/lib/repo/private-writes.ts

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

Comment @coderabbitai help to get the list of available commands.

@PastaPastaPasta
PastaPastaPasta merged commit 10d7334 into master Sep 27, 2026
5 checks passed
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]>
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]>
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