Skip to content

Learning retires a dead engine's state so custody releases its leases: a relaunch no longer starves learning - #6119

Merged
joelteply merged 3 commits into
canaryfrom
fable/learning-retires-dead-engines
Nov 17, 2026
Merged

joelteply merged 3 commits into
canaryfrom
fable/learning-retires-dead-engines

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Serves the minds' learning (path step 3, Learning; plan goal 8): since the 22:09:39Z engine relaunch on the M5, no mind has learned.

Defect (measured on the M5, build d6822e0)

  • 22:09:33 training.in_place.answer_lost (Aris 8044b75b): /learn unreachable. Engine pid 31242 started 22:09:39Z (ps lstart); the plan relaunched it (serving.plan lanes 1 -> 2, settle.tick.condemned x4).
  • resources/board at 22:33Z: lease learning:8044b75b...:speech-discipline:workspace 4,875,870,304 B VRAM + 1,125,902,784 B RAM, pinned, acquired 22:07:22Z, expires never. VRAM availableBytes: 0.
  • 52 training.in_place.memory_short ("0 of 4096000 governed Vram bytes are free") and 51 training.admission.waiting since; 44 embed.vram.refused.
  • Cause: InPlace.engines keeps one EngineSlot per incarnation; its EngineLearning owns the workspace's and learners' custody Claims. Only shutdown (quiesce) removed a slot, so a dead incarnation's claims stayed live, never orphaned, and Custody::settle_orphans (which already releases on a verified-dead process) never saw them.

Change

InPlace::retire_dead(live) removes every other incarnation whose process is verifiably dead (Liveness::Dead; unknown is kept). learn_in_place calls it before settle_orphans, so the dropped claims settle in the same pass. Probe training.in_place.dead_engines_retired.

Test

a_dead_engines_learning_state_is_retired_and_the_live_one_kept: the dead incarnation's slot is dropped (its Weak no longer upgrades), the live one is kept, nothing is retired twice. Not built locally (serving node); CI runs it.

Measured after deploy

Owner Fable: on the M5, after the next engine relaunch, resources/board shows no learning lease owned by a dead incarnation, and training.in_place.memory_short stops naming 0 free bytes.

Not in this PR

The relaunch itself: a plan's lane-count change relaunches the live engine (plan line 3b forbids a relaunch while serving). Reported to Codex (serving owner).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…s: a relaunch no longer pins learning memory forever

The M5, 2026-11-17: the serving plan relaunched the engine at 22:09:39Z mid learning step
(training.in_place.answer_lost on /learn). InPlace keeps one EngineSlot per engine incarnation,
and that slot owns its learners' and workspace's custody claims; nothing but shutdown removed a
slot, so the dead incarnation's workspace claim stayed live, custody never saw it orphaned, and
its leases stayed pinned (resources/board: learning:8044b75b...:speech-discipline:workspace,
4.88 GB VRAM + 1.13 GB RAM, pinned, no expiry). Every pass after it ended memory_short: "0 of
4096000 governed Vram bytes are free" (52 times by 22:30Z). No mind learned.

InPlace::retire_dead(live) drops every other incarnation whose process is verifiably dead (an
unreadable one is kept); learn_in_place runs it before settle_orphans, so the dropped claims are
orphans that settle on the existing dead-process proof the same pass. Probe
training.in_place.dead_engines_retired names the count. Test: a dead incarnation's slot is
dropped, the live one kept, nothing retired twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…space lease is freed by the next settle; an unreadable one and the live one are kept; a held slot releases only when let go (Codex on #6119)

EngineWorkspace::held_for_test (genome, test-fixtures) leases a workspace through
try_training_memory and holds it in custody exactly as cover does. retire_dead takes its liveness
probe through retire_dead_with (production passes EngineIncarnation::liveness), so a test can name
an unreadable incarnation; the dead one is really dead (a reused pid), because custody's settle
reads the real process. The test leases 5, 7 and 11 MB workspaces on a dead, an unreadable and a
live incarnation: retiring while the dead slot is still held releases nothing (no orphan yet);
letting go orphans its claim and settle_orphans frees exactly its 5 MB; the others keep theirs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@github-actions github-actions Bot added size: M and removed size: S labels Nov 17, 2026
…th uses, and the comments say governed VRAM was exhausted before the relaunch (Codex on #6119)

held_for_test returned String errors (stringly_errors 4247 -> 4249); it now maps the admission
exactly as lease_rows does (Unleased, AwaitingMemory). The comments no longer say the relaunch
caused the zero free memory: passes found 0 governed bytes free from 19:57Z on; the pinned lease
kept those bytes from coming back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 887d9cd into canary Nov 17, 2026
19 checks passed
@joelteply
joelteply deleted the fable/learning-retires-dead-engines branch November 17, 2026 23:17
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