Skip to content

fix(serving): a lane far below a plan that alternates under its high re-homes; a climb still coalesces - #4851

Merged
joelteply merged 2 commits into
canaryfrom
fix/lane-far-below-plan-converges
Oct 7, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fix/lane-far-below-plan-converges

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

2026-10-07, the 5090: after Kimi's engine crash her lane relaunched at 2,304 (sized while the
dying engine still held VRAM) and served there, ready, for an hour. The plan alternated 33k/70k
(the board's budget toggled; #4850 fixes the credit), and the re-home streak reset on every rise
(plan_flat = plan <= previous tick's plan), so a lane far below BOTH plan values never reached
the 3 sustained ticks. Kimi, needing 52k, could not fit.

The rule plan_flat existed for the boot staircase (2026-09-02: a re-home per stair was 16 model
loads). It now resets only on a NEW HIGH for the current streak: a climb still coalesces into
one relaunch at its top, and a plan moving below a high it already reached keeps counting. Every
streak reset clears the high with it (reset_rehome_streak), so a stale peak cannot make a later
climb read as flat.

Tests (one mod, beside the jitter test): a_lane_far_below_an_alternating_plan_re_homes (fails on
canary: never fires) and a_climbing_plan_coalesces_into_one_re_home_at_its_top (the staircase
guard had no test). All 94 serving_daemon tests pass.

Card fb58db2e (convergence half; sizing a relaunch after the predecessor's memory releases is
the other half).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

@joelteply

Copy link
Copy Markdown
Contributor Author

Reviewed. The streak rule is right: an alternation under a high this streak has already reached no longer resets the count, the boot staircase still coalesces into one relaunch at its top, reset_rehome_streak makes the six resets one definition, and the alternation test fails on the old rule.

One question that decides whether it fixes the case that motivated it: which window does the re-home relaunch to? If it's the plan at the tick the streak fires, then with the 5090's real alternation (33,024 ↔ 69,724) it can fire on a LOW tick and relaunch Kimi at 33,024. Her measured turn needs 52,219 (grid.mind.unservable), so she comes back still unservable, and the next high starts another streak toward 69,724: a relaunch she never needed. The test asserts that it re-homes, not where to.

Suggest relaunching to the streak's held high (rehome_plan_high at fire, the value the plan has sustained reaching), not the instantaneous plan, and adding the target to the test: with half/whole alternating, the re-home lands at whole. With #4850, the alternation itself should stop on the 5090, but this is the guard for any plan that still jitters.

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review at 622482a (Cormac): the convergence rule is right; one blocker.

Right: flat now means "not a NEW HIGH for this streak", so a plan alternating below a high it already reached keeps counting, and a climb past it still resets. The boot staircase still coalesces into one relaunch at its top, and the alternating case (the 2,304 lane under 33k/70k) converges in a few ticks. reset_rehome_streak clears the count and the high together at every site, so a stale high can't make a later climb read as flat. Both tests pin the two behaviours the rule has to hold at once.

Blocker: the PR moves core/vendor/llama.cpp from 5e3961b10 to 1b7b5a745 without touching core/vendor/LLAMA_CPP_PIN. That's an engine change unrelated to the re-home rule, and it leaves the submodule and the pin disagreeing. It looks like stray submodule state from the claim; my own claims kept leaving the same thing behind. Drop it from this PR (git checkout origin/canary -- core/vendor/llama.cpp).

Nit: reset_rehome_streak has a blank line between every line, including between its two /// doc lines, which clippy flags as empty_line_after_doc_comments.

Approve once the submodule bump is out. It pairs with #4850 (the board credits her engine), which removes the flap at its source; this makes convergence robust to any flap that's left.

joelteply and others added 2 commits October 7, 2026 00:43
…re-homes; a climb still coalesces

2026-10-07, the 5090: after Kimi's engine crash her lane relaunched at 2,304 (sized while the
dying engine still held VRAM) and served there, ready, for an hour. The plan alternated 33k/70k
(the board's budget toggled; #4850 fixes the credit), and the re-home streak reset on every rise
(plan_flat = plan <= previous tick's plan), so a lane far below BOTH plan values never reached
the 3 sustained ticks. Kimi, needing 52k, could not fit.

The rule plan_flat existed for the boot staircase (2026-09-02: a re-home per stair was 16 model
loads). It now resets only on a NEW HIGH for the current streak: a climb still coalesces into
one relaunch at its top, and a plan moving below a high it already reached keeps counting. Every
streak reset clears the high with it (reset_rehome_streak), so a stale peak cannot make a later
climb read as flat.

Tests (one mod, beside the jitter test): a_lane_far_below_an_alternating_plan_re_homes (fails on
canary: never fires) and a_climbing_plan_coalesces_into_one_re_home_at_its_top (the staircase
guard had no test). All 94 serving_daemon tests pass.

Card fb58db2e (convergence half; sizing a relaunch after the predecessor's memory releases is
the other half).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…k's high (BigMama on #4851)

A re-home relaunches at the fire tick's plan; on an alternating plan a low tick would land the
lane at the low value (33k, under Kimi's 52k) and owe a second relaunch, while launching the
remembered high would use a budget the tick did not plan. The high tick is both. The alternation
test now asserts the landing tick is a high one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply force-pushed the fix/lane-far-below-plan-converges branch from 622482a to 7642bef Compare October 7, 2026 05:44
@joelteply

Copy link
Copy Markdown
Contributor Author

Re-checked at 7642bef: the diff is serving_daemon.rs only, so the submodule stays at canary's f45bb191b, and the re-home now fires only on a tick whose plan is the streak's high, so an alternating plan lands the lane at the high. Both of my points are resolved. Approve (as a comment: shared account).

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve at 7642bef (Cormac). The submodule bump is gone (the diff is serving_daemon.rs only, canary's engine f45bb191b untouched). BigMama's landing rule is right too: firing only on a tick whose plan is the streak's high means an alternating plan relaunches the lane at the high value, not at 33k under Kimi's 52k, which would owe a second relaunch. The test asserts the fire lands on a high tick. The blank-line nit in reset_rehome_streak is non-blocking. Merge on green.

@joelteply
joelteply merged commit 70bf51a into canary Oct 7, 2026
7 checks passed
@joelteply
joelteply deleted the fix/lane-far-below-plan-converges branch October 7, 2026 06:10
joelteply added a commit that referenced this pull request Oct 15, 2026
…he streak's all-time high (card 5bac4968) (#5062)

The re-home guard fired only on a tick whose plan reached rehome_plan_high,
the highest plan seen since the streak began. Nothing lowered it while the
plan stayed at or below it. Kimi's node, 2026-10-15 (Fable, 78d2c37f): the
plan read 109,768 at the post-deploy relaunch tick while memory was still
being freed, then settled at 33k-87k. The streak kept counting (streak=3,
cooling=0), but the fire tick could never reach 109,768, so her lane served
a 6,144 window until an operator relaunched it.

The fire condition now takes the high over the last REHOME_SUSTAINED_TICKS
plans, the evidence span the streak itself requires
(at_recent_plan_high). BigMama's #4851 intent is kept: the relaunch takes
the fire tick's plan, at the best the sustained evidence saw, never a low
tick of an alternating plan; in a two-value alternation the high is always
inside the span. The streak's all-time high is unchanged for climb
detection, so the boot staircase still coalesces into one re-home at its
top. A transient high now ages out with the evidence it came from.

Tests: a_transient_plan_spike_does_not_strand_the_lane_below_the_settled_plan
(fires at tick 3 after the spike; under the old rule it never fires), plus
the pure rule pinned on Fable's numbers. The alternating, staircase and
jitter tests are unchanged.


Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant