Export retained evidence through WSC#621
Conversation
|
Warning Review limit reached
More reviews will be available in 44 minutes and 58 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?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 credits. 🚦 How do rate 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 see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (11)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Code Lawyer
Ready for admin merge under the standing rule. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d03b4b3f9f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| &projected.accepted_submissions, | ||
| &projected.receipts, | ||
| &projected.correlations, | ||
| &[], |
There was a problem hiding this comment.
Pass retained payloads to self-contained export
When the recovered WAL contains any Present retained material record, wsc_self_contained_wal_export now requires an embedded WscSelfContainedRetainedMaterial for that digest. This CLI path always passes &[], so export-self-contained fails with MissingRetainedMaterial for exactly the WALs containing retained evidence it now advertises, instead of producing a bundle with retained-payloads.ecwsc.
Useful? React with 👍 / 👎.
| let retention = retention_records_from_wsc_envelope(&export.retention_envelope) | ||
| .map_err(WscCasAddressedWalImportError::Retention)?; |
There was a problem hiding this comment.
Require retained CAS refs for present materials
When a CAS-addressed bundle's retention envelope contains a Present retained material record but the CAS-reference envelope omits that material, or points at a different content hash, this import still succeeds after checking only the refs that were listed. With the segment blobs available, that lets CAS-addressed validation report success without the retained payload bytes that the retained evidence says are present; the parsed retention records need to be matched against retained CAS references before returning success.
Useful? React with 👍 / 👎.
| if let Some(extra) = retained_payloads | ||
| .iter() | ||
| .find(|payload| !material_by_digest.contains_key(&payload.material.material_digest)) |
There was a problem hiding this comment.
Require retained payload records to match retention
For self-contained imports, this extra-material check only proves that the embedded payload's digest appears somewhere in the retention envelope. A bundle can embed bytes whose hash matches a retained digest while carrying a different semantic coordinate/kind/posture in the WscSelfContainedRetainedMaterial record, or even include payload bytes for a non-Present retained record, and validation still reports success; compare the full retained record and reject payloads that contradict the retention posture.
Useful? React with 👍 / 👎.
| projection: String, | ||
| accepted_submissions: String, | ||
| receipt_correlations: String, | ||
| retained_evidence: String, |
There was a problem hiding this comment.
Preserve v1 bundle manifest compatibility
Because this new manifest field is a required String with no serde default while schema_version remains 1, read_manifest now fails to deserialize self-contained or ref-only v1 bundles created before this change, even when they simply had no retained evidence. That breaks inspect/verify for previously exported empty-retention bundles; make the field optional/defaultable or bump the manifest schema version.
Useful? React with 👍 / 👎.
| retained_materials: retention.material_by_digest.into_values().collect(), | ||
| reading_refs: retention.reading_by_id.into_values().collect(), |
There was a problem hiding this comment.
Avoid dropping conflicting retained WAL records
For WALs that contain conflicting retained-material digests or reading ids, recover_retention_index collapses them into maps before export, so these into_values() calls emit only one record and the WSC bundle no longer witnesses the conflict. Since retained evidence export is supposed to carry admitted WAL evidence, collect the raw retained frames or run the conflict-checking retention-record constructor instead of exporting the lossy recovered index.
Useful? React with 👍 / 👎.
Closes #572
Summary
echo-cli wsc causal-historybundle manifests and verification paths.wsc_retained_evidence_export_modeswitness tocargo xtask test-slice durability-releasewithout using Cargo's package-level name filter.scripts/verify-local.sh fullCargo test lanes CI-owned by default, withVERIFY_LOCAL_FULL_TESTS=1as the explicit maintainer opt-in.Validation
bash tests/hooks/test_verify_local.shcargo fmt --checkcargo test -p xtask test_slice_durability_release_stays_explicitcargo test -p warp-core --test causal_wal_tests wsc_retained_evidence_export_modescargo test -p warp-cli --test cli_integration wsc_causal_history_exports_and_verifies_profilescargo clippy -p warp-core --test causal_wal_tests -- -D warningscargo clippy -p warp-cli --lib --tests -- -D warningscargo test -p warp-core --test causal_wal_testsnpx markdownlint-cli2 CHANGELOG.md crates/warp-cli/README.md docs/workflows.mdgit diff --checkwarp-cli/warp-coreclippy/check and markdownlintwarp-cli/warp-coretest slices and Prettier