Skip to content

The boot launches at what its minds need: remembered residents, a settle gate, one retirement for a floor-sized engine (card 8569b03d) - #5976

Merged
joelteply merged 1 commit into
canaryfrom
fable/the-boot-launches-at-what-the-minds-need
Nov 13, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fable/the-boot-launches-at-what-the-minds-need

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Serves the persistent minds sharing one engine: after a boot, each mind gets the context its own turns need, instead of staying dark at a floor pool. Advances order-of-work line 3/3b (KV capacity, one live engine). Card 8569b03d. Stacked follow-up: the post-fit readers and the sent_* deletion.

Evidence (the M5, 2026-11-13)

  • 19:36Z: the boot plan read usable 16 GB while the stopped engine's memory was still being returned. It launched the engine at -c 2045 (2,048-token pool). 15 s later the plan recomputed 2 x 134,690, but nothing applied it, and every mind stayed dark until the engine was killed by hand.
  • 22:16Z: after another deploy, the engine booted at a 49,408-token pool for 5 slots and did not grow in 10 minutes. Killed by hand, it relaunched at 210,176.

The chain

  1. At boot the persona registry does not exist yet, so serving_demand built requirements_for(&live) from an empty live list (demand.rs). The boot plan skipped the allocator, and seated_for summed no needs.
  2. With a need of 0, launch_pool's floor held = need.min(proven or fit) is 0, so even a pool this model was proven to run at is ignored. The launch took the transient fit, which at 16 GB was below the weights: the plan's MIN_SERVE_CTX x 1.
  3. ONE LAUNCH never relaunches a ready engine for its pool, and the fork has no live pool resize route (checked the routes in tools/server/server.cpp at pin cd2e16d87). So a pool launched from a transient reading stays that size for the engine's life.

The fix

  • Remembered residents (WorkingSetRegistry::remembered_residents): before the registry exists, the seated minds are the newest minds a held turn measured, capped at the population count. Their full-detail requirements (A mind's grant follows what her view holds at full detail, never a render her last grant collapsed (card 90197043) #5973) feed the boot plan's allocator and the launch floor. A mind that only ever wished (a fixture, a departed mind) is not counted.
  • Settle gate (serving_daemon/settle.rs): a launch with no engine on its port, sized below the seated minds' needs, waits while the host's OS compressor is shrinking between two readings (continuum_host::host_memory, Memory pressure sheds against the host's deficit (compressor + swap), not RAM past a fraction #5971), read before every reconcile and off the async runtime. There is no timer and no fraction, and the host bounds the wait itself. A host that gives no reading never waits.
  • Floor-sized engine (serving_daemon/floor_sized.rs): a ready engine whose pool holds fewer seated minds' needs than a launch at the live budget would hold is retired once (once per engine process) through the existing idle_if_current. The next reconcile launches the grown pool through the settle gate. The rule counts minds, never slack tokens, so it fires at most once per mind outgrowing the pool. Live work blocks it, because the occupancy guard runs first.

Simulation and tests

  • dyno 9, boot during memory settle (serving_daemon/tests/dyno.rs): before reproduces the 2,048 launch with no residents in the demand. After: the gate waits while the compressor shrinks; a gap reading launches at the proven pool, which holds every remembered need; the settled plan's launch holds every need; and an engine already at the floor is retired once for the grown plan.
  • dyno 10, leased-in mind: known-red (#[ignore], MissingSeam::LeasedInRequirement). The generate wire carries no requirement, and that seam is grid (Codex).
  • floor_sized pinned test: boot at the floor, then the grown plan is applied once; no relaunch for slack or a wobble.
  • settle test: waits only while memory comes back; a growing compressor or no reading never waits.
  • working-set test: a boot remembers its newest held residents and nobody else.

Lines

453 added, 14 removed (12 files). The deletion of sent_median / window_target / typical_prompt_floor / prompt_floor_of and the sent rings is the stacked PR.

Not compiled locally

The M5 is serving live minds, so CI is the compiler.

Live receipt (after deploy, owner Fable)

Engine pool at boot vs the remembered residents' requirements (serving.launch.plan, serving.launch.await_settle, the engine's -c), and time from boot to a grown plan applied (serving.engine.floor_sized to the next ready). Card 8569b03d stays open until it is posted.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

… boot plan, a settle gate, and one retirement for a floor-sized engine (card 8569b03d)

The M5, 2026-11-13: at 19:36Z the boot plan read 16 GB usable while the stopped engine's memory was
still coming back, launched -c 2045, and the plan 15 s later (2 x 134,690 at 25 GB) was never
applied; at 22:16Z an engine launched at 49,408 for 5 sequences and did not grow in 10 minutes.
Every mind needed 68-110k and was dark until the engine was killed by hand.

- cognition: WorkingSetRegistry::remembered_residents, the newest minds a held turn measured.
- serving demand: before the persona registry exists, the requirements are the remembered
  residents', so the boot plan goes through the allocator and the launch floor (seated needs,
  capped at the proven pool on a gap reading) holds them.
- settle: the host's compressor shrinking between readings (continuum_host::host_memory, #5971)
  holds a launch below the seated needs until the host stops returning memory; read before every
  reconcile, off the runtime. No reading never waits.
- floor_sized: a ready engine whose pool holds fewer seated minds' needs than a launch at the live
  budget would is retired once (per engine process); the next reconcile launches the grown pool.
  The fork has no live pool resize route (checked cd2e16d87 tools/server/server.cpp routes).
- dyno 9 (boot during memory settle) before/after; dyno 10 (leased-in mind) known-red on the grid
  seam (MissingSeam::LeasedInRequirement).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 606480b into canary Nov 13, 2026
32 checks passed
@joelteply
joelteply deleted the fable/the-boot-launches-at-what-the-minds-need branch November 13, 2026 23:09
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