feat(nc): PMOO/LUDB bound via good_lp for tree-shaped multiplexing (v0.9.3 NC #2)#203
Open
feat(nc): PMOO/LUDB bound via good_lp for tree-shaped multiplexing (v0.9.3 NC #2)#203
Conversation
…0.9.3 NC tightness #2) Closes the external reviewer's NC top-5 #2 (credibility gap with RTaW-Pegase): adds an opt-in Pay-Multiplexing-Only-Once / Bisti-LUDB ("Linear Upper Delay Bound") path in `spar-network::pmoo` that the WCTT pass invokes when the topology is tree-shaped (one tagged flow, ≥ 2 competing flows on contiguous sub-paths of the tagged tandem, all hops FIFO/Priority). The LP is set up via `good_lp` with the HiGHS backend already vendored for the deployment solver. On the canonical zonal/automotive multiplexing pattern (one switch, many sources to one sink) the bound is 23-27% tighter than today's per-hop SFA chain on the in-tree fixtures, with 30-60% reported in the literature for larger fan-ins. On LP infeasibility (`Σ ρ ≥ R_h` at any hop) the WCTT pass silently falls back to the existing SFA chain — bound never worsens. Numerical comparison from the in-tree fixtures: 3-hop / 3-competing: PMOO = 98_571_429 ps SFA = 135_843_430 ps tightening = 27.4% Zonal 5-source: PMOO = 159_000_000 ps SFA = 208_488_000 ps tightening = 23.7% API surface in `spar-network::pmoo`: - `TaggedFlow { alpha, path }`, `CompetingFlow { alpha, path }` - `PmooBound { delay_ps, model_size, solve_time_us }` - `LpError::{Infeasible, OutOfRange, EmptyPath, NonContiguous, SolverFailed}` - `ludb_bound(tagged, competing, services) -> Result<PmooBound, LpError>` Wiring: - `WcttAnalysis` becomes a configurable struct with `pmoo: bool` (default `false` → byte-identical to v0.9.2). `WcttAnalysis::with_pmoo()` enables the opt-in path. - New `pmoo_or_sfa(stream, all_streams, switch_type, service_for_bus)` helper in wctt.rs validates eligibility (all-FIFO chain, ≥ 2 competitors, contiguous sub-paths) and dispatches to `ludb_bound`. - New `WcttPmooBound` Info diagnostic reports method=ludb, PMOO delay, SFA delay for comparison, tightening %, and LP solve time. - New `--pmoo` CLI flag on `spar analyze` opts in. `AnalysisRunner:: register_all_except_wctt()` lets the CLI swap in the PMOO-configured `WcttAnalysis` without duplicating the SFA pass. Tests: - 10 new unit tests in `spar-network/src/pmoo.rs`: single-hop / no-competing baseline (PMOO ≡ SFA), 2-hop tandem 1 competing flow (PMOO ≤ SFA), 3-hop / 3-competing (PMOO ≪ SFA, ≥ 5% tightening asserted), LP infeasibility, validation errors, model-size and solve-time reporting, single-flow tandem reduces to pay-burst-once, canonical zonal 5-source reference comparison. - 2 new round-trip tests in `spar-analysis/src/wctt.rs`: `pmoo_flag_off_emits_no_pmoo_diagnostic` (default v0.9.2 byte- identical), `pmoo_flag_on_emits_pmoo_diagnostic_for_eligible_streams` (≥ 1 `WcttPmooBound` with method=ludb). Quality gates: - cargo build --workspace: clean - cargo test --workspace: 851 spar-analysis tests pass (was 849; +2 round-trip), 87 spar-network tests pass (was 77; +10 PMOO), no regressions - cargo clippy --workspace --all-targets -- -D warnings: clean - cargo fmt --all -- --check: clean - rivet validate: PASS Artifacts: - REQ-NETWORK-014 in artifacts/requirements.yaml - TEST-NC-PMOO in artifacts/verification.yaml (links: satisfies REQ-NETWORK-014) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the external reviewer's NC top-5 #2 — the credibility gap with RTaW-Pegase.
spar-network::pmoowithludb_bound(tagged, competing, services)— PMOO / Bisti-LUDB ("Linear Upper Delay Bound") path on top of the existing closed-form NC primitives. Set up as an LP viagood_lpwith the HiGHS backend already vendored for the deployment solver.pmoo_or_sfadispatch intoWcttAnalysisfor tree-shaped flows (one tagged + ≥ 2 competing flows on contiguous sub-paths of the tagged tandem, all hops FIFO/Priority). On LP infeasibility (Σ ρ ≥ R_h) we silently fall back to the v0.9.2 SFA chain — bound never worsens.--pmooCLI flag onspar analyze(default off → byte-identical to v0.9.2).WcttPmooBoundInfo diagnostic reports method (=ludb), PMOO delay, SFA delay for comparison, tightening %, and LP solve time.Numerical comparison (in-tree fixtures)
Larger fan-ins reach the 30-60 % tightening reported in Bondorf et al. and the Bisti-LUDB papers; the in-tree fixtures are deliberately small for unit-test runtime.
Tests
spar-network/src/pmoo.rs— baseline (single-hop, no competing → PMOO ≡ SFA), 2-hop / 1 competing (PMOO ≤ SFA), 3-hop / 3 competing (PMOO ≪ SFA, ≥ 5 % tightening asserted), LP infeasibility (Err(LpError::Infeasible)for SFA fallback), validation errors (empty path, out-of-range, non-contiguous), model-size and solve-time reporting, single-flow tandem (pay-burst-once), zonal 5-source reference.spar-analysis/src/wctt.rs—pmoo_flag_off_emits_no_pmoo_diagnostic(default = byte-identical to v0.9.2) andpmoo_flag_on_emits_pmoo_diagnostic_for_eligible_streams(≥ 1WcttPmooBoundwithmethod=ludb).Test plan
cargo build --workspacecleancargo test -p spar-networkclean — 87 tests (was 77; +10 PMOO)cargo test -p spar-analysisclean — 851 tests (was 849; +2 round-trip)cargo test --workspaceclean — no regressionscargo clippy --workspace --all-targets -- -D warningscleancargo fmt --all -- --checkcleanrivet validatePASSArtifacts
REQ-NETWORK-014inartifacts/requirements.yamlTEST-NC-PMOOinartifacts/verification.yaml(links:satisfiesREQ-NETWORK-014)Out of scope (per task brief)
pmoo.rs, no edits tocurves.rs.🤖 Generated with Claude Code