Repository navigation
test(storage): fix filesystem-dependent allocation byte comparison - #1927
Conversation
…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>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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.
assertion left == right failedat construction_lifecycle_tests.rs:1758. Restored the production source byte-for-byte; the committed diff contains only tests.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
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.