Repository navigation
One upward relaunch per engine when the first steady plan proves a larger pool (S2 debt) - #5741
Merged
Merged
Conversation
…rger pool (S2 debt) The engine launches once on a shared pool and keeps that pool for its life, so the launch has to read memory at the worst moment: right as a core boots. On the M5 on 2026-11-03 every launch read a transient and was rolled back: the cold boot plan gave 5 x 2,048 (b4be7bc), the host's physical total gave 5 x 262,144 at 91% memory pressure (590df4b), the live budget sampled while the old core's memory came back gave 16,640 (81aef18). A launch cannot be right by construction. So the plan's rule for every downward adaptation applies, "control both ways": the launched pool gets ONE scheduled upward test. - serving daemon, pool_growth: on the ready tick, beside the shared-pool move, a STEADY plan (serving's footprint reported, so the budget was sampled with this engine up and credited back once) re-sizes the pool by the same launch_pool the launch used. When that is strictly larger than the pool the engine reports, the daemon asks for one relaunch for that engine process and falls through to the ensure. Once per process; equal or smaller never relaunches. Pure grows() carries the rule, with the 81aef18 case, the boot ticks, no budget, equal and downward. - engine, pool_growth + reconcile: a fifth relaunch operand, grow_ok, false only while the request names the running process and the target's pool exceeds the one it reports. The request is spent when decided, so a failed relaunch never loops (an_engine_grows_once_upward_and_only_when_asked). - serving_footprint_reported(): planning's at_rest test and the growth's "steady" read one owner. S2 DEBT: this bends the one-launch rule and goes when the engine resizes its pool live (card e9724a7d). The deploy's geometry rollback (pool, memory pressure, residents hosted) guards the relaunch on the M5. continuum card e36e6533 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Contributor
Author
|
PASS at 3886047 (Fable), pending CI green. Verified, and how:
Non-blocking: the occupancy hold covers bound jobs, not an ordinary persona turn in flight, so the one growth relaunch can cut a turn. It happens once, minutes after a boot, and canary's re-home had the same exposure, so it doesn't block. Folding in a gate on no turn in flight (the same The M5 deploy after merge uses the guard that caught all three launches: an automatic rollback on a pool < 65,536, memory pressure high, or no resident hosted in 4 minutes. |
joelteply
added a commit
that referenced
this pull request
Nov 3, 2026
…ver cuts a generation Fable on #5741 (card 5c9042f1): the engine's occupancy hold covers bound jobs, not an ordinary persona turn, so the growth relaunch could cut one. What a relaunch loses is exactly the generation the engine is decoding; a turn between generations (a tool call) just waits for the engine. A turn's durability is not the measure here: the core stays up, so nothing would hand a cut generation back (turn_ingress::awaited() is the STOP's measure). - The health tick's existing /slots read (one per health tick, its own task) records (engine pid, no slot processing) on the daemon. - pool_growth_due marks the growth tried and asks for it only on a read of THIS engine with no slot processing; otherwise it returns false and the next tick rechecks. - Pure no_slot_processing(&slots): every slot's is_processing is false; a slot without the field, or a body that is not a slots array, is unknown, and unknown is never idle. continuum card 5c9042f1 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
added a commit
that referenced
this pull request
Nov 3, 2026
…ver cuts a generation (#5742) Fable on #5741 (card 5c9042f1): the engine's occupancy hold covers bound jobs, not an ordinary persona turn, so the growth relaunch could cut one. What a relaunch loses is exactly the generation the engine is decoding; a turn between generations (a tool call) just waits for the engine. A turn's durability is not the measure here: the core stays up, so nothing would hand a cut generation back (turn_ingress::awaited() is the STOP's measure). - The health tick's existing /slots read (one per health tick, its own task) records (engine pid, no slot processing) on the daemon. - pool_growth_due marks the growth tried and asks for it only on a read of THIS engine with no slot processing; otherwise it returns false and the next tick rechecks. - Pure no_slot_processing(&slots): every slot's is_processing is false; a slot without the field, or a body that is not a slots array, is unknown, and unknown is never idle. continuum card 5c9042f1 Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
The engine launches once on a shared pool and keeps that pool for its life, so the launch has to
read memory at the worst moment: right as a core boots. On the M5 on 2026-11-03 every launch read
a transient and was rolled back: the cold boot plan gave 5 x 2,048 (b4be7bc), the host's physical
total gave 5 x 262,144 at 91% memory pressure (590df4b), the live budget sampled while the old
core's memory came back gave 16,640 (81aef18). A launch cannot be right by construction. So the
plan's rule for every downward adaptation applies, "control both ways": the launched pool gets
ONE scheduled upward test.
(serving's footprint reported, so the budget was sampled with this engine up and credited back
once) re-sizes the pool by the same launch_pool the launch used. When that is strictly larger
than the pool the engine reports, the daemon asks for one relaunch for that engine process and
falls through to the ensure. Once per process; equal or smaller never relaunches. Pure grows()
carries the rule, with the 81aef18 case, the boot ticks, no budget, equal and downward.
names the running process and the target's pool exceeds the one it reports. The request is
spent when decided, so a failed relaunch never loops (an_engine_grows_once_upward_and_only_when_asked).
S2 DEBT: this bends the one-launch rule and goes when the engine resizes its pool live (card
e9724a7d). The deploy's geometry rollback (pool, memory pressure, residents hosted) guards the
relaunch on the M5.
continuum card e36e6533
Validation
cargo run -p source-hygiene --bin ratchets -- origin/canary: exit 0, 85/85 on base and head.lib tests continuum-engine(an_engine_grows_once_upward_and_only_when_asked) andlib tests continuum-serving(only_a_steady_plan_grows_the_pool_and_only_upward).Measured after deploy (owner Cormac, with Fable's M5 deploy; card stays open until posted)
serving.pool.grow_duethenserving.pool.growonce on the M5 after its first steady plan, the relaunched pool from/propscontext_geometry, memory pressure, and residents hosted within the rollback window.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE