Repository navigation
Export signed native histories with limited replay scope - #147
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
Reviewer's GuideThis PR implements capability-limited native history bundles end to end: the SDK creates and verifies domain-separated signed manifests over exact selected closures, receivers independently authorize scope and destination leases, CLI commands expose the workflow, and comprehensive tests verify fail-closed behavior before storage while preserving native identities and local publication policies. Sequence diagram for signed change bundle export and importsequenceDiagram
actor Sender
participant CLI as VCSCommands
participant SDK as ChangeBundleSDK
participant Source as SourceObjectStore
participant Receiver as ReceiverRepository
participant Policy as ReceiverAuthorization
Sender->>CLI: vcs bundle export
CLI->>SDK: exportChangeBundle
SDK->>Source: collectCommitObjects
SDK->>Source: closure validation
SDK->>SDK: sign manifest with Ed25519
SDK-->>CLI: signed change bundle
Sender->>CLI: vcs bundle inspect or import
CLI->>SDK: parseChangeBundleAuthorization
CLI->>SDK: inspectChangeBundle or importChangeBundle
SDK->>Policy: verify trusted key and receiver scope
SDK->>Receiver: validate closure and destination leases
alt authorization or closure refused
SDK-->>CLI: ChangeBundleRefusal
else authorized
SDK->>Receiver: importBundleObjects
SDK->>Receiver: refs.transaction
SDK-->>CLI: compact change bundle report
end
Entity relationship diagram for signed change bundle authorizationerDiagram
CHANGE_BUNDLE_MANIFEST {
int version
string scope
string tips
string included
string excluded
boolean unknownOmissions
string archiveDigest
string signer
string publicKey
}
RECEIVER_AUTHORIZATION {
string scope
string trustedKeys
string revocations
}
DESTINATION_LEASE {
string branchRef
string expectedObjectId
}
NATIVE_OBJECT {
string objectId
string objectType
}
RECEIVER_AUTHORIZATION ||--|| CHANGE_BUNDLE_MANIFEST : limits
CHANGE_BUNDLE_MANIFEST ||--o{ NATIVE_OBJECT : includes
CHANGE_BUNDLE_MANIFEST ||--o{ NATIVE_OBJECT : excludes
DESTINATION_LEASE }o--|| CHANGE_BUNDLE_MANIFEST : authorizes
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
unbraind
left a comment
There was a problem hiding this comment.
Orchestrator review (built-in Claude review agent, verified by the orchestrator; bots are not waited for since 2026-10-22):
Pre-merge review (codex gpt-6.1-sol read-only review agent; merged by the orchestrator's pipeline after a MERGE verdict and a private-data scan of the added lines).
VERDICT: MERGE
FINDINGS:
- none
SUMMARY: The PR adds signed selective native-history bundles with independent receiver scope, trust, and destination leases. The reviewed tests cover tampering, scope enforcement, closure, ref collisions, revocation, and non-Git operation; they were not run locally.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
unbraind
left a comment
There was a problem hiding this comment.
Orchestrator review (built-in Claude review agent, verified by the orchestrator; bots are not waited for since 2026-10-22):
Pre-merge review (codex gpt-6.1-sol read-only review agent; merged by the orchestrator's pipeline after a MERGE verdict and a private-data scan of the added lines).
VERDICT: MERGE
FINDINGS:
- none
SUMMARY: The PR adds signed native-history bundles with independent receiver scope, trust, and exact ref leases. The 24 new tests cover tampering, incomplete closure, scope violations, publication safeguards, and non-Git CLI operation; I reviewed them statically without executing them.
Agents can exchange selected native histories through signed
vcs bundle export,inspectandimportoperations. The receiver independently supplies exact path/ref authority, trusted keys and destination leases. Native identities and full selected ancestry are preserved; mixed-scope or incomplete histories refuse before object admission.Previously, ordinary bundles did not express a signed selective replay contract. This implementation binds scope, exact tips, included/excluded inventories, unknown omissions, archive digest and signer in a domain-separated Ed25519 manifest. It reuses native closure validation, writer leases, ref transactions and publication policies. Reports remain compact, and the SDK and installed CLI work in real non-Git trackers.
The reviewed import safeguards are present and freshly verified:
destination ref namespace collisions refuse the whole import before storing objectscovers the exactrefs/heads/0,refs/heads/a,refs/heads/a/bbatch, existing collisions in both directions and empty directories. Refusal is typedbundle_ref_conflictwith a remedy; inventory and refs stay unchanged.manifest signer revoked during object admission cannot publish refscovers scheduled/appended revocations, removed grants and freshly loaded local revocations. No refs publish.Fresh independent behavioral revert proofs after integrating main:
node --test --test-concurrency=1 --test-name-pattern="destination ref namespace" test/change-bundles.test.tsfail 0/1 withEISDIR. Restoring it passed 1/1.node --test --test-concurrency=1 --test-name-pattern="manifest signer revoked" test/change-bundles.test.tsfail 0/1 withMissing expected exception. Restoring them passed 1/1.The whole PR diff was rechecked for exact-name map comparisons, complete closure and path/checkpoint/copy scope, metadata isolation, complete ref-set admission, publication-time trust and CLI boundaries. No additional valid defect was found. The current review-thread inventory has zero unresolved threads, with complete pagination. CodeRabbit has no review body or Outside diff range findings: its issue comment reports that automatic review was skipped. No review thread was replied to or resolved.
Main was integrated in
f8dc430, with CHANGELOG.md regenerated inside the merge and the generated self-host conflict resolved by rebuilding from staged source. Fresh evidence and the released tracker claim are committed ind0f925cand827c073. The two blocking safeguards were already present at the pulled remote head; no production-code change was necessary in this round. The final pushed head is827c07352dd0197b95d51e2f1e61da5280c24bd5.Validation:
node --test --test-concurrency=1 test/change-bundles.test.ts test/bundle.test.ts: 34/34, zero failures, skips, cancellations or todo.bun test --timeout 120000 ./test/change-bundles.test.ts: 24/24, zero failures.pm test pm-vcs-change-bundles --run --only-last --progress: 3/3 publication scenarios, zero failure categories.Final-head CI run 40009840699 passed on
827c07352dd0197b95d51e2f1e61da5280c24bd5:npm run release:checkbun run release:checkAll four full release gates measured 100% statements, branches, functions and lines across the intended 80-file production inventory, with zero failed, skipped, cancelled or todo tests. Both Windows launcher jobs and final-head CodeQL passed. No CI retry was required in this round. A separate local npm release gate with temporary HOME and disabled global/system Git config also passed (1,880/1,880; all four coverage dimensions 100%). The duplicate local Bun gate was stopped after the complete final-head CI matrix passed; it is not counted as passing gate evidence.
The unchanged release gates include native acceptance, stat-cache acceptance, committed self-host verification, production and identity audits, packaging, changelog and release-attestation checks. Local dist was rebuilt; dist remains ignored. The tracked text self-host archive was regenerated after staging tracker evidence. No thresholds, coverage scope or ignore policy changed, and history remains append-only.
Tracker: pm-vcs-change-bundles, tagged
gh:unbraind/pm-vcs#147, left in progress with its claim released for orchestrator verification. No new pm CLI/SDK defect was established. The existing local extension-version health coupling remains tracked by pm-vcs-5lre; final-head CI project-health checks passed.The v1 format remains bounded to 32 MiB and carries complete selected histories. Authorized admitted objects may remain after a publication-time signer/checkpoint refusal, while refs remain unpublished. See the contract and measured public-tracker example. No PR merge or release was performed.