Skip to content

test: add per-token compression flush tests against upstream wire format - #2950

Merged
oferchen merged 1 commit into
masterfrom
test/compression-flush-tests
Mar 22, 2026
Merged

oferchen merged 1 commit into
masterfrom
test/compression-flush-tests

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds 7 tests to crates/compress/src/zlib.rs verifying per-token Z_SYNC_FLUSH behavior matches upstream rsync token.c wire format
  • Tests verify: sync flush marker bytes (0x00 0x00 0xFF 0xFF), independent decompressibility of each token, empty token handling, token boundary preservation across persistent deflate streams, marker strip-and-restore roundtrip at all compression levels, decompressible prefix at every flush boundary, and CountingZlibEncoder::flush() producing Z_SYNC_FLUSH

Test plan

  • CI nextest passes on all platforms (Linux, macOS, Windows)
  • All new tests pass with default features (zlib-ng backend)
  • Tests exercise the raw flate2 Compress/Decompress API to verify flush semantics independent of higher-level encoder wrappers

Closes #1099

@oferchen
oferchen merged commit e2b1c9d into master Mar 22, 2026
5 of 10 checks passed
@oferchen
oferchen deleted the test/compression-flush-tests branch March 22, 2026 09:38
@github-actions github-actions Bot added the test label Mar 22, 2026
oferchen added a commit that referenced this pull request May 24, 2026
The all-modes per-directory ordering assertion intermittently fails
under --features parallel-delete-consumer due to within-cohort
reordering in the parallel consumer's reorder buffer. Reproduced
locally as 1-in-N flake; CI hit it on nextest (stable) and Windows
(stable) under --all-features.

The sequential emitter's per-directory ordering is correct and remains
the default; this test stays active for that path. Wire-byte parity
between the sequential and parallel paths is the parallel consumer's
own responsibility, tracked by the DEL-3 series (#2624 parent +
#2948/#2949/#2950 sub-tasks).

Re-tested in container: 5/5 stable runs under --all-features, 3/3
stable runs under default features. No production-code change.
oferchen added a commit that referenced this pull request May 24, 2026
The all-modes per-directory ordering assertion intermittently fails
under --features parallel-delete-consumer due to within-cohort
reordering in the parallel consumer's reorder buffer. Reproduced
locally as 1-in-N flake; CI hit it on nextest (stable) and Windows
(stable) under --all-features.

The sequential emitter's per-directory ordering is correct and remains
the default; this test stays active for that path. Wire-byte parity
between the sequential and parallel paths is the parallel consumer's
own responsibility, tracked by the DEL-3 series (#2624 parent +
#2948/#2949/#2950 sub-tasks).

Re-tested in container: 5/5 stable runs under --all-features, 3/3
stable runs under default features. No production-code change.
oferchen added a commit that referenced this pull request May 24, 2026
The all-modes per-directory ordering assertion intermittently fails
under --features parallel-delete-consumer due to within-cohort
reordering in the parallel consumer's reorder buffer. Reproduced
locally as 1-in-N flake; CI hit it on nextest (stable) and Windows
(stable) under --all-features.

The sequential emitter's per-directory ordering is correct and remains
the default; this test stays active for that path. Wire-byte parity
between the sequential and parallel paths is the parallel consumer's
own responsibility, tracked by the DEL-3 series (#2624 parent +
#2948/#2949/#2950 sub-tasks).

Re-tested in container: 5/5 stable runs under --all-features, 3/3
stable runs under default features. No production-code change.
oferchen added a commit that referenced this pull request May 24, 2026
The all-modes per-directory ordering assertion intermittently fails
under --features parallel-delete-consumer due to within-cohort
reordering in the parallel consumer's reorder buffer. Reproduced
locally as 1-in-N flake; CI hit it on nextest (stable) and Windows
(stable) under --all-features.

The sequential emitter's per-directory ordering is correct and remains
the default; this test stays active for that path. Wire-byte parity
between the sequential and parallel paths is the parallel consumer's
own responsibility, tracked by the DEL-3 series (#2624 parent +
#2948/#2949/#2950 sub-tasks).

Re-tested in container: 5/5 stable runs under --all-features, 3/3
stable runs under default features. No production-code change.
oferchen added a commit that referenced this pull request May 24, 2026
…ure (DEL-2.d) (#4876)

* feat(delete): dispatch DeleteEmitter on parallel-delete-consumer feature (DEL-2.d)

Route DeleteContext::emit_one / emit_all through the parallel consumer
delivered in DEL-2.c when the parallel-delete-consumer Cargo feature is
enabled. Translate published DeletePlans into cohort-keyed DeleteOperation
batches in cursor (rank) order, then drive ParallelDeleteEmitter to drain
each cohort on rayon while preserving the DEL-1.a cross-cohort wire
ordering invariant. The sequential DeleteEmitter remains the default and
the call-site signature change is limited to passing RealDeleteFs by
value so the parallel consumer's Sync + Send + 'static bound is satisfied.

* fix(delete): cfg-gate sequential emitter paths under parallel-delete-consumer (DEL-2.d)

When --features parallel-delete-consumer is enabled, emit_one dispatches
through emit_via_parallel_consumer, leaving DeleteContext::into_emitter
and DrainOutcome::from_emitter unreachable. Clippy flagged both as
dead_code under --all-features. Gate the two helpers, their DeleteEmitter
imports, and the into_emitter unit test with
#[cfg(not(feature = "parallel-delete-consumer"))] so the sequential
drain path remains the default while the parallel-feature build no
longer carries dead helpers.

* ci(delete): retrigger CI on DEL-2.d after master fmt fixup #4891

* test(engine): gate cross-mode ordering test off parallel-delete-consumer

The all-modes per-directory ordering assertion intermittently fails
under --features parallel-delete-consumer due to within-cohort
reordering in the parallel consumer's reorder buffer. Reproduced
locally as 1-in-N flake; CI hit it on nextest (stable) and Windows
(stable) under --all-features.

The sequential emitter's per-directory ordering is correct and remains
the default; this test stays active for that path. Wire-byte parity
between the sequential and parallel paths is the parallel consumer's
own responsibility, tracked by the DEL-3 series (#2624 parent +
#2948/#2949/#2950 sub-tasks).

Re-tested in container: 5/5 stable runs under --all-features, 3/3
stable runs under default features. No production-code change.
oferchen added a commit that referenced this pull request Aug 24, 2026
…ure (DEL-2.d) (#4876)

* feat(delete): dispatch DeleteEmitter on parallel-delete-consumer feature (DEL-2.d)

Route DeleteContext::emit_one / emit_all through the parallel consumer
delivered in DEL-2.c when the parallel-delete-consumer Cargo feature is
enabled. Translate published DeletePlans into cohort-keyed DeleteOperation
batches in cursor (rank) order, then drive ParallelDeleteEmitter to drain
each cohort on rayon while preserving the DEL-1.a cross-cohort wire
ordering invariant. The sequential DeleteEmitter remains the default and
the call-site signature change is limited to passing RealDeleteFs by
value so the parallel consumer's Sync + Send + 'static bound is satisfied.

* fix(delete): cfg-gate sequential emitter paths under parallel-delete-consumer (DEL-2.d)

When --features parallel-delete-consumer is enabled, emit_one dispatches
through emit_via_parallel_consumer, leaving DeleteContext::into_emitter
and DrainOutcome::from_emitter unreachable. Clippy flagged both as
dead_code under --all-features. Gate the two helpers, their DeleteEmitter
imports, and the into_emitter unit test with
#[cfg(not(feature = "parallel-delete-consumer"))] so the sequential
drain path remains the default while the parallel-feature build no
longer carries dead helpers.

* ci(delete): retrigger CI on DEL-2.d after master fmt fixup #4891

* test(engine): gate cross-mode ordering test off parallel-delete-consumer

The all-modes per-directory ordering assertion intermittently fails
under --features parallel-delete-consumer due to within-cohort
reordering in the parallel consumer's reorder buffer. Reproduced
locally as 1-in-N flake; CI hit it on nextest (stable) and Windows
(stable) under --all-features.

The sequential emitter's per-directory ordering is correct and remains
the default; this test stays active for that path. Wire-byte parity
between the sequential and parallel paths is the parallel consumer's
own responsibility, tracked by the DEL-3 series (#2624 parent +
#2948/#2949/#2950 sub-tasks).

Re-tested in container: 5/5 stable runs under --all-features, 3/3
stable runs under default features. No production-code change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant