Commit c0a8e39
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>
1 parent 6fbcada commit c0a8e39
11 files changed
Lines changed: 1190 additions & 29 deletions
File tree
- artifacts
- crates
- spar-analysis
- src
- tests
- spar-cli/src
- spar-network
- src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1700 | 1700 | | |
1701 | 1701 | | |
1702 | 1702 | | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
1703 | 1726 | | |
1704 | 1727 | | |
1705 | 1728 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2247 | 2247 | | |
2248 | 2248 | | |
2249 | 2249 | | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
2250 | 2281 | | |
2251 | 2282 | | |
2252 | 2283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
199 | 269 | | |
200 | 270 | | |
201 | 271 | | |
| |||
0 commit comments