Skip to content

Collapse workspace to a single oc-rsync entrypoint#2091

Merged
oferchen merged 1 commit into
masterfrom
centralize-branding-management-for-oc-rsync
Nov 8, 2025
Merged

Collapse workspace to a single oc-rsync entrypoint#2091
oferchen merged 1 commit into
masterfrom
centralize-branding-management-for-oc-rsync

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 8, 2025

Summary

  • remove the legacy wrapper binaries and metadata so the workspace only builds oc-rsync
  • update branding helpers, detection, and docs to reflect the single entrypoint while still accepting oc-rsyncd aliases
  • refresh tooling and packaging scripts to match the new branding and configuration defaults

Testing

  • cargo test --workspace --all-features

Codex Task

@oferchen oferchen merged commit a8d49df into master Nov 8, 2025
@oferchen oferchen deleted the centralize-branding-management-for-oc-rsync branch November 8, 2025 22:10
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

use std::{
env, fs,
path::{Path, PathBuf},
process::Command,
};
use toml::Table;
fn main() {
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR"));
println!("cargo:rerun-if-env-changed=CARGO_WORKSPACE_DIR");
println!("cargo:rerun-if-env-changed=CARGO_MANIFEST_DIR");
println!("cargo:rerun-if-env-changed=OC_RSYNC_BUILD_OVERRIDE");
if let Some(git_dir) = git_directory(&manifest_dir) {
emit_rerun_if_exists(&git_dir.join("HEAD"));
emit_rerun_if_exists(&git_dir.join("refs/heads"));
emit_rerun_if_exists(&git_dir.join("refs/remotes"));
emit_rerun_if_exists(&git_dir.join("packed-refs"));
}
let workspace_root = workspace_root(&manifest_dir).unwrap_or_else(|| manifest_dir.clone());
println!(
"cargo:rustc-env=RSYNC_WORKSPACE_ROOT={}",
workspace_root.display()
);
emit_rerun_if_exists(&workspace_root.join("Cargo.toml"));
let metadata = load_workspace_metadata(&workspace_root);
metadata.emit_cargo_env();
let build_id = env::var("OC_RSYNC_BUILD_OVERRIDE")
.ok()
.map(|value| value.trim().to_owned())
.filter(|value| !value.is_empty())
.or_else(|| git_revision(&manifest_dir))
.unwrap_or_else(|| "unknown".to_owned());

P0 Badge Restore build script that exports workspace metadata env vars

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".

oferchen added a commit that referenced this pull request May 7, 2026
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.
oferchen added a commit that referenced this pull request May 7, 2026
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.
oferchen added a commit that referenced this pull request May 7, 2026
* 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)
oferchen added a commit that referenced this pull request May 18, 2026
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.
oferchen added a commit that referenced this pull request May 18, 2026
* 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)
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