Collapse workspace to a single oc-rsync entrypoint#2091
Conversation
There was a problem hiding this comment.
💡 Codex Review
Lines 1 to 40 in b2e9112
The commit deletes crates/core/build.rs, which previously populated OC_RSYNC_WORKSPACE_* via cargo:rustc-env. All constants in crates/core/src/workspace/constants.rs still read those variables through env!("OC_RSYNC_WORKSPACE_BRAND"), env!("OC_RSYNC_WORKSPACE_CLIENT_BIN"), etc. Without the build script, Cargo never defines these variables and the crate fails to compile with “environment variable … not defined” errors. Either keep emitting the env vars or switch the constants to hard-coded values pulled from the manifest at runtime so the workspace continues to build.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Proposes an AIMD (Additive-Increase / Multiplicative-Decrease) controller that replaces the static CAPACITY_MULTIPLIER and PARALLEL_THRESHOLD knobs with a feedback-driven concurrency limiter. Covers placement, state machine, overload detection, integration points in the engine, transfer, and CLI crates, trade-offs vs Vegas/BBR/Gradient2, implementation phases mapped to tasks #2091-#2093, and open questions on per-pipeline scope, --bwlimit interaction, and local-only feedback signal quality.
Adds the standalone limiter type defined by the design RFC at docs/design/aimd-concurrency-limiter.md. The implementation lives in crates/engine/src/concurrent_delta/work_queue/limiter.rs and exposes: - LimiterConfig builder with min_limit / max_limit / alpha / beta_num / beta_den / build(). - AimdLimiter with try_acquire, target, in_flight, rtt_ema_nanos, and a pub is_rtt_spike predicate. - RAII Ticket guard (#[must_use]) with record_success / record_overload / record_error and Drop fallback for panic paths. - OverloadReason variants for RttSpike / QueueSaturated / DiskCommitPressure / ErrorRate. Internals follow the RFC: integer-only RTT EMA (alpha_ema = 1/8 per RFC 6298), variance smoothed with beta = 1/4, RTT-spike threshold of ema + 2*sqrt(var) via Newton-method isqrt, slow-start doubling until the first decrease, debounce window of 2*rtt_ema after each multiplicative decrease, and AcqRel/Acquire atomic ordering on every target/in_flight transition. Twelve unit tests cover the algorithm: target saturation (single threaded and under thread contention), additive increase, multiplicative decrease, min/max clamps, debounce suppression, RTT EMA convergence, ticket Drop on panic, transient-vs-deterministic error classification, slow-start doubling, RTT-spike predicate, builder clamps, and the isqrt helper. Not yet integrated. Callers (WorkQueueSender, disk-commit, CLI) are wired in the follow-on tickets: - #2092: convergence tests under injected error. - #2093: --adaptive-concurrency / --no-adaptive-concurrency CLI flag.
* feat(engine): AIMD concurrency limiter type (#2091) Adds the standalone limiter type defined by the design RFC at docs/design/aimd-concurrency-limiter.md. The implementation lives in crates/engine/src/concurrent_delta/work_queue/limiter.rs and exposes: - LimiterConfig builder with min_limit / max_limit / alpha / beta_num / beta_den / build(). - AimdLimiter with try_acquire, target, in_flight, rtt_ema_nanos, and a pub is_rtt_spike predicate. - RAII Ticket guard (#[must_use]) with record_success / record_overload / record_error and Drop fallback for panic paths. - OverloadReason variants for RttSpike / QueueSaturated / DiskCommitPressure / ErrorRate. Internals follow the RFC: integer-only RTT EMA (alpha_ema = 1/8 per RFC 6298), variance smoothed with beta = 1/4, RTT-spike threshold of ema + 2*sqrt(var) via Newton-method isqrt, slow-start doubling until the first decrease, debounce window of 2*rtt_ema after each multiplicative decrease, and AcqRel/Acquire atomic ordering on every target/in_flight transition. Twelve unit tests cover the algorithm: target saturation (single threaded and under thread contention), additive increase, multiplicative decrease, min/max clamps, debounce suppression, RTT EMA convergence, ticket Drop on panic, transient-vs-deterministic error classification, slow-start doubling, RTT-spike predicate, builder clamps, and the isqrt helper. Not yet integrated. Callers (WorkQueueSender, disk-commit, CLI) are wired in the follow-on tickets: - #2092: convergence tests under injected error. - #2093: --adaptive-concurrency / --no-adaptive-concurrency CLI flag. * style: cargo fmt --all * fix(engine): clippy lints on AIMD limiter (abs_diff, div_ceil, format args)
Proposes an AIMD (Additive-Increase / Multiplicative-Decrease) controller that replaces the static CAPACITY_MULTIPLIER and PARALLEL_THRESHOLD knobs with a feedback-driven concurrency limiter. Covers placement, state machine, overload detection, integration points in the engine, transfer, and CLI crates, trade-offs vs Vegas/BBR/Gradient2, implementation phases mapped to tasks #2091-#2093, and open questions on per-pipeline scope, --bwlimit interaction, and local-only feedback signal quality.
* feat(engine): AIMD concurrency limiter type (#2091) Adds the standalone limiter type defined by the design RFC at docs/design/aimd-concurrency-limiter.md. The implementation lives in crates/engine/src/concurrent_delta/work_queue/limiter.rs and exposes: - LimiterConfig builder with min_limit / max_limit / alpha / beta_num / beta_den / build(). - AimdLimiter with try_acquire, target, in_flight, rtt_ema_nanos, and a pub is_rtt_spike predicate. - RAII Ticket guard (#[must_use]) with record_success / record_overload / record_error and Drop fallback for panic paths. - OverloadReason variants for RttSpike / QueueSaturated / DiskCommitPressure / ErrorRate. Internals follow the RFC: integer-only RTT EMA (alpha_ema = 1/8 per RFC 6298), variance smoothed with beta = 1/4, RTT-spike threshold of ema + 2*sqrt(var) via Newton-method isqrt, slow-start doubling until the first decrease, debounce window of 2*rtt_ema after each multiplicative decrease, and AcqRel/Acquire atomic ordering on every target/in_flight transition. Twelve unit tests cover the algorithm: target saturation (single threaded and under thread contention), additive increase, multiplicative decrease, min/max clamps, debounce suppression, RTT EMA convergence, ticket Drop on panic, transient-vs-deterministic error classification, slow-start doubling, RTT-spike predicate, builder clamps, and the isqrt helper. Not yet integrated. Callers (WorkQueueSender, disk-commit, CLI) are wired in the follow-on tickets: - #2092: convergence tests under injected error. - #2093: --adaptive-concurrency / --no-adaptive-concurrency CLI flag. * style: cargo fmt --all * fix(engine): clippy lints on AIMD limiter (abs_diff, div_ceil, format args)
Summary
Testing
Codex Task