Skip to content

test(storage): fix filesystem-dependent allocation byte comparison - #1927

Merged
DecisionNerd merged 1 commit into
mainfrom
test/storage-allocation-byte-equality
Oct 8, 2026
Merged

DecisionNerd merged 1 commit into
mainfrom
test/storage-allocation-byte-equality

Conversation

@DecisionNerd

@DecisionNerd DecisionNerd commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The reported test compared whole construction evidence across independent serial and parallel runs. Filesystem state, including ext4 preallocation and extent layout, can change allocated blocks for identical written bytes; the host failure differed by one 4 KiB block (27,959,296 versus 27,963,392).

Exclude physical allocation values from cross-run comparisons while keeping exact logical/written byte counts, artifact names, output checksums where deterministic, object counts, and normalized install/removal identities. Check every expected retired segment and its receipt, and check for unexpected surviving segments. Apply the same correction to all other independent-run allocation comparisons in graphforge-storage. Same-run allocation ledgers and recovery authorities still compare exactly against their own files. The concurrent CAS test measures loser and winner allocations separately instead of assuming they match.

Validation used an isolated checkout at /tmp/gf-wt-flaky and CARGO_TARGET_DIR=/tmp/gf-target-flaky, CARGO_BUILD_JOBS=4. The requested /home/ubuntu paths and source Git metadata were read-only in this session.

  • cargo test -p graphforge-storage group_boundary::parallel_segment_retirement_matches_the_calling_thread: five runs passed, each 1 passed / 0 failed.
  • Temporarily skipped exactly one parallel segment retirement: the same test exited 101 with assertion left == right failed at construction_lifecycle_tests.rs:1758. Restored the production source byte-for-byte; the committed diff contains only tests.
  • cargo test -p graphforge-storage group_boundary: 13 passed / 0 failed.
  • Each of the eight affected tests outside group_boundary: passed individually.
  • make check: passed (exit 0).

Affected tests (paths relative to crates/graphforge-storage/src):

  • construction_lifecycle_tests.rs:1715 — parallel_segment_retirement_matches_the_calling_thread.
  • construction_lifecycle_tests.rs:1813 — group_boundary_crashes_resume_with_retired_inputs.
  • construction_lifecycle_tests.rs:2057 — shape_end_crashes_discard_segments_and_complete.
  • construction_lifecycle_tests.rs:2257 — lane_crashes_resume_with_the_same_graph.
  • construction_lifecycle_tests.rs:2305 — finish_stage_crashes_resume_with_the_same_graph.
  • construction_lifecycle_tests.rs:2446 — node_index_finish_stage_crashes_resume_with_the_same_graph.
  • graph_construction/shape/tests.rs:829 — segment_retirement_is_schedule_independent_including_failure.
  • graph_construction/partition_shaping/tests.rs:258 — boundary_seal_on_lanes_matches_the_calling_thread.
  • graph_construction/partition_load/tests.rs:426 — fixed_partition_finish_is_schedule_independent_across_worker_counts.
  • graph_construction/partition_load/tests.rs:758 — finish_leases_its_workers_from_the_instance_admission.
  • graph_construction/tests.rs:1197 — subprocess_crashes_recover_each_durable_boundary.
  • graph_construction/tests.rs:1460 — shape_inventory_and_evidence_commit_recover_without_double_counting.
  • graph_construction/encoded_ledger/tests.rs:389 — encoding_and_publication_crashes_reconstruct_allocation_evidence.
  • graph_object_store/installation/tests.rs:120 — allocation_observed_concurrent_cas_winner_keeps_real_temporary_peak.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…ted blocks

Filesystem extent layout and preallocation can change allocated_bytes even
when identical logical bytes are written. Physical allocated blocks are not
part of the code's cross-run contract.

Compare logical/written byte counts, artifact names and retired segment
identities. Preserve exact same-run allocation accounting, measuring both
CAS contender files independently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: CurateLabs/graphforge/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ad388a0c-1dbf-432e-b5c6-da6e9635d4f5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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.

@github-actions github-actions Bot added the core Core source code changes label Oct 8, 2026
@DecisionNerd
DecisionNerd added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit 8f9750a Oct 8, 2026
15 checks passed
@DecisionNerd
DecisionNerd deleted the test/storage-allocation-byte-equality branch October 8, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core source code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant