feat(warp-core): add WAL projection fact types#601
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 30 minutes and 36 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 refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. 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 (4)
✨ 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 |
|
@coderabbitai review please 🥕 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
gh pr view 601 --repo flyingrobots/echo --json title,body,files,additions,deletions,changedFiles
echo "---DIFF---"
gh pr diff 601 --repo flyingrobots/echoLength of output: 24776 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== len_u64 definition ==="
rg -n 'fn len_u64' crates/warp-core/src/causal_wal.rs -A5
echo "=== Hash type alias ==="
rg -n 'pub type Hash\|type Hash' crates/warp-core/src/ -r ''
rg -n 'type Hash' crates/warp-core/src/
echo "=== WalTransactionId Ord/PartialOrd ==="
rg -n 'WalTransactionId' crates/warp-core/src/causal_wal.rs | head -20
echo "=== WriterEpochId as_hash ==="
ast-grep --pattern 'impl WriterEpochId { $$$ }'
echo "=== Hash derive/impl Ord ==="
rg -n 'pub.*Hash' crates/warp-core/src/ -A2 | head -40
echo "=== WalSegmentId as_u64 ==="
rg -n 'fn as_u64' crates/warp-core/src/causal_wal.rs | head -10
echo "=== existing non_exhaustive usage in causal_wal.rs ==="
rg -n 'non_exhaustive' crates/warp-core/src/causal_wal.rs | head -20
echo "=== RecoveryTailPosture variants ==="
rg -n 'RecoveryTailPosture' crates/warp-core/src/causal_wal.rs | head -20Length of output: 1355 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== Hash type in lib.rs ==="
fd 'lib.rs' crates/warp-core/src --exec grep -n 'Hash'
echo "=== Hash definition ==="
rg -n 'type Hash\b' crates/warp-core/src/
echo "=== WalTransactionId struct/derive ==="
rg -n -A4 'struct WalTransactionId' crates/warp-core/src/causal_wal.rs
echo "=== WriterEpochId struct/derive ==="
rg -n -A4 'struct WriterEpochId' crates/warp-core/src/causal_wal.rs
echo "=== WalSegmentId struct/derive ==="
rg -n -A4 'struct WalSegmentId' crates/warp-core/src/causal_wal.rs
echo "=== non_exhaustive in causal_wal.rs ==="
rg -n 'non_exhaustive' crates/warp-core/src/causal_wal.rs
echo "=== RecoveryTailPosture enum ==="
rg -n -A15 'enum RecoveryTailPosture' crates/warp-core/src/causal_wal.rs
echo "=== Hash type in warp-core ==="
rg -rn 'pub type Hash' crates/warp-core/src/
echo "=== Hash in top-level lib.rs ==="
cat crates/warp-core/src/lib.rs | head -60Length of output: 2132 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== WalTransactionId full definition ==="
rg -n -B3 'struct WalTransactionId' crates/warp-core/src/causal_wal.rs
echo "=== WriterEpochId full definition ==="
rg -n -B3 'struct WriterEpochId' crates/warp-core/src/causal_wal.rs
echo "=== RecoveryTailPosture full enum ==="
rg -n -B1 -A20 'enum RecoveryTailPosture' crates/warp-core/src/causal_wal.rs
echo "=== WalSegmentSealPosture full definition ==="
rg -n -B3 -A15 'enum WalSegmentSealPosture' crates/warp-core/src/causal_wal.rs
echo "=== WalSegmentStorageLocator full definition ==="
rg -n -B3 -A15 'enum WalSegmentStorageLocator' crates/warp-core/src/causal_wal.rs
echo "=== WalCommitAnchor full definition ==="
rg -n -B2 'struct WalCommitAnchor' crates/warp-core/src/causal_wal.rs
echo "=== Lsn struct derive ==="
rg -n -B3 'struct Lsn' crates/warp-core/src/causal_wal.rs | head -20
echo "=== WalTransactionId as_hash ==="
rg -n 'as_hash\|as_u64' crates/warp-core/src/causal_wal.rs | head -20Length of output: 4532
Finding 1 — Unnecessary clone in
|
Summary
Closes #559.
This adds typed WAL projection fact records for the GP2 WAL evidence projection slice:
WalRootWalWriterEpochWalSegmentRefWalCommitAnchorRecoveryCertificateRefWalSegmentRef::identity_digest()now binds writer epoch, logical segment id, LSN range, commit digest chain, segment digest, commit anchors, and seal posture while deliberately excluding storage locator metadata.WalRoot::identity_digest()canonicalizes writer epoch and segment members by identity digest so caller-provided vector order does not create projection nondeterminism.Validation
cargo test -p warp-core wal_projection_fact_identitycargo clippy -p warp-core --lib --test causal_wal_tests -- -D warningscargo fmt --checknpx markdownlint-cli2 CHANGELOG.md docs/BEARING.mdgit diff --checkcargo clippy -p warp-core --lib,cargo check -p warp-core, Markdown lintcargo fmt --all -- --check,cargo check -p warp-core --quiet,cargo test -p warp-core --test causal_wal_tests, Prettier check