Skip to content

test: harden pipeline-backpressure FAMILIES fixture read-ahead margin against BGZF block-size drift #789

Description

@nh13

The pipeline backpressure integration tests in tests/integration/test_pipeline_memory_backpressure.rs size their input via a FAMILIES constant. During the 2026-08-16 review sweep, the read-ahead margin was measured at ~2.46 MiB sitting just under input_len / 2 (~2.7 MiB) — limited headroom. A future toolchain or dependency change to BGZF block sizing could materially shift how much the reader buffers and break the margin, making these tests flaky or wrong.

The most brittle assertion (settled.bytes < input_len / 2 in stalled_writer_stops_the_reader_within_the_queue_memory_budget) was already made budget-relative (unread >= TEST_BUDGET_BYTES) as part of PR #764's coverage fix. This issue tracks the remaining hardening: make the fixture sizing / any remaining fraction-based margins robust to BGZF block-size drift rather than relying on the current tight headroom.

Task

  • Audit FAMILIES/fixture sizing and every margin assertion in test_pipeline_memory_backpressure.rs.
  • Make margins budget-relative (assert the reader left ≥ one budget unread) or size the fixture with clear headroom, without regressing the llvm-cov coverage-job runtime (the fixture was deliberately shrunk to avoid a >120s timeout — don't reintroduce that).

Placement note

The fixture and these tests are introduced by PR #764 (branch 746/nhomer/bound-consensus-memory-under-writer-stall) and are not in main yet. The fix therefore belongs in #764 (folded into that PR), not a separate branch off main. This issue exists for tracking; link it from #764.

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    hygienerustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions