feat(warp-core): add WAL evidence segment catalog#644
Conversation
|
Warning Review limit reached
Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
✨ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b168e48436
ℹ️ 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".
| self.next_lsn = next_lsn; | ||
| self.previous_frame_digest = last_frame_digest; | ||
| self.previous_committed_transaction_digest = commit.commit_digest; | ||
| self.try_update_evidence_catalog_after_commit(&commit, &frames); |
There was a problem hiding this comment.
Rebuild the live catalog after recovered WAL commits
When filesystem append reports an error after the commit marker is recoverable, the existing recover_filesystem_*_after_error paths can still treat the transaction as accepted, but this live-cache update is skipped because it only runs on the normal Ok path. In that case evidence_catalog_posture() remains Fresh and evidence_catalog() omits a committed transaction that recover_evidence_catalog_read_only() will include, so the recovery-success path should rebuild the catalog or mark it NeedsRebuild before acknowledging the recovered commit.
Useful? React with 👍 / 👎.
| if catalog.observe_committed_wal(view).is_err() { | ||
| self.evidence_catalog_posture = EvidenceCatalogPosture::NeedsRebuild { | ||
| reason: *blake3::hash(b"catalog_update_error").as_bytes(), | ||
| last_good_commit: self.previous_committed_transaction_digest, |
There was a problem hiding this comment.
Preserve the real last-good commit on catalog failure
If observe_committed_wal fails, previous_committed_transaction_digest has already been advanced to commit.commit_digest before this helper is called, so last_good_commit points at the transaction that failed to enter the catalog rather than the last transaction where the cache was known fresh. Consumers using NeedsRebuild to reconcile from the last fresh commit can skip the missing segment; capture the prior digest before advancing it or update the catalog before mutating the cursor.
Useful? React with 👍 / 👎.
| [lints] | ||
| workspace = true |
There was a problem hiding this comment.
Add required package metadata for the new crate
Because this new workspace crate opts into the shared lint policy here, clippy::cargo_common_metadata is denied for it; I checked cargo clippy -p warp-core --lib and it now fails before checking warp-core because echo-trace lacks package.description, package.readme, package.keywords, and package.categories. Add the required metadata or an explicit lint override, otherwise the advertised clippy witness for this PR stays red.
Useful? React with 👍 / 👎.
| fn begin_run(&mut self, _meta: &TraceRunMeta) -> Result<(), TraceError> { Ok(()) } | ||
| fn append_delta(&mut self, _delta: &CanonicalGraphDelta<'_, N, E, A>) -> Result<(), TraceError> { Ok(()) } |
There was a problem hiding this comment.
Format the new trace crate before merging
This new file is not rustfmt-compliant; I ran cargo fmt --all -- --check, and it fails on this impl formatting as well as the doc-comment blank lines in the same file. Since the PR's own verification lists that exact command, leaving this unformatted will keep the formatting witness red until the crate is run through rustfmt.
Useful? React with 👍 / 👎.
Summary
CausalSegmentCatalogover committed WAL recovery evidence, with one base evidence segment per committed WAL transaction.TrustedRuntimeWal; cache update failures mark the catalogNeedsRebuildwithout turning successful WAL commits into failures.Scope
Links
Checklist
Local verification
git diff --checkcargo fmt --all -- --checkcargo clippy -p warp-core --libcargo clippy -p warp-core --features "native_rule_bootstrap trusted_runtime host_test" --test trusted_runtime_host_loop_testscargo xtask test-slice runtime-wal-ackcargo xtask test-slice durable-runtime-walNotes
RecoveryScanReportremains the canonical rebuild seam, and live catalog updates are cache-only posture.WscBundle,CheckpointRange, orZkWormholecoverage is implemented in this PR; those segment kinds are reserved for later covering evidence.