Skip to content

Fix CLI default program name when arguments are missing - #2096

Merged
oferchen merged 1 commit into
masterfrom
fix-usage-error-in-empty-argument-test
Nov 8, 2025
Merged

oferchen merged 1 commit into
masterfrom
fix-usage-error-in-empty-argument-test

Conversation

@oferchen

@oferchen oferchen commented Nov 8, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • default the CLI argument shim to the oc-rsync program name so usage and diagnostics use the branded banner

Testing

  • cargo test -p oc-rsync --bin oc-rsync client::tests::empty_argument_list_defaults_to_usage_error

[Codex Task](

@oferchen
oferchen merged commit aa0fd90 into master Nov 8, 2025
@oferchen
oferchen deleted the fix-usage-error-in-empty-argument-test branch November 8, 2025 23:29
oferchen added a commit that referenced this pull request May 7, 2026
Specifies a PID-style controller that resizes per-pipeline I/O buffer
windows in response to throughput feedback, layered on top of the
existing pressure-driven BufferPool grow/shrink logic. Covers
setpoint/PV/MV signals, sample cadence, anti-windup clamp, integration
points (disk-commit channel capacity, buffer pool slot size, multiplex
frame batching), Ziegler-Nichols tuning strategy, and three workload
presets gated behind --adaptive-buffers. Maps to follow-up tasks #2095
(implementation) and #2096 (convergence tests).
oferchen added a commit that referenced this pull request May 7, 2026
Specifies a PID-style controller that resizes per-pipeline I/O buffer
windows in response to throughput feedback, layered on top of the
existing pressure-driven BufferPool grow/shrink logic. Covers
setpoint/PV/MV signals, sample cadence, anti-windup clamp, integration
points (disk-commit channel capacity, buffer pool slot size, multiplex
frame batching), Ziegler-Nichols tuning strategy, and three workload
presets gated behind --adaptive-buffers. Maps to follow-up tasks #2095
(implementation) and #2096 (convergence tests).
oferchen added a commit that referenced this pull request May 7, 2026
Add a PID-style controller that adapts per-pipeline buffer window size
in response to observed throughput, per the design RFC at
docs/design/adaptive-buffer-controller.md.

The new module exposes AdaptiveBufferController and a builder-style
ControllerConfig with Ziegler-Nichols LAN-preset gains as defaults
(K_p=0.6, K_i=0.2, K_d=0.05). Internally a single std::sync::Mutex
guards the integrator, previous-error sample, and previous-sample
timestamp; the recommended buffer size is exposed via an AtomicUsize
for lock-free reads from the hot path. The dt is clamped to [1ms, 5s]
to defend against divide-by-zero on the derivative term and integral
windup on a stalled producer; the integrator is independently clamped
by the configured anti-windup window.

Tests cover proportional growth/shrink, integral steady-state-error
elimination, derivative damping on a step input, anti-windup clamping
under sustained error, both buffer-size clamps, reset semantics,
zero-dt safety, and a synthetic-plant convergence test against a
linear-saturating throughput model that confirms the default gains
settle within 10% of the setpoint inside 50 samples.

Integration into write-batch sizing, BufferPool capacity hints, and
multiplex frame batching is intentionally out of scope; that work is
tracked by the wiring follow-up under task #2096.

The RFC originally proposed crates/engine/src/pipeline/buffer_controller.rs,
but the engine crate has no pipeline module today; placing the file
alongside throughput.rs keeps the module tree flat and groups it with
the existing throughput EMA it will eventually consume. The deviation
is documented in the file's top doc comment.
oferchen added a commit that referenced this pull request May 7, 2026
Add a PID-style controller that adapts per-pipeline buffer window size
in response to observed throughput, per the design RFC at
docs/design/adaptive-buffer-controller.md.

The new module exposes AdaptiveBufferController and a builder-style
ControllerConfig with Ziegler-Nichols LAN-preset gains as defaults
(K_p=0.6, K_i=0.2, K_d=0.05). Internally a single std::sync::Mutex
guards the integrator, previous-error sample, and previous-sample
timestamp; the recommended buffer size is exposed via an AtomicUsize
for lock-free reads from the hot path. The dt is clamped to [1ms, 5s]
to defend against divide-by-zero on the derivative term and integral
windup on a stalled producer; the integrator is independently clamped
by the configured anti-windup window.

Tests cover proportional growth/shrink, integral steady-state-error
elimination, derivative damping on a step input, anti-windup clamping
under sustained error, both buffer-size clamps, reset semantics,
zero-dt safety, and a synthetic-plant convergence test against a
linear-saturating throughput model that confirms the default gains
settle within 10% of the setpoint inside 50 samples.

Integration into write-batch sizing, BufferPool capacity hints, and
multiplex frame batching is intentionally out of scope; that work is
tracked by the wiring follow-up under task #2096.

The RFC originally proposed crates/engine/src/pipeline/buffer_controller.rs,
but the engine crate has no pipeline module today; placing the file
alongside throughput.rs keeps the module tree flat and groups it with
the existing throughput EMA it will eventually consume. The deviation
is documented in the file's top doc comment.
oferchen added a commit that referenced this pull request May 7, 2026
Add a PID-style controller that adapts per-pipeline buffer window size
in response to observed throughput, per the design RFC at
docs/design/adaptive-buffer-controller.md.

The new module exposes AdaptiveBufferController and a builder-style
ControllerConfig with Ziegler-Nichols LAN-preset gains as defaults
(K_p=0.6, K_i=0.2, K_d=0.05). Internally a single std::sync::Mutex
guards the integrator, previous-error sample, and previous-sample
timestamp; the recommended buffer size is exposed via an AtomicUsize
for lock-free reads from the hot path. The dt is clamped to [1ms, 5s]
to defend against divide-by-zero on the derivative term and integral
windup on a stalled producer; the integrator is independently clamped
by the configured anti-windup window.

Tests cover proportional growth/shrink, integral steady-state-error
elimination, derivative damping on a step input, anti-windup clamping
under sustained error, both buffer-size clamps, reset semantics,
zero-dt safety, and a synthetic-plant convergence test against a
linear-saturating throughput model that confirms the default gains
settle within 10% of the setpoint inside 50 samples.

Integration into write-batch sizing, BufferPool capacity hints, and
multiplex frame batching is intentionally out of scope; that work is
tracked by the wiring follow-up under task #2096.

The RFC originally proposed crates/engine/src/pipeline/buffer_controller.rs,
but the engine crate has no pipeline module today; placing the file
alongside throughput.rs keeps the module tree flat and groups it with
the existing throughput EMA it will eventually consume. The deviation
is documented in the file's top doc comment.
oferchen added a commit that referenced this pull request May 13, 2026
#3986)

Add 16 convergence tests for the PID-like adaptive buffer controller
that verify stability, damping, and bounded behavior under complex
workload patterns: multi-phase ramp/plateau/decay, sustained zero and
max throughput, sawtooth loads, reset-and-reconverge, narrow and
degenerate min/max windows, rapid and slow sample intervals, producer
stalls, alternating plant gain, monotonic approach, high noise, plant
saturation, asymmetric gain bias, convergence speed comparison (PID vs
I-only), derivative kick bounds, and concurrent observers.
oferchen added a commit that referenced this pull request May 18, 2026
Specifies a PID-style controller that resizes per-pipeline I/O buffer
windows in response to throughput feedback, layered on top of the
existing pressure-driven BufferPool grow/shrink logic. Covers
setpoint/PV/MV signals, sample cadence, anti-windup clamp, integration
points (disk-commit channel capacity, buffer pool slot size, multiplex
frame batching), Ziegler-Nichols tuning strategy, and three workload
presets gated behind --adaptive-buffers. Maps to follow-up tasks #2095
(implementation) and #2096 (convergence tests).
oferchen added a commit that referenced this pull request May 18, 2026
Add a PID-style controller that adapts per-pipeline buffer window size
in response to observed throughput, per the design RFC at
docs/design/adaptive-buffer-controller.md.

The new module exposes AdaptiveBufferController and a builder-style
ControllerConfig with Ziegler-Nichols LAN-preset gains as defaults
(K_p=0.6, K_i=0.2, K_d=0.05). Internally a single std::sync::Mutex
guards the integrator, previous-error sample, and previous-sample
timestamp; the recommended buffer size is exposed via an AtomicUsize
for lock-free reads from the hot path. The dt is clamped to [1ms, 5s]
to defend against divide-by-zero on the derivative term and integral
windup on a stalled producer; the integrator is independently clamped
by the configured anti-windup window.

Tests cover proportional growth/shrink, integral steady-state-error
elimination, derivative damping on a step input, anti-windup clamping
under sustained error, both buffer-size clamps, reset semantics,
zero-dt safety, and a synthetic-plant convergence test against a
linear-saturating throughput model that confirms the default gains
settle within 10% of the setpoint inside 50 samples.

Integration into write-batch sizing, BufferPool capacity hints, and
multiplex frame batching is intentionally out of scope; that work is
tracked by the wiring follow-up under task #2096.

The RFC originally proposed crates/engine/src/pipeline/buffer_controller.rs,
but the engine crate has no pipeline module today; placing the file
alongside throughput.rs keeps the module tree flat and groups it with
the existing throughput EMA it will eventually consume. The deviation
is documented in the file's top doc comment.
oferchen added a commit that referenced this pull request May 18, 2026
#3986)

Add 16 convergence tests for the PID-like adaptive buffer controller
that verify stability, damping, and bounded behavior under complex
workload patterns: multi-phase ramp/plateau/decay, sustained zero and
max throughput, sawtooth loads, reset-and-reconverge, narrow and
degenerate min/max windows, rapid and slow sample intervals, producer
stalls, alternating plant gain, monotonic approach, high noise, plant
saturation, asymmetric gain bias, convergence speed comparison (PID vs
I-only), derivative kick bounds, and concurrent observers.
oferchen added a commit that referenced this pull request Aug 24, 2026
#3986)

Add 16 convergence tests for the PID-like adaptive buffer controller
that verify stability, damping, and bounded behavior under complex
workload patterns: multi-phase ramp/plateau/decay, sustained zero and
max throughput, sawtooth loads, reset-and-reconverge, narrow and
degenerate min/max windows, rapid and slow sample intervals, producer
stalls, alternating plant gain, monotonic approach, high noise, plant
saturation, asymmetric gain bias, convergence speed comparison (PID vs
I-only), derivative kick bounds, and concurrent observers.
oferchen added a commit that referenced this pull request Aug 24, 2026
Specifies a PID-style controller that resizes per-pipeline I/O buffer
windows in response to throughput feedback, layered on top of the
existing pressure-driven BufferPool grow/shrink logic. Covers
setpoint/PV/MV signals, sample cadence, anti-windup clamp, integration
points (disk-commit channel capacity, buffer pool slot size, multiplex
frame batching), Ziegler-Nichols tuning strategy, and three workload
presets gated behind --adaptive-buffers. Maps to follow-up tasks #2095
(implementation) and #2096 (convergence tests).
oferchen added a commit that referenced this pull request Aug 24, 2026
Add a PID-style controller that adapts per-pipeline buffer window size
in response to observed throughput, per the design RFC at
docs/design/adaptive-buffer-controller.md.

The new module exposes AdaptiveBufferController and a builder-style
ControllerConfig with Ziegler-Nichols LAN-preset gains as defaults
(K_p=0.6, K_i=0.2, K_d=0.05). Internally a single std::sync::Mutex
guards the integrator, previous-error sample, and previous-sample
timestamp; the recommended buffer size is exposed via an AtomicUsize
for lock-free reads from the hot path. The dt is clamped to [1ms, 5s]
to defend against divide-by-zero on the derivative term and integral
windup on a stalled producer; the integrator is independently clamped
by the configured anti-windup window.

Tests cover proportional growth/shrink, integral steady-state-error
elimination, derivative damping on a step input, anti-windup clamping
under sustained error, both buffer-size clamps, reset semantics,
zero-dt safety, and a synthetic-plant convergence test against a
linear-saturating throughput model that confirms the default gains
settle within 10% of the setpoint inside 50 samples.

Integration into write-batch sizing, BufferPool capacity hints, and
multiplex frame batching is intentionally out of scope; that work is
tracked by the wiring follow-up under task #2096.

The RFC originally proposed crates/engine/src/pipeline/buffer_controller.rs,
but the engine crate has no pipeline module today; placing the file
alongside throughput.rs keeps the module tree flat and groups it with
the existing throughput EMA it will eventually consume. The deviation
is documented in the file's top doc comment.
oferchen added a commit that referenced this pull request Aug 24, 2026
#3986)

Add 16 convergence tests for the PID-like adaptive buffer controller
that verify stability, damping, and bounded behavior under complex
workload patterns: multi-phase ramp/plateau/decay, sustained zero and
max throughput, sawtooth loads, reset-and-reconverge, narrow and
degenerate min/max windows, rapid and slow sample intervals, producer
stalls, alternating plant gain, monotonic approach, high noise, plant
saturation, asymmetric gain bias, convergence speed comparison (PID vs
I-only), derivative kick bounds, and concurrent observers.
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