fix(cli): plumb --enable-d-to-p-sync through benchmark-live → ReplayConfig

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.
This commit is contained in:
Claude Code Agent
2026-05-13 12:17:28 +08:00
parent f6d6dc01ea
commit af966f2371
2 changed files with 3 additions and 0 deletions

View File

@@ -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,

View File

@@ -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,