test(e2e): pin live weight-edit re-takes effect on dispatch (#196 L1) - #522
Conversation
The sibling weighted-routing-distribution-e2e pins that INITIAL weights are honored. This closes the L1 gap: a live edit to a weighted model's weights must propagate through the etcd watch and the weighted scheduler must REBUILD — a scheduler that cached its weight wheel on first dispatch and ignored config updates would silently keep serving the old split. Deterministic (weight 0 = excluded, per routing-strategies-e2e): start [wr-edit-a:100, wr-edit-b:0] → assert all dispatches hit A; PUT /admin/v1/models/:id inverting to [0,100]; the propagation signal is a virtual probe returning "served by B" (impossible under the old config); then assert all dispatches hit B. If the scheduler never rebuilds on a config edit, the post-edit propagation wait times out — surfacing the regression rather than passing silently. Refs #196 L1, ai-gateway #127 L1.
|
Warning Review limit reached
More reviews will be available in 8 minutes and 3 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
Note 🎁 Summarized by CodeRabbit FreeYour organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above. Comment |
Independent audit (CLAUDE.md §8) — CLEARA cold third-party agent reviewed against the actual DP scheduler source. No HIGH/MEDIUM.
Two LOWs (readiness gate + error-swallowing) are established harness idioms, no change. Verdict: safe to merge. |
What
Closes the L1 gap (config edit → observable behavior change). The sibling
weighted-routing-distribution-e2epins that a weighted model's initial weights are honored. This pins that a live edit to those weights propagates and the weighted scheduler rebuilds — a scheduler that cached its weight-wheel on first dispatch and ignored config updates would silently keep serving the old split.How (deterministic, no statistics)
weight 0 = excluded (per
routing-strategies-e2e"weighted picks the positive-weight target"):wr-edit-virtualweighted[wr-edit-a: 100, wr-edit-b: 0]→ assert allBATCHdispatches hit A.PUT /admin/v1/models/:idinverting to[0, 100]."served by B"— impossible under the old[100,0]config, so it proves the edit is live and the scheduler rebuilt before counting.BATCHdispatches now hit B.If the scheduler never rebuilds on a config edit (the regression this targets), step 3's
waitConfigPropagationtimes out — surfacing it loudly rather than passing silently.Note on a possible real finding
If CI shows step 3 timing out, that's a real DP bug (weighted scheduler doesn't rebuild on weight edit) — I'll file it + hold this test, not weaken the assertion. Expected: the DP rebuilds on the etcd-watch snapshot swap (the same path every config-change test relies on), so it should pass.
Verification
tsc --noEmitclean for this file (borrowednode_modules; fresh worktree). Authoritative run is CI's isolatede2ejob (etcd + built DP + in-process mock upstreams — no shared-stack contention).Refs #196 L1, #127 L1.