Repository navigation
docs: power_of_two can compare candidates by in-flight requests: the --power-of-two-load-metric setting - #158
Validated documentation
Reviewed SMG source: a29c64d4323dbf21950e2822cb099af04f6fd901.
Every claim verified against the SMG checkout at a29c64d4: --power-of-two-load-metric exists with default expected_wait and values expected_wait/requests/least_requests on both the Rust CLI (main.rs:503, parser :212-215) and Python launcher (router_args.py:661-666), and applies to PD leg policies via the shared parse_policy (main.rs:2377-2394). Semantics match power_of_two.rs:51-84: single available worker short-circuits in every mode; requests compares the sampled pair's router in-flight counts (fewest_in_flight reads worker.load(), no load report) with the expected wait breaking ties; least_requests samples no pair and scans every available worker (documented O(n) footnote); ties break uniformly at random in the shared scorer (least_load.rs:560-605). Retained claims hold: the no-report pair fallback to in-flight counts (least_load.rs:323-329) and default least_load tuning (factory.rs:22-26 builds LeastLoadPolicy::new()). The "newer than v1.12.0" note is backed by readable evidence: v1.12.0 is the newest tag in the source clone's packed-refs, the gateway crate on main is 1.12.0, and the feature commit is dated 2026-10-12, matching the repo's established release-framing convention. All edits serve the one concern (the same commit's --dp-aware validation change is correctly deferred to its own concern); ~45 changed lines. Placement is sound: both canonical pages corrected, no new page, new behavior in its own subsection/paragraph, release note standalone and stated once with the getting-started page linking to the canonical explanation, page summaries (overview card, complexity footnote, Load Signals bullet, advantages bullet) qualified, no code-change references, anchors resolve. Related pages retain no contradiction with this concern: reference/configuration.md:89 and concepts/architecture/overview.md:248 are one-line default-behavior summary rows matching those tables' idiom (their least_load rows likewise omit modifier flags), and the configuration reference's flag row belongs to tonight's separate deploy-config item, so completing this concern needs no page outside the allowlist. No feedback threads exist (retry after infrastructure failure), so none are reported addressed. Limitation: tag ancestry of commit 3f12f121 relative to v1.12.0 could not be walked without git tooling; the boundary rests on the tag list, the commit date, and repo precedent.