Skip to content

test(warp-core): gate DIND durability convergence#627

Merged
flyingrobots merged 2 commits into
mainfrom
cycle/578-dind-durability-convergence-gate
Jun 28, 2026
Merged

test(warp-core): gate DIND durability convergence#627
flyingrobots merged 2 commits into
mainfrom
cycle/578-dind-durability-convergence-gate

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • add dind_durability_convergence_gate to join live filesystem WAL execution, read-only WAL recovery, WSC import, and retained reading reveal on one app-facing outcome
  • make bare cargo xtask dind default to run mode and execute the convergence gate before DIND scenario goldens
  • add the exact convergence witness to durability-release and update WAL/DIND workflow signposts

Closes #578

Validation

  • cargo test -p warp-core --test causal_wal_tests dind_durability_convergence_gate
  • cargo test -p xtask test_slice_durability_release_stays_explicit
  • cargo xtask dind
  • cargo clippy -p warp-core --test causal_wal_tests -- -D warnings
  • cargo clippy -p xtask -- -D warnings
  • cargo fmt --check
  • npx markdownlint-cli2 CHANGELOG.md docs/topics/WAL.md docs/workflows.md docs/determinism/dind-harness.md
  • git diff --check
  • cargo test -p warp-core --test causal_wal_tests
  • scripts/ban-nondeterminism.sh

Summary by CodeRabbit

  • New Features

    • cargo xtask dind now defaults to run mode when no subcommand is provided.
    • DIND workflows now include an added durability convergence check in the standard flow and release slice coverage.
  • Bug Fixes

    • Improved durability verification so recovery, retained material, and replay paths must agree.
    • Missing support material or corrupted embedded bytes now surface typed failures instead of inconsistent success.
  • Documentation

    • Updated workflow and WAL docs with the new DIND durability convergence gate and run instructions.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@flyingrobots, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 48 minutes and 21 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: efdc95ef-d648-4099-a0c5-c70578977eb6

📥 Commits

Reviewing files that changed from the base of the PR and between 9cb3841 and fd26d21.

📒 Files selected for processing (1)
  • crates/warp-core/tests/causal_wal_tests.rs
📝 Walkthrough

Walkthrough

Adds a dind_durability_convergence_gate test to causal_wal_tests.rs that validates WAL commit, read-only recovery, WSC export/import (self-contained and CAS-addressed), and typed obstruction for missing or corrupt material. Wires this test into cargo xtask dind (now defaults to run mode) and TestSlice::DurabilityRelease. Updates docs and changelog.

DIND Durability Convergence Gate

Layer / File(s) Summary
dind_durability_convergence_gate test
crates/warp-core/tests/causal_wal_tests.rs
Defines DindDurabilityOutcome and normalization helper; implements the full convergence test covering WAL segment creation, RecoveredState frontier assertions, index recovery, self-contained WSC round-trip, CAS-addressed WSC round-trip, missing-blob obstruction, and corrupt-segment obstruction.
xtask wiring
xtask/src/main.rs
DindArgs.command becomes Option<DindCommands> defaulting to Run; adds run_dind_durability_convergence_gate() executing the new test; calls it in the Run path before the Node.js suite; inserts the same cargo test command into DurabilityRelease; updates unit test command-count and expected sequence.
Docs and changelog
CHANGELOG.md, docs/determinism/dind-harness.md, docs/topics/WAL.md, docs/workflows.md
Documents the new witness, default run mode, convergence gate semantics, and required obstruction behavior for missing CAS material and corrupt embedded segment bytes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • flyingrobots/echo#609: The new dind_durability_convergence_gate test directly exercises project_filesystem_wal_recovery/project_wal_recovery and typed obstruction behavior introduced in #609.

Suggested labels

tooling

No subcommand required, the gate just runs,
WAL sealed tight, recovery begun—
WSC imports line up, hashes agree,
Corrupt bytes? Obstruction. Missing blob? Flee.
Convergence confirmed, the sentinel's done. 🔒

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and directly describes the main change: adding a DIND durability convergence gate.
Linked Issues check ✅ Passed The PR implements the DIND/WAL/WSC/retention convergence gate and typed obstruction behavior required by #578.
Out of Scope Changes check ✅ Passed The docs, changelog, tests, and xtask wiring all support the convergence gate and do not introduce unrelated scope.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cycle/578-dind-durability-convergence-gate

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/warp-core/tests/causal_wal_tests.rs`:
- Around line 2226-2259: Add a second negative case in the self-contained WAL
validation tests to corrupt WscSelfContainedRetainedMaterial.material_bytes as
well as the segment bytes. Use the existing wsc_self_contained_wal_export and
validate_wsc_self_contained_wal_export flow in causal_wal_tests, but mutate the
retained payload before building the export and assert it fails with
WscSelfContainedWalImportError::RetainedMaterialDigestMismatch, alongside the
existing SegmentRecovery coverage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e972ac3c-fca4-4a6d-a1ee-8f0ee628b35b

📥 Commits

Reviewing files that changed from the base of the PR and between 06ddc4c and 9cb3841.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • crates/warp-core/tests/causal_wal_tests.rs
  • docs/determinism/dind-harness.md
  • docs/topics/WAL.md
  • docs/workflows.md
  • xtask/src/main.rs

Comment thread crates/warp-core/tests/causal_wal_tests.rs
@flyingrobots

Copy link
Copy Markdown
Owner Author

Code Lawyer update

Item Status Evidence Resolving commit
#578 DIND durability convergence gate Resolved Added dind_durability_convergence_gate, wired bare cargo xtask dind to run it before scenario goldens, and included the exact witness in durability-release. 9cb3841
WAL/WSC/retention convergence Resolved The witness compares live filesystem WAL execution, read-only WAL recovery, self-contained WSC import, CAS-addressed WSC import, and retained reading reveal on the same app-facing receipt and bounded reading. 9cb3841
Typed obstruction coverage Resolved Missing CAS retained bytes return WscCasAddressedWalImportError::MissingCasBlob; corrupt embedded WAL segment bytes return WscSelfContainedWalImportError::SegmentRecovery. 9cb3841
CodeRabbit thread: corrupt retained payload coverage Resolved Added corrupt self-contained retained payload coverage; exporter now proves WscSelfContainedWalExportError::RetainedMaterialDigestMismatch before a divergent import can exist. GraphQL marks thread PRRT_kwDOQH8Wr86Mx-eW resolved. fd26d21
CI Clean 36/36 PR checks passed, including CI, det-gates, Security Audit, SPDX Header Check, Materialization Determinism, and CodeRabbit. fd26d21
Review threads Clean GraphQL reviewThreads.totalCount is 1, with all threads resolved; no requested-change reviews. fd26d21
CodeRabbit Clean CodeRabbit check is SUCCESS; the actionable thread was resolved by fd26d217. The latest top-level note is only rate limit / credits, with no unresolved actionable review thread. fd26d21

@flyingrobots flyingrobots merged commit 9ef21d2 into main Jun 28, 2026
36 checks passed
@flyingrobots flyingrobots deleted the cycle/578-dind-durability-convergence-gate branch June 28, 2026 07:07
@flyingrobots flyingrobots mentioned this pull request Jun 28, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[GP5-S5] DIND Durability Convergence Gate

1 participant