Repository navigation
Add WSC causal-history bundle CLI - #617
Conversation
|
Warning Review limit reached
More reviews will be available in 13 minutes and 57 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 (15)
✨ 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 update
Validation highlights:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 998b42a16d
ℹ️ 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".
| } | ||
|
|
||
| fn read_envelope(bundle: &Path, name: &str) -> Result<WscStoreEnvelope> { | ||
| let path = bundle.join(name); |
There was a problem hiding this comment.
Keep bundle envelope paths inside the bundle
When a bundle manifest supplies an absolute path or a .. path for any envelope, bundle.join(name) will read that location outside the bundle. For self-contained verification this means the CLI can pass by depending on segment material stored elsewhere, or fail after moving the directory, so the bundle is not actually self-contained. Reject absolute paths and parent components before reading manifest-provided envelope names.
Useful? React with 👍 / 👎.
| obstructions: Vec::new(), | ||
| }, | ||
| )), | ||
| Err(error) => Ok(verify_output( |
There was a problem hiding this comment.
Don't mask CAS integrity failures as obstructions
For cas-addressed manifests, this Err(error) arm converts every validation failure into a successful result: obstructed report. Missing CAS blobs fit that posture, but malformed or tampered projection/receipt envelopes and incomplete causal history are integrity failures; they will currently be reported as a material obstruction with exit 0, unlike ref-only and self-contained verification. Only downgrade explicit missing-CAS-material errors.
Useful? React with 👍 / 👎.
| root.segments | ||
| .iter() | ||
| .map(|segment| { | ||
| let path = canonical_segment_path(wal_root, segment.segment_id); |
There was a problem hiding this comment.
Read segment bytes from the projected locator
When the WAL root uses legacy root-level segment files, recovery and projection still succeed because the scanner supports roots without a segments/ directory, but this exporter then unconditionally reads root/segments/segment-.... In that supported layout, export-self-contained fails even though the projected root has a valid segment locator; read through the projected storage_locator instead of assuming the canonical path.
Useful? React with 👍 / 👎.
| &manifest.envelopes.receipt_correlations, | ||
| )?, | ||
| }; | ||
| let imported = validate_wsc_self_contained_wal_export(&export, root)?; |
There was a problem hiding this comment.
Bind exported records back to embedded WAL bytes
For a self-contained bundle, this validation proves the segment bytes match the projection and that the accepted/receipt envelopes are internally consistent, but it never compares those envelopes with the records recovered from the embedded WAL segment bytes. If the accepted-submission or receipt envelopes are swapped for another valid set, verify still reports pass; compare the imported records with the records recovered from imported.segment_recoveries before accepting the bundle.
Useful? React with 👍 / 👎.
Summary
echo-cli wsc causal-historycommands for ref-only and self-contained WAL WSC bundle export, bundle inspection, and verification.echo-climan pages and wire the focused WSC CLI witness into thedurability-releasetest slice.Closes #568.
Validation
cargo fmt --checkcargo check -p warp-clicargo clippy -p warp-cli --lib --tests -- -D warningscargo clippy -p xtask -- -D warningscargo test -p warp-cli parse_wsc_causal_historycargo test -p warp-cli --test cli_integration wsc_causal_historycargo test -p warp-cli --test cli_integrationcargo test -p xtask test_slice_durability_release_stays_explicitcargo xtask man-pages --checkcargo xtask test-slice durability-releasenpx markdownlint-cli2 CHANGELOG.md crates/warp-cli/README.mdgit diff --checkTest-loop note
The new WSC CLI acceptance coverage uses one shared projectable WAL fixture and the release slice runs the filtered
wsc_causal_historyintegration witness instead of expanding to the full CLI integration file.