From af966f23718c78e63f2cad16b5415734186e007b Mon Sep 17 00:00:00 2001 From: Claude Code Agent Date: Wed, 13 May 2026 12:17:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(cli):=20plumb=20--enable-d-to-p-sync=20thro?= =?UTF-8?q?ugh=20benchmark-live=20=E2=86=92=20ReplayConfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit E4-v3 forensic: structural d-to-p-sync.jsonl is empty despite the sweep passing --enable-d-to-p-sync. Root cause: BenchmarkLiveConfig (benchmark.py) had no enable_d_to_p_sync field, and the benchmark-live cli builder (line ~821) never threaded args.enable_d_to_p_sync into the ReplayConfig that gets built inside replay_trace. So config.enable_d_to_p_sync was always False even though the CLI flag was set, and _attempt_d_to_p_sync was gated off → 0 calls → 0 RPCs → 0 structural log entries. The replay subcommand (cli.py:672) already plumbed it correctly; benchmark-live just got missed. Adding the field + the wire-up. This means E4-v3's headline numbers (KVC v2 + load-floor + RDMA beat naive PD on mean/p50/p90, lose by ~8% on p99) reflect *only* KVC's session-affinity gains, not D→P. A v4 with this fix should exercise D→P on reseed-after-eviction events and we'll see whether the p99 long tail also shrinks. --- src/agentic_pd_hybrid/benchmark.py | 2 ++ src/agentic_pd_hybrid/cli.py | 1 + 2 files changed, 3 insertions(+) diff --git a/src/agentic_pd_hybrid/benchmark.py b/src/agentic_pd_hybrid/benchmark.py index 0811331..c362998 100644 --- a/src/agentic_pd_hybrid/benchmark.py +++ b/src/agentic_pd_hybrid/benchmark.py @@ -49,6 +49,7 @@ class BenchmarkConfig: backpressure_max_pause_s: float = 2.0 kvcache_migration_reject_threshold: int = 3 kvcache_load_floor_bonus: int = 0 + enable_d_to_p_sync: bool = False sample_profile: str = "default" min_initial_input_tokens: int | None = None max_initial_input_tokens: int | None = None @@ -199,6 +200,7 @@ def run_live_benchmark(config: BenchmarkConfig) -> BenchmarkArtifacts: pool_poll_interval_s=config.pool_poll_interval_s, pool_poll_include_sessions=config.pool_poll_include_sessions, enable_backpressure=config.enable_backpressure, + enable_d_to_p_sync=config.enable_d_to_p_sync, backpressure_max_pause_s=config.backpressure_max_pause_s, kvcache_migration_reject_threshold=config.kvcache_migration_reject_threshold, kvcache_load_floor_bonus=config.kvcache_load_floor_bonus, diff --git a/src/agentic_pd_hybrid/cli.py b/src/agentic_pd_hybrid/cli.py index 4788266..712fb26 100644 --- a/src/agentic_pd_hybrid/cli.py +++ b/src/agentic_pd_hybrid/cli.py @@ -819,6 +819,7 @@ def main() -> None: backpressure_max_pause_s=args.backpressure_max_pause_s, kvcache_migration_reject_threshold=args.kvcache_migration_reject_threshold, kvcache_load_floor_bonus=args.kvcache_load_floor_bonus, + enable_d_to_p_sync=args.enable_d_to_p_sync, sample_profile=args.sample_profile, min_initial_input_tokens=args.min_initial_input_tokens, max_initial_input_tokens=args.max_initial_input_tokens,