Skip to content

refactor: decompose flist/write.rs into focused submodules - #2624

Merged
oferchen merged 1 commit into
masterfrom
refactor/split-flist-write
Mar 13, 2026
Merged

oferchen merged 1 commit into
masterfrom
refactor/split-flist-write

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Split flist/write.rs (3556 lines) into 5 focused submodules under write/
  • mod.rs - PreserveFlags, FileListWriter struct, constructors, write_entry orchestration
  • xflags.rs - Flag calculation helpers
  • metadata.rs - Metadata encoding (size, time, mode, uid/gid)
  • encoding.rs - Wire encoding (flags, names, symlinks, devices, hardlinks, checksums)
  • tests.rs - All test code
  • No functional changes - pure structural reorganization

Test plan

  • CI passes (fmt, clippy, nextest on all platforms)

@oferchen
oferchen merged commit 2f8c398 into master Mar 13, 2026
10 of 11 checks passed
@oferchen
oferchen deleted the refactor/split-flist-write branch March 13, 2026 09:25
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