Skip to content

test(wal): rfc 0028 slice 2c — 11 test binaries fold into one harness - #402

Merged
jensholdgaard merged 1 commit into
mainfrom
rfc0028-slice2c-wal-harness
Jul 6, 2026
Merged

test(wal): rfc 0028 slice 2c — 11 test binaries fold into one harness#402
jensholdgaard merged 1 commit into
mainfrom
rfc0028-slice2c-wal-harness

Conversation

@jensholdgaard

Copy link
Copy Markdown
Owner

What

RFC 0028 slice 2c — the WAL crate's 11 integration-test binaries fold into one tests/it/ harness (the #399/#400/#401 recipe). Pure file moves plus the harness main.rs; no shared test modules, so no import adjustments. No test body changed.

RFC0028.1 — inventory proof

cargo test -p ourios-wal -- --list: 64 tests before, 64 after; leaf-name sets identical after stripping module-path prefixes (snapshots below).

RFC0028.2 — exemptions

None: the crash-recovery tests SIGKILL the wal_crash_fixture child [[bin]] (still under tests/fixtures/, untouched), never their own process. No global-provider installs, no env mutation.

Indicative timing (not the RFC0028.3 gate)

Same machine, warm workspace: touch crates/ourios-wal/src/lib.rs && cargo test -p ourios-wal --no-run35.9 s before, 25.8 s after (smaller relative win than the DataFusion crates — the WAL links far less per binary).

Invariants / hazards

CLAUDE.md §6.2 (tests are specifications): nothing weakened or deleted. The §3.4 crash-recovery CI test moves intact (name-prefix only).

Pre inventory (64)
append_after_reopen_extends_the_existing_segment: test
checkpoint::tests::decode_rejects_each_invalid_field: test
checkpoint::tests::encode_decode_round_trips: test
checkpoint::tests::encode_layout_is_the_pinned_32_bytes: test
checkpoint::tests::read_absent_is_none_invalid_is_corrupt: test
consecutive_appends_pack_tight_with_monotonic_offsets: test
crc_corruption_halts_replay_without_feeding_the_sink: test
every_tunable_out_of_range_value_is_rejected: test
existing_root_reuses_newest_segment: test
frame::tests::empty_payload_frame_is_header_only: test
frame::tests::frame_byte_layout_matches_rfc_6_2_2: test
frame::tests::frame_round_trips_through_write_then_read: test
frame::tests::read_frame_rejects_crc_mismatch: test
frame::tests::read_frame_rejects_non_zero_pad: test
frame::tests::read_frame_rejects_oversize_len: test
frame::tests::read_frame_rejects_truncated_header: test
frame::tests::read_frame_rejects_truncated_payload: test
frame::tests::read_frame_rejects_unknown_kind: test
fresh_root_creates_one_segment_with_a_valid_header: test
max_frame_bytes_is_accepted_one_more_is_rejected: test
missing_root_is_created_recursively: test
one_append_writes_one_frame_after_the_segment_header: test
replay_on_a_fresh_wal_yields_no_frames: test
rfc0008_1_ack_only_after_sync_returns_ok: test
rfc0008_1_append_fault_suppresses_ack: test
rfc0008_1_sync_fault_suppresses_ack: test
rfc0008_2_audit_event_frames_survive_alongside_otlp_batches: test
rfc0008_2_sigkill_between_append_and_sync_loses_no_fsynced_frame: test
rfc0008_2_sigkill_between_sync_and_ack_loses_no_fsynced_frame: test
rfc0008_3_recovery_emits_no_per_record_audit_event: test
rfc0008_3_recovery_emits_no_per_record_fsync: test
rfc0008_4_partial_header_on_newest_truncates_and_heals: test
rfc0008_4_partial_payload_on_newest_truncates_and_heals: test
rfc0008_4_partial_tail_on_older_segment_is_rfc0008_5_corruption: test
rfc0008_5_non_zero_pad_is_corruption: test
rfc0008_5_oversize_len_is_corruption: test
rfc0008_5_payload_bit_flip_is_crc_mismatch_corruption: test
rfc0008_5_torn_tail_on_closed_segment_is_corruption: test
rfc0008_5_unknown_kind_is_corruption: test
rfc0008_6_rotation_failure_quiesces_the_wal: test
rfc0008_6_size_cap_rotates_without_drop_or_duplicate: test
rfc0008_6_time_cap_rotates_without_drop_or_duplicate: test
rfc0008_7_crash_between_checkpoint_and_housekeeping_does_not_duplicate: test
rfc0008_7_housekeeping_never_unlinks_a_renamed_current_segment: test
rfc0008_7_normal_flow_unlinks_segments_below_checkpoint: test
rfc0008_7_retain_floor_holds_back_truncation_until_it_advances: test
rfc0008_7_surviving_segments_after_housekeeping_have_well_defined_offsets: test
rfc0008_9_undersized_segment_config_is_rejected_at_open: test
rfc0008_9_unflushed_bytes_bounded_under_random_arrival: test
segment::tests::header_byte_layout_matches_rfc_6_2_1: test
segment::tests::header_round_trips_through_write_then_read: test
segment::tests::read_header_rejects_foreign_magic: test
segment::tests::read_header_rejects_truncated_input: test
segment::tests::read_header_rejects_unknown_version: test
sync_reports_the_segment_length_as_the_durable_offset: test
synced_frames_of_both_kinds_replay_in_order: test
tests::create_fresh_segment_writes_a_v7_named_header_only_file: test
tests::list_segments_filters_and_sorts: test
tests::open_existing_segment_recovers_header_uuid: test
tests::open_existing_segment_rejects_foreign_magic: test
tests::rollback_set_len_then_append_lands_at_truncated_eof: test
tests::validate_config_accepts_defaults_and_exact_boundaries: test
tests::validate_config_rejects_each_out_of_range_field: test
torn_tail_on_newest_is_healed_and_next_append_resumes_on_boundary: test
Post inventory (64)
append::append_after_reopen_extends_the_existing_segment: test
append::consecutive_appends_pack_tight_with_monotonic_offsets: test
append::max_frame_bytes_is_accepted_one_more_is_rejected: test
append::one_append_writes_one_frame_after_the_segment_header: test
checkpoint::tests::decode_rejects_each_invalid_field: test
checkpoint::tests::encode_decode_round_trips: test
checkpoint::tests::encode_layout_is_the_pinned_32_bytes: test
checkpoint::tests::read_absent_is_none_invalid_is_corrupt: test
frame::tests::empty_payload_frame_is_header_only: test
frame::tests::frame_byte_layout_matches_rfc_6_2_2: test
frame::tests::frame_round_trips_through_write_then_read: test
frame::tests::read_frame_rejects_crc_mismatch: test
frame::tests::read_frame_rejects_non_zero_pad: test
frame::tests::read_frame_rejects_oversize_len: test
frame::tests::read_frame_rejects_truncated_header: test
frame::tests::read_frame_rejects_truncated_payload: test
frame::tests::read_frame_rejects_unknown_kind: test
open::every_tunable_out_of_range_value_is_rejected: test
open::existing_root_reuses_newest_segment: test
open::fresh_root_creates_one_segment_with_a_valid_header: test
open::missing_root_is_created_recursively: test
recovery::crc_corruption_halts_replay_without_feeding_the_sink: test
recovery::replay_on_a_fresh_wal_yields_no_frames: test
recovery::sync_reports_the_segment_length_as_the_durable_offset: test
recovery::synced_frames_of_both_kinds_replay_in_order: test
recovery::torn_tail_on_newest_is_healed_and_next_append_resumes_on_boundary: test
rfc0008_1_wal_before_ack::rfc0008_1_ack_only_after_sync_returns_ok: test
rfc0008_1_wal_before_ack::rfc0008_1_append_fault_suppresses_ack: test
rfc0008_1_wal_before_ack::rfc0008_1_sync_fault_suppresses_ack: test
rfc0008_2_crash_recovery::rfc0008_2_audit_event_frames_survive_alongside_otlp_batches: test
rfc0008_2_crash_recovery::rfc0008_2_sigkill_between_append_and_sync_loses_no_fsynced_frame: test
rfc0008_2_crash_recovery::rfc0008_2_sigkill_between_sync_and_ack_loses_no_fsynced_frame: test
rfc0008_3_recovery_o_n::rfc0008_3_recovery_emits_no_per_record_audit_event: test
rfc0008_3_recovery_o_n::rfc0008_3_recovery_emits_no_per_record_fsync: test
rfc0008_4_torn_writes::rfc0008_4_partial_header_on_newest_truncates_and_heals: test
rfc0008_4_torn_writes::rfc0008_4_partial_payload_on_newest_truncates_and_heals: test
rfc0008_4_torn_writes::rfc0008_4_partial_tail_on_older_segment_is_rfc0008_5_corruption: test
rfc0008_5_corruption::rfc0008_5_non_zero_pad_is_corruption: test
rfc0008_5_corruption::rfc0008_5_oversize_len_is_corruption: test
rfc0008_5_corruption::rfc0008_5_payload_bit_flip_is_crc_mismatch_corruption: test
rfc0008_5_corruption::rfc0008_5_torn_tail_on_closed_segment_is_corruption: test
rfc0008_5_corruption::rfc0008_5_unknown_kind_is_corruption: test
rfc0008_6_rotation::rfc0008_6_rotation_failure_quiesces_the_wal: test
rfc0008_6_rotation::rfc0008_6_size_cap_rotates_without_drop_or_duplicate: test
rfc0008_6_rotation::rfc0008_6_time_cap_rotates_without_drop_or_duplicate: test
rfc0008_7_checkpoint::rfc0008_7_crash_between_checkpoint_and_housekeeping_does_not_duplicate: test
rfc0008_7_checkpoint::rfc0008_7_housekeeping_never_unlinks_a_renamed_current_segment: test
rfc0008_7_checkpoint::rfc0008_7_normal_flow_unlinks_segments_below_checkpoint: test
rfc0008_7_checkpoint::rfc0008_7_retain_floor_holds_back_truncation_until_it_advances: test
rfc0008_7_checkpoint::rfc0008_7_surviving_segments_after_housekeeping_have_well_defined_offsets: test
rfc0008_9_unflushed_bytes::rfc0008_9_undersized_segment_config_is_rejected_at_open: test
rfc0008_9_unflushed_bytes::rfc0008_9_unflushed_bytes_bounded_under_random_arrival: test
segment::tests::header_byte_layout_matches_rfc_6_2_1: test
segment::tests::header_round_trips_through_write_then_read: test
segment::tests::read_header_rejects_foreign_magic: test
segment::tests::read_header_rejects_truncated_input: test
segment::tests::read_header_rejects_unknown_version: test
tests::create_fresh_segment_writes_a_v7_named_header_only_file: test
tests::list_segments_filters_and_sorts: test
tests::open_existing_segment_recovers_header_uuid: test
tests::open_existing_segment_rejects_foreign_magic: test
tests::rollback_set_len_then_append_lands_at_truncated_eof: test
tests::validate_config_accepts_defaults_and_exact_boundaries: test
tests::validate_config_rejects_each_out_of_range_field: test

🤖 Generated with Claude Code

Pure moves + the harness main.rs: no test body changed (RFC0028.1);
nothing exempt (RFC0028.2) — the crash tests SIGKILL the
wal_crash_fixture child [[bin]], never their own process.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jensholdgaard
jensholdgaard requested a review from Copilot July 6, 2026 09:58
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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 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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 62da401e-f109-46bf-bee3-82e7a5c86b24

📥 Commits

Reviewing files that changed from the base of the PR and between cc3ce1b and 67444d7.

📒 Files selected for processing (12)
  • crates/ourios-wal/tests/it/append.rs
  • crates/ourios-wal/tests/it/main.rs
  • crates/ourios-wal/tests/it/open.rs
  • crates/ourios-wal/tests/it/recovery.rs
  • crates/ourios-wal/tests/it/rfc0008_1_wal_before_ack.rs
  • crates/ourios-wal/tests/it/rfc0008_2_crash_recovery.rs
  • crates/ourios-wal/tests/it/rfc0008_3_recovery_o_n.rs
  • crates/ourios-wal/tests/it/rfc0008_4_torn_writes.rs
  • crates/ourios-wal/tests/it/rfc0008_5_corruption.rs
  • crates/ourios-wal/tests/it/rfc0008_6_rotation.rs
  • crates/ourios-wal/tests/it/rfc0008_7_checkpoint.rs
  • crates/ourios-wal/tests/it/rfc0008_9_unflushed_bytes.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0028-slice2c-wal-harness

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.

Copilot AI 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.

Pull request overview

This PR implements RFC 0028 slice 2c for the ourios-wal crate by consolidating what were previously multiple integration-test binaries into a single tests/it/ harness, reducing per-binary link overhead while preserving the existing test suite semantics and coverage.

Changes:

  • Adds a consolidated integration-test harness at crates/ourios-wal/tests/it/main.rs that modules in the moved tests.
  • Moves the WAL integration tests into crates/ourios-wal/tests/it/ as per-module files (append/open/recovery + RFC0008.* scenarios).
  • Keeps the crash fixture (wal_crash_fixture) approach intact, so crash-recovery tests still SIGKILL a child process rather than themselves.

Reviewed changes

Copilot reviewed 1 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/ourios-wal/tests/it/main.rs New unified integration-test harness that declares the moved test modules.
crates/ourios-wal/tests/it/append.rs WAL append integration tests moved under the unified harness.
crates/ourios-wal/tests/it/open.rs WAL open integration tests moved under the unified harness.
crates/ourios-wal/tests/it/recovery.rs In-process sync/replay integration tests moved under the unified harness.
crates/ourios-wal/tests/it/rfc0008_1_wal_before_ack.rs RFC0008.1 (“WAL before ack”) tests moved under the unified harness.
crates/ourios-wal/tests/it/rfc0008_2_crash_recovery.rs RFC0008.2 SIGKILL-based crash recovery tests moved under the unified harness.
crates/ourios-wal/tests/it/rfc0008_3_recovery_o_n.rs RFC0008.3 recovery non-amplification smoke tests moved under the unified harness.
crates/ourios-wal/tests/it/rfc0008_4_torn_writes.rs RFC0008.4 torn-write healing vs corruption tests moved under the unified harness.
crates/ourios-wal/tests/it/rfc0008_5_corruption.rs RFC0008.5 corruption classification + metrics tests moved under the unified harness.
crates/ourios-wal/tests/it/rfc0008_6_rotation.rs RFC0008.6 rotation behavior tests moved under the unified harness.
crates/ourios-wal/tests/it/rfc0008_7_checkpoint.rs RFC0008.7 checkpoint/housekeeping behavior tests moved under the unified harness.
crates/ourios-wal/tests/it/rfc0008_9_unflushed_bytes.rs RFC0008.9 proptest bound test + config validation test moved under the unified harness.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jensholdgaard
jensholdgaard merged commit 928dbc1 into main Jul 6, 2026
22 checks passed
@jensholdgaard
jensholdgaard deleted the rfc0028-slice2c-wal-harness branch July 6, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants