Repository navigation
Make SDK context integrity durable across clones - #952
Conversation
Version merge fences for cross-client safety, persist privacy-safe merge receipt evidence, expose explicit provenance outcomes and corpus diagnostics, and isolate foreign harness signals in SDK tests.
|
Warning Review limit reached
Next review available in: 51 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (32)
✨ Finishing Touches📝 Generate docstrings
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 GuideMakes merge-decision receipts durable and privacy-safe across clones, versions the managed Git merge fence, refines agent provenance outcome semantics, and adds bounded provenance value diagnostics surfaced through health checks. Sequence diagram for durable merge-decision receipts across clonessequenceDiagram
actor Developer
participant MergeDriver
participant GitDirectory as git_workspace_receipts
participant TrackerRoot as pm_tracker_merge_receipts
Developer->>MergeDriver: writeMergeReceipt(cwd,item_path,decisions)
MergeDriver->>GitDirectory: resolveReceiptDirectory(cwd)
MergeDriver->>GitDirectory: ensureDir(directory)
MergeDriver->>GitDirectory: writeFileAtomic(receiptFileName)
MergeDriver->>TrackerRoot: resolveTrackerRootFromItemPath(cwd,item_path)
MergeDriver->>TrackerRoot: durableReceiptDirectory(pmRoot)
MergeDriver->>TrackerRoot: writeFileAtomic(receiptFileName)
Developer->>MergeDriver: listMergeReceipts(cwd,{includeLossless,pmRoot})
MergeDriver->>GitDirectory: resolveReceiptDirectory(cwd)
MergeDriver->>GitDirectory: readReceiptsFromDirectory(directory,options)
MergeDriver->>TrackerRoot: durableReceiptDirectory(pmRoot)
MergeDriver->>TrackerRoot: readReceiptsFromDirectory(durableDirectory,options)
MergeDriver-->>Developer: merged receipts (clone_local + hash_only)
Developer->>MergeDriver: markMergeReceiptReconciled(cwd,receipt)
MergeDriver->>GitDirectory: writeFileAtomic(updated local receipt)
MergeDriver->>TrackerRoot: resolveTrackerRootFromItemPath(cwd,receipt.item_path)
MergeDriver->>TrackerRoot: writeFileAtomic(updated durable receipt)
Sequence diagram for bounded provenance health scanning with invalid value diagnosticssequenceDiagram
actor Operator
participant HealthService as runHealth
participant ProvenanceScanner as scanProvenanceResolverHealth
participant HistoryStore as readHistory
participant StorageCheck as buildStorageHealthCheck
Operator->>HealthService: runHealth(pmRoot)
HealthService->>ProvenanceScanner: scanProvenanceResolverHealth(pmRoot)
ProvenanceScanner->>HistoryStore: readHistory(pmRoot)
HistoryStore-->>ProvenanceScanner: history.content
ProvenanceScanner->>ProvenanceScanner: collectHistoryContent(content,aggregates,invalidValues,eventLimit)
ProvenanceScanner->>ProvenanceScanner: collectResolverOutcomes(entry,aggregates,invalidValues)
ProvenanceScanner-->>HealthService: {outcomes,invalid_values,warnings}
HealthService->>StorageCheck: buildStorageHealthCheck(...,provenanceResolverOutcomes,provenanceInvalidValues)
StorageCheck-->>HealthService: storage health report (includes provenance_invalid_values)
HealthService-->>Operator: health summary with provenance warnings and invalid_value aggregates
Flow diagram for versioned Git merge attribute fence managementflowchart TD
A[runMergeInstall / refreshMergeAttributeFenceIfInstalled] --> B[reconcileGitattributesBlock]
B --> C[removeManagedBlock using PM_GITATTRIBUTES_V2_START and PM_GITATTRIBUTES_V2_END]
C --> D[removeManagedBlock using PM_GITATTRIBUTES_START and PM_GITATTRIBUTES_END]
D --> E[write v2 block using PM_GITATTRIBUTES_V2_START/PM_GITATTRIBUTES_V2_END]
F[auditMergeAttributeFence] --> G[read .gitattributes]
G --> H{includes PM_GITATTRIBUTES_V2_START?}
H -->|yes| I[usesV2 = true<br/>startMarker = PM_GITATTRIBUTES_V2_START<br/>endMarker = PM_GITATTRIBUTES_V2_END]
H -->|no| J[usesV2 = false<br/>startMarker = PM_GITATTRIBUTES_START<br/>endMarker = PM_GITATTRIBUTES_END]
I --> K[extract committed patterns between startMarker/endMarker]
J --> K
L[refreshMergeAttributeFenceIfInstalled] --> M{fence present?}
M -->|yes| N{includes PM_GITATTRIBUTES_V2_START or PM_GITATTRIBUTES_START}
N -->|no| O[status = not_installed]
N -->|yes| P[reconcileGitattributesBlock with v2 fence]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@greptileai please review the exact current head. @coderabbitai full review |
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
CodeRabbit artifact acknowledged: #952 (comment). The provider was rate-limited and produced no code findings, so this is recorded as unavailable review coverage, not approval. |
|
Sourcery guide acknowledged: #952 (comment). Its architecture summary matches the intended durable-receipt, versioned-fence, and bounded-provenance design; no actionable finding was raised. |
|
CodeRabbit command reply acknowledged: #952 (comment). The requested exact-head review remained rate-limited and supplied no findings; deterministic checks and other review surfaces remain the evidence. |
|
CodSpeed report acknowledged: #952 (comment). The exact-head comparison reports no performance change across all 11 benchmarks. |
|
Codecov report acknowledged: #952 (comment). It confirms all modified coverable lines are covered and all tests succeeded. |
|
Sourcery submitted review acknowledged: #952 (review). The provider reached its weekly diff quota and supplied no code findings, so it is documented as unavailable rather than approval. |
|
Exact head updated to 02d6043 with PM evidence only. @greptileai please review this exact head. @coderabbitai full review |
|
|
|
CodeRabbit exact-head retrigger acknowledged: #952 (comment). The bot confirmed head 02d6043 but remained rate-limited and supplied no code findings; this is provider-unavailable evidence, not approval. |
Summary
This broad SDK/CLI tranche makes context-integrity evidence durable, version-safe, observable, and deterministic:
not_configuredprovenance outcome distinct from attempted resolver failuresAI_AGENTsignals without hiding dedicated same-harness resolver inputsWhy
Project management is context management. Merge decisions and provenance are part of the durable context graph: they must survive clone boundaries, remain understandable across client versions, distinguish absence from failure, and never leak host-specific or raw private values.
PM lineage
Verification
node scripts/run-tests.mjs coverage: 464 files, 7,100 tests, exact 100/100/100/100pnpm lint: ESLint, zero duplicate clones, and full static-quality pipeline passedpnpm quality:static: SDK parity/snapshot, docstring, package boundary, surface replication, token/context, registry, and performance gates passedpnpm audit --audit-level high: no known vulnerabilitiespnpm security:scan: no credential-like secretspm health --check-only, history drift, storage integrity, and dry-run merge reconciliation passedpm-changelog@2026.8.7generated and verifiedCHANGELOG.mdFixes #921
Fixes #922
Fixes #948
Summary by Sourcery
Persist privacy-safe merge decision receipts in tracker storage and make merge fences and provenance health checks durable and version-safe across clones.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores:
Summary by cubic
Makes context integrity durable across clones and safe across client versions. Adds a privacy-safe merge-receipts store, versions the managed merge fence, tightens provenance outcomes, and improves health diagnostics.
New Features
value_availabilityflag..gitattributesmerge-driver fence (pm-cli:merge-drivers:v2) so olderpmreleases don’t rewrite it; auto-migrate and repair on install.not_configuredprovenance outcome; health/validate scan bounded history and publish aggregate invalid-value classes (boolean/single-digit) without leaking values.Bug Fixes
AI_AGENTsignals and sandbox bleed-through in tests.Fixes #921, #922, #948
Written for commit 02d6043. Summary will update on new commits.