Skip to content

Prevent module burst from raising daemon bwlimit - #1196

Merged
oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync
Oct 27, 2025
Merged

oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync

Conversation

@oferchen

@oferchen oferchen commented Oct 27, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • cap module-specific bandwidth updates to the existing daemon limit when the module also provides a burst value
  • add a regression test that ensures bursts are applied without raising the capped limit

Testing

  • cargo test module_bwlimit_burst_does_not_raise_daemon_cap --manifest-path crates/daemon/Cargo.toml

@oferchen
oferchen merged commit 2fb89ac into master Oct 27, 2025
@oferchen
oferchen deleted the implement-missing-components-for-oc-rsync branch October 27, 2025 00:56
oferchen added a commit that referenced this pull request May 16, 2026
Add a curated corpus of malformed, truncated, and edge-case byte streams
that exercise the multiplex reader, legacy `@RSYNCD:` handshake parser,
varint and fixed-int decoders, delta token decoder, file-list name
decoder, and filter-rule wire decoder. Each entry carries an inline
comment describing the regression it would catch, and three runners
assert documented outcomes: clean parse, specific error kind, or no
panic under `catch_unwind`.

Designed as the static regression seed for live interop fuzzing (#1196).
The corpus is extensible: new adversarial inputs are added by appending
to the relevant static array.
oferchen added a commit that referenced this pull request May 16, 2026
Add tests/live_interop_fuzz_1196.rs: a randomised, seedable integration
test that drives local transfers through both oc-rsync and an upstream
rsync 3.4.x binary, then compares the resulting trees via SHA-256
file-content hashes plus symlink-target equality.

Each iteration generates a random tree (files, dirs, mtimes, perms,
sparse holes, optional symlinks), runs oc-rsync src->dst_a, runs
upstream src->dst_b, and asserts both destinations match the source and
each other. About one iteration in three then mutates the source and
re-runs to verify reconciliation under --delete.

Two tiers are exposed, both #[ignore] so they only run via
--run-ignored=all:

- live_interop_fuzz_smoke: budget capped at 120 s, small trees only.
- live_interop_fuzz_extended: budget governed by
  OC_RSYNC_FUZZ_BUDGET_SECS (default 60, recommended 3600 for nightly).

Reproducibility is via a seedable xorshift64* PRNG; failures print the
seed and the env-var command to replay them. The harness skips cleanly
when no upstream rsync is available (env OC_RSYNC_FUZZ_UPSTREAM_BIN,
target/interop/upstream-install/3.4.x/bin/rsync, or PATH).

This complements the static adversarial corpus work by exercising
dynamic edge cases the fixed corpus cannot cover.
oferchen added a commit that referenced this pull request May 16, 2026
Add a curated corpus of malformed, truncated, and edge-case byte streams
that exercise the multiplex reader, legacy `@RSYNCD:` handshake parser,
varint and fixed-int decoders, delta token decoder, file-list name
decoder, and filter-rule wire decoder. Each entry carries an inline
comment describing the regression it would catch, and three runners
assert documented outcomes: clean parse, specific error kind, or no
panic under `catch_unwind`.

Designed as the static regression seed for live interop fuzzing (#1196).
The corpus is extensible: new adversarial inputs are added by appending
to the relevant static array.
oferchen added a commit that referenced this pull request May 16, 2026
Add tests/live_interop_fuzz_1196.rs: a randomised, seedable integration
test that drives local transfers through both oc-rsync and an upstream
rsync 3.4.x binary, then compares the resulting trees via SHA-256
file-content hashes plus symlink-target equality.

Each iteration generates a random tree (files, dirs, mtimes, perms,
sparse holes, optional symlinks), runs oc-rsync src->dst_a, runs
upstream src->dst_b, and asserts both destinations match the source and
each other. About one iteration in three then mutates the source and
re-runs to verify reconciliation under --delete.

Two tiers are exposed, both #[ignore] so they only run via
--run-ignored=all:

- live_interop_fuzz_smoke: budget capped at 120 s, small trees only.
- live_interop_fuzz_extended: budget governed by
  OC_RSYNC_FUZZ_BUDGET_SECS (default 60, recommended 3600 for nightly).

Reproducibility is via a seedable xorshift64* PRNG; failures print the
seed and the env-var command to replay them. The harness skips cleanly
when no upstream rsync is available (env OC_RSYNC_FUZZ_UPSTREAM_BIN,
target/interop/upstream-install/3.4.x/bin/rsync, or PATH).

This complements the static adversarial corpus work by exercising
dynamic edge cases the fixed corpus cannot cover.
oferchen added a commit that referenced this pull request May 16, 2026
Add a curated corpus of malformed, truncated, and edge-case byte streams
that exercise the multiplex reader, legacy `@RSYNCD:` handshake parser,
varint and fixed-int decoders, delta token decoder, file-list name
decoder, and filter-rule wire decoder. Each entry carries an inline
comment describing the regression it would catch, and three runners
assert documented outcomes: clean parse, specific error kind, or no
panic under `catch_unwind`.

Designed as the static regression seed for live interop fuzzing (#1196).
The corpus is extensible: new adversarial inputs are added by appending
to the relevant static array.
oferchen added a commit that referenced this pull request May 16, 2026
Add tests/live_interop_fuzz_1196.rs: a randomised, seedable integration
test that drives local transfers through both oc-rsync and an upstream
rsync 3.4.x binary, then compares the resulting trees via SHA-256
file-content hashes plus symlink-target equality.

Each iteration generates a random tree (files, dirs, mtimes, perms,
sparse holes, optional symlinks), runs oc-rsync src->dst_a, runs
upstream src->dst_b, and asserts both destinations match the source and
each other. About one iteration in three then mutates the source and
re-runs to verify reconciliation under --delete.

Two tiers are exposed, both #[ignore] so they only run via
--run-ignored=all:

- live_interop_fuzz_smoke: budget capped at 120 s, small trees only.
- live_interop_fuzz_extended: budget governed by
  OC_RSYNC_FUZZ_BUDGET_SECS (default 60, recommended 3600 for nightly).

Reproducibility is via a seedable xorshift64* PRNG; failures print the
seed and the env-var command to replay them. The harness skips cleanly
when no upstream rsync is available (env OC_RSYNC_FUZZ_UPSTREAM_BIN,
target/interop/upstream-install/3.4.x/bin/rsync, or PATH).

This complements the static adversarial corpus work by exercising
dynamic edge cases the fixed corpus cannot cover.
oferchen added a commit that referenced this pull request May 16, 2026
Add a curated corpus of malformed, truncated, and edge-case byte streams
that exercise the multiplex reader, legacy `@RSYNCD:` handshake parser,
varint and fixed-int decoders, delta token decoder, file-list name
decoder, and filter-rule wire decoder. Each entry carries an inline
comment describing the regression it would catch, and three runners
assert documented outcomes: clean parse, specific error kind, or no
panic under `catch_unwind`.

Designed as the static regression seed for live interop fuzzing (#1196).
The corpus is extensible: new adversarial inputs are added by appending
to the relevant static array.
oferchen added a commit that referenced this pull request May 16, 2026
Add tests/live_interop_fuzz_1196.rs: a randomised, seedable integration
test that drives local transfers through both oc-rsync and an upstream
rsync 3.4.x binary, then compares the resulting trees via SHA-256
file-content hashes plus symlink-target equality.

Each iteration generates a random tree (files, dirs, mtimes, perms,
sparse holes, optional symlinks), runs oc-rsync src->dst_a, runs
upstream src->dst_b, and asserts both destinations match the source and
each other. About one iteration in three then mutates the source and
re-runs to verify reconciliation under --delete.

Two tiers are exposed, both #[ignore] so they only run via
--run-ignored=all:

- live_interop_fuzz_smoke: budget capped at 120 s, small trees only.
- live_interop_fuzz_extended: budget governed by
  OC_RSYNC_FUZZ_BUDGET_SECS (default 60, recommended 3600 for nightly).

Reproducibility is via a seedable xorshift64* PRNG; failures print the
seed and the env-var command to replay them. The harness skips cleanly
when no upstream rsync is available (env OC_RSYNC_FUZZ_UPSTREAM_BIN,
target/interop/upstream-install/3.4.x/bin/rsync, or PATH).

This complements the static adversarial corpus work by exercising
dynamic edge cases the fixed corpus cannot cover.
oferchen added a commit that referenced this pull request May 16, 2026
Add tests/live_interop_fuzz_1196.rs: a randomised, seedable integration
test that drives local transfers through both oc-rsync and an upstream
rsync 3.4.x binary, then compares the resulting trees via SHA-256
file-content hashes plus symlink-target equality.

Each iteration generates a random tree (files, dirs, mtimes, perms,
sparse holes, optional symlinks), runs oc-rsync src->dst_a, runs
upstream src->dst_b, and asserts both destinations match the source and
each other. About one iteration in three then mutates the source and
re-runs to verify reconciliation under --delete.

Two tiers are exposed, both #[ignore] so they only run via
--run-ignored=all:

- live_interop_fuzz_smoke: budget capped at 120 s, small trees only.
- live_interop_fuzz_extended: budget governed by
  OC_RSYNC_FUZZ_BUDGET_SECS (default 60, recommended 3600 for nightly).

Reproducibility is via a seedable xorshift64* PRNG; failures print the
seed and the env-var command to replay them. The harness skips cleanly
when no upstream rsync is available (env OC_RSYNC_FUZZ_UPSTREAM_BIN,
target/interop/upstream-install/3.4.x/bin/rsync, or PATH).

This complements the static adversarial corpus work by exercising
dynamic edge cases the fixed corpus cannot cover.
oferchen added a commit that referenced this pull request May 16, 2026
Add tests/live_interop_fuzz_1196.rs: a randomised, seedable integration
test that drives local transfers through both oc-rsync and an upstream
rsync 3.4.x binary, then compares the resulting trees via SHA-256
file-content hashes plus symlink-target equality.

Each iteration generates a random tree (files, dirs, mtimes, perms,
sparse holes, optional symlinks), runs oc-rsync src->dst_a, runs
upstream src->dst_b, and asserts both destinations match the source and
each other. About one iteration in three then mutates the source and
re-runs to verify reconciliation under --delete.

Two tiers are exposed, both #[ignore] so they only run via
--run-ignored=all:

- live_interop_fuzz_smoke: budget capped at 120 s, small trees only.
- live_interop_fuzz_extended: budget governed by
  OC_RSYNC_FUZZ_BUDGET_SECS (default 60, recommended 3600 for nightly).

Reproducibility is via a seedable xorshift64* PRNG; failures print the
seed and the env-var command to replay them. The harness skips cleanly
when no upstream rsync is available (env OC_RSYNC_FUZZ_UPSTREAM_BIN,
target/interop/upstream-install/3.4.x/bin/rsync, or PATH).

This complements the static adversarial corpus work by exercising
dynamic edge cases the fixed corpus cannot cover.
oferchen added a commit that referenced this pull request May 16, 2026
Add a curated corpus of malformed, truncated, and edge-case byte streams
that exercise the multiplex reader, legacy `@RSYNCD:` handshake parser,
varint and fixed-int decoders, delta token decoder, file-list name
decoder, and filter-rule wire decoder. Each entry carries an inline
comment describing the regression it would catch, and three runners
assert documented outcomes: clean parse, specific error kind, or no
panic under `catch_unwind`.

Designed as the static regression seed for live interop fuzzing (#1196).
The corpus is extensible: new adversarial inputs are added by appending
to the relevant static array.
oferchen added a commit that referenced this pull request May 16, 2026
… (#4181)

* test(protocol): adversarial stream corpus for parser robustness (#1195)

Add a curated corpus of malformed, truncated, and edge-case byte streams
that exercise the multiplex reader, legacy `@RSYNCD:` handshake parser,
varint and fixed-int decoders, delta token decoder, file-list name
decoder, and filter-rule wire decoder. Each entry carries an inline
comment describing the regression it would catch, and three runners
assert documented outcomes: clean parse, specific error kind, or no
panic under `catch_unwind`.

Designed as the static regression seed for live interop fuzzing (#1196).
The corpus is extensible: new adversarial inputs are added by appending
to the relevant static array.

* style(protocol): apply rustfmt to adversarial_stream_corpus

* fix(protocol): move cursor inside catch_unwind closure for UnwindSafe

* test(protocol): add corpus entries that exercise NoPanic and Ok outcomes

Adds one MULTIPLEX_CASES entry tagged Outcome::NoPanic (arbitrary bytes
that must not crash the reader) and one LEGACY_GREETING_CASES entry
tagged GreetingOutcome::Ok (canonical \@rsyncd: 32.0 line).
Removes the dead_code warning the unused variants triggered without
silencing the lint.
oferchen added a commit that referenced this pull request May 18, 2026
Add tests/live_interop_fuzz_1196.rs: a randomised, seedable integration
test that drives local transfers through both oc-rsync and an upstream
rsync 3.4.x binary, then compares the resulting trees via SHA-256
file-content hashes plus symlink-target equality.

Each iteration generates a random tree (files, dirs, mtimes, perms,
sparse holes, optional symlinks), runs oc-rsync src->dst_a, runs
upstream src->dst_b, and asserts both destinations match the source and
each other. About one iteration in three then mutates the source and
re-runs to verify reconciliation under --delete.

Two tiers are exposed, both #[ignore] so they only run via
--run-ignored=all:

- live_interop_fuzz_smoke: budget capped at 120 s, small trees only.
- live_interop_fuzz_extended: budget governed by
  OC_RSYNC_FUZZ_BUDGET_SECS (default 60, recommended 3600 for nightly).

Reproducibility is via a seedable xorshift64* PRNG; failures print the
seed and the env-var command to replay them. The harness skips cleanly
when no upstream rsync is available (env OC_RSYNC_FUZZ_UPSTREAM_BIN,
target/interop/upstream-install/3.4.x/bin/rsync, or PATH).

This complements the static adversarial corpus work by exercising
dynamic edge cases the fixed corpus cannot cover.
oferchen added a commit that referenced this pull request May 18, 2026
… (#4181)

* test(protocol): adversarial stream corpus for parser robustness (#1195)

Add a curated corpus of malformed, truncated, and edge-case byte streams
that exercise the multiplex reader, legacy `@RSYNCD:` handshake parser,
varint and fixed-int decoders, delta token decoder, file-list name
decoder, and filter-rule wire decoder. Each entry carries an inline
comment describing the regression it would catch, and three runners
assert documented outcomes: clean parse, specific error kind, or no
panic under `catch_unwind`.

Designed as the static regression seed for live interop fuzzing (#1196).
The corpus is extensible: new adversarial inputs are added by appending
to the relevant static array.

* style(protocol): apply rustfmt to adversarial_stream_corpus

* fix(protocol): move cursor inside catch_unwind closure for UnwindSafe

* test(protocol): add corpus entries that exercise NoPanic and Ok outcomes

Adds one MULTIPLEX_CASES entry tagged Outcome::NoPanic (arbitrary bytes
that must not crash the reader) and one LEGACY_GREETING_CASES entry
tagged GreetingOutcome::Ok (canonical \@rsyncd: 32.0 line).
Removes the dead_code warning the unused variants triggered without
silencing the lint.
oferchen added a commit that referenced this pull request May 18, 2026
Add tests/live_interop_fuzz_1196.rs: a randomised, seedable integration
test that drives local transfers through both oc-rsync and an upstream
rsync 3.4.x binary, then compares the resulting trees via SHA-256
file-content hashes plus symlink-target equality.

Each iteration generates a random tree (files, dirs, mtimes, perms,
sparse holes, optional symlinks), runs oc-rsync src->dst_a, runs
upstream src->dst_b, and asserts both destinations match the source and
each other. About one iteration in three then mutates the source and
re-runs to verify reconciliation under --delete.

Two tiers are exposed, both #[ignore] so they only run via
--run-ignored=all:

- live_interop_fuzz_smoke: budget capped at 120 s, small trees only.
- live_interop_fuzz_extended: budget governed by
  OC_RSYNC_FUZZ_BUDGET_SECS (default 60, recommended 3600 for nightly).

Reproducibility is via a seedable xorshift64* PRNG; failures print the
seed and the env-var command to replay them. The harness skips cleanly
when no upstream rsync is available (env OC_RSYNC_FUZZ_UPSTREAM_BIN,
target/interop/upstream-install/3.4.x/bin/rsync, or PATH).

This complements the static adversarial corpus work by exercising
dynamic edge cases the fixed corpus cannot cover.
oferchen added a commit that referenced this pull request May 18, 2026
… (#4181)

* test(protocol): adversarial stream corpus for parser robustness (#1195)

Add a curated corpus of malformed, truncated, and edge-case byte streams
that exercise the multiplex reader, legacy `@RSYNCD:` handshake parser,
varint and fixed-int decoders, delta token decoder, file-list name
decoder, and filter-rule wire decoder. Each entry carries an inline
comment describing the regression it would catch, and three runners
assert documented outcomes: clean parse, specific error kind, or no
panic under `catch_unwind`.

Designed as the static regression seed for live interop fuzzing (#1196).
The corpus is extensible: new adversarial inputs are added by appending
to the relevant static array.

* style(protocol): apply rustfmt to adversarial_stream_corpus

* fix(protocol): move cursor inside catch_unwind closure for UnwindSafe

* test(protocol): add corpus entries that exercise NoPanic and Ok outcomes

Adds one MULTIPLEX_CASES entry tagged Outcome::NoPanic (arbitrary bytes
that must not crash the reader) and one LEGACY_GREETING_CASES entry
tagged GreetingOutcome::Ok (canonical \@rsyncd: 32.0 line).
Removes the dead_code warning the unused variants triggered without
silencing the lint.
oferchen added a commit that referenced this pull request Aug 24, 2026
Add tests/live_interop_fuzz_1196.rs: a randomised, seedable integration
test that drives local transfers through both oc-rsync and an upstream
rsync 3.4.x binary, then compares the resulting trees via SHA-256
file-content hashes plus symlink-target equality.

Each iteration generates a random tree (files, dirs, mtimes, perms,
sparse holes, optional symlinks), runs oc-rsync src->dst_a, runs
upstream src->dst_b, and asserts both destinations match the source and
each other. About one iteration in three then mutates the source and
re-runs to verify reconciliation under --delete.

Two tiers are exposed, both #[ignore] so they only run via
--run-ignored=all:

- live_interop_fuzz_smoke: budget capped at 120 s, small trees only.
- live_interop_fuzz_extended: budget governed by
  OC_RSYNC_FUZZ_BUDGET_SECS (default 60, recommended 3600 for nightly).

Reproducibility is via a seedable xorshift64* PRNG; failures print the
seed and the env-var command to replay them. The harness skips cleanly
when no upstream rsync is available (env OC_RSYNC_FUZZ_UPSTREAM_BIN,
target/interop/upstream-install/3.4.x/bin/rsync, or PATH).

This complements the static adversarial corpus work by exercising
dynamic edge cases the fixed corpus cannot cover.
oferchen added a commit that referenced this pull request Aug 24, 2026
… (#4181)

* test(protocol): adversarial stream corpus for parser robustness (#1195)

Add a curated corpus of malformed, truncated, and edge-case byte streams
that exercise the multiplex reader, legacy `@RSYNCD:` handshake parser,
varint and fixed-int decoders, delta token decoder, file-list name
decoder, and filter-rule wire decoder. Each entry carries an inline
comment describing the regression it would catch, and three runners
assert documented outcomes: clean parse, specific error kind, or no
panic under `catch_unwind`.

Designed as the static regression seed for live interop fuzzing (#1196).
The corpus is extensible: new adversarial inputs are added by appending
to the relevant static array.

* style(protocol): apply rustfmt to adversarial_stream_corpus

* fix(protocol): move cursor inside catch_unwind closure for UnwindSafe

* test(protocol): add corpus entries that exercise NoPanic and Ok outcomes

Adds one MULTIPLEX_CASES entry tagged Outcome::NoPanic (arbitrary bytes
that must not crash the reader) and one LEGACY_GREETING_CASES entry
tagged GreetingOutcome::Ok (canonical \@rsyncd: 32.0 line).
Removes the dead_code warning the unused variants triggered without
silencing the lint.
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