Repository navigation
fleet: report an island none of whose pushes is merged in N merge cycles (island_straggler); ssh: island join/leave/lag e2e - #891
Open
michaellchung wants to merge 12 commits into
Open
michaellchung wants to merge 12 commits into
michaellchung wants to merge 12 commits into
Conversation
michaellchung
force-pushed
the
own/island-straggler
branch
2 times, most recently
from
November 26, 2026 13:56
e866a1b to
49ae0f5
Compare
michaellchung
force-pushed
the
own/island-straggler
branch
2 times, most recently
from
November 26, 2026 17:42
1719d07 to
62f7600
Compare
michaellchung
force-pushed
the
own/island-straggler
branch
from
November 26, 2026 21:12
62f7600 to
05dccd8
Compare
…reported (island_straggler) The syncer already merges the other islands at each quorum deadline and excuses a silent island (#865); nobody said that the island had stopped contributing. The fleet controller now reads the syncer's merges (its tape on this host, or the copy the syncer launch uploads to the run store, tapes/syncer/) and writes island_straggler once per stretch, in fleet.jsonl and in the island's record, when no push of a running island was merged in N merge cycles (one outer step of every fragment; --rl-island-straggler-cycles, default 3, 0 off). island_straggler_cleared follows once a push of it is merged again. Counting starts at the island's join after a (re)launch. A policy decides what to do: wait by default (nothing is stopped or relaunched), or a replacement its provider offers. Tests: the tracker and its sources (local tape, store chunks across syncer incarnations); the controller's event, record and policy; and an end-to-end CPU test of ssh: trainer islands (the launcher's fleet controller over the resident ssh ops on a fake SSH cluster, the trainer worker on a local store, the real syncer): a third island added, one removed, and one stuck while connected. In each case the other islands' processes never restart, the merged steps run without a gap or a repeat, no push is merged twice and the resource ledger holds each ssh incarnation once. docs/OWN_CLUSTERS.md: "Islands that lag, join or leave". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- count only records of this launch: a watch starts at the current syncer incarnation's tail and ignores records older than its start; a new pool_join (generation or syncer term) restarts an island's count - bounded store reads: list after a cursor, at most 16 GETs per poll, a time budget, partial reads kept on a failed GET - a flagged island that stops running is cleared, naming why - island_straggler_unavailable names why stragglers cannot be watched - dashboard: straggler events in the event stream, a straggler mark on the trainer card and in Islands now Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… run store - an island's count restarts when it leaves running, so a join its next incarnation writes before the controller holds it running is counted - e2e: the stuck case over the per-island wiring (the launcher's watch of each launch's argv, the tape uploaded to the run store in chunks next to an earlier syncer's history, a relaunch while reported); assertion limits noted - docs: what is counted, the clear reasons, island_straggler_unavailable and why a synced group with its own syncer VM has no report Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rom its return Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ds, restarts, tails, clocks - a reconnect (new connection generation) or a syncer that took over (new term) keeps the count and the mark; only leaving running or a relaunch restarts them - an island a merge lists absent is in the pool (an adopted island is counted) - a launcher that starts on a record holding a report closes it (controller restarted) and judges the island again - the store tail is established once every request of the first read worked; the newest incarnation is the furthest syncer (term, step), not a name - the watch-start filter allows 10 minutes of clock skew; no other decision reads a clock - silence is said only after the first record about this launch's islands, and taken back (island_straggler_available) when records come again - dashboard: "straggler" in warn colour in place of "ok", on one line; the cleared event shows its reason only; no mark in the Fragments rows - docs: what restarts a count, how late a report can be Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
_trainer_records dropped the record's straggler, so island_now.straggler was always None on the production path and the card never showed it. Test the path end to end: the controller writes the mark, read_fleet_state reads the run store, the card and its Islands now row show it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…irst merged push A relaunched island (a spare node, a move) or a new island whose join the watch read is not counted before its first merged push, for at most the controller's recover timeout; past that it is counted from then on and the report says the grace ran out. An adopted island has no grace, and a reconnect neither starts nor extends one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in rounds REV-891c: the first read no longer picks one syncer incarnation (a restarted syncer may resume an earlier step, keep its term or write only its own records at first): it keeps every incarnation's tail and each read lists every known one and reads those that grew. The clock filter applies only to an incarnation read from its start. The tape is said silent after two of the syncer's longest rounds and two upload intervals (at least 5 minutes), derived from the launch's args. A left mark whose record does not read is retried at the next poll, and this watch's own mark is never taken for one. A recovering island's mark is cleared as recovering, a relaunch as relaunched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; fair store reads REV-891d: a push merged while the island was away (its earlier launch's last one, a drain, before a remove) no longer takes the new launch's grace, and the same launch back keeps no join read meanwhile. A join of an island already in the pool is a reconnect, so an adopted island never gets a grace. The silence window uses the longer of the soft deadline and the quorum timeout. Without a recover timeout a new launch has a 20 minute grace. The store reads list active incarnations first and the others in turn within half the poll budget, give each grown incarnation a chunk before any gets a second, and the first read and full listings go on across reads within the budget. The mark is stamped with wall time. Known limits written in the docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…are and is replaced Over #885's spare nodes: the poll that finds the loss clears the report (recovering), the island is not counted while it waits for a spare, and on the spare it is a new launch with its catch-up grace; past its recover timeout it is reported N cycles later. The dashboard keeps the card's mark and state with the spare events in between. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #910 a fleet's island records come from several sources (a host's file and the store copies) and fold by their own time. The straggler mark follows the newest mark event by its source's time: a clear read before the report it closes, or a report twice, ends as the newest says; one source's clock stepped back folds in write order; the lifecycle replay leaves the mark alone. The mark lands on the island of its learner id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michaellchung
force-pushed
the
own/island-straggler
branch
from
November 26, 2026 22:48
05dccd8 to
9028167
Compare
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.
own-cluster-fleet-stability tasks 9.1 and 9.2: ssh: islands that lag, join or leave a running fleet.
What changes
island_straggler(9.1). The syncer already merges the other islands at each quorum deadline and excuses a silent island (syncer: a pool round merges what arrived at the quorum deadline; a connected but silent island is absent, not awaited #865), but nothing said that an island had stopped contributing. The fleet controller now reads the syncer's merges and, when no push of a running island was merged in N merge cycles (one outer step of every fragment), writesisland_straggleronce per stretch: infleet.jsonland understragglerin the island's record (fleet/trainers/<k>/state.json; itsatis wall time, as the record'supdated).island_straggler_clearedcloses the stretch with areason: a push of the island is merged again,recovering,relaunched(running again as a new launch), stopped or removed (island STOP), no longer running, orcontroller restarted.yeto/launch/island_straggler.py: the tracker (foldsouter_step/pool_join), the sources (the syncer's tape file on this host for a head-mode syncer, or the copy the per-island syncer launch uploads to an object run store undertapes/syncer/), and the watch.FleetController(straggler=..., straggler_policy=...): one_poll_stragglers()call per poll, in its own section offleet.py. The policy answerswait(default: nothing is stopped or relaunched) orreplace(handed to the policy's ownreplace); the replacement itself is the spare-node work (task group 4), this PR only signals.--rl-island-straggler-cycles N(default 3, 0 off), checked with the island pool options.What is counted (reviews H1, REV-891b H-A, M-B, REV-891c L-1, L-2). A launch counts only what the syncer records after it started: each source starts at the tape's end when the watch starts (the local file at its offset; the run store's copy at the tail of every syncer incarnation there), so no clock is compared and a syncer host whose clock is off (a test runs one an hour behind) is counted as usual. Only an incarnation the store lists later is read from its start, without its records stamped more than 10 minutes before the watch's start (a test runs one 300 s behind, still counted). Only the controller restarts a count: when the island's launch token changes (relaunch, move) or the island leaves running (recovering, draining). A
pool_joinonly marks the island joined: a link that reconnects (a new connection generation under the same token) or a new syncer term keeps the island's misses and its mark, so an island that keeps reconnecting without pushing is still reported and its report does not flip. An island the syncer lists in anouter_step'sabsentcounts as joined from that merge on, so an island adopted by a restarted launcher (nopool_joinread) is counted at once. A join read while the controller holds the island recovering counts; a relaunch never seen away is counted from the first join read after the poll that saw it.A restarted controller (REV-891b M-C, REV-891c M-2). When the controller starts or takes over, each island record that still carries a
stragglermark gets oneisland_straggler_clearedwith reasoncontroller restarted, and the mark is set to none; the island is then judged again from the new watch's start. A record that does not read (a 503) is read again at each poll until it does, and a mark this watch wrote meanwhile is never taken for a left one.A new launch catches up first (coordinator decision with REV-891c). A large model's catch-up can span many merge cycles. A launch its controller relaunched (new machines, a spare node, a move) or a new island whose
pool_jointhe watch read is not counted until its first push is merged, for at most the controller's recover timeout (--recover-timeout, from when the controller holds the new launch running; 20 minutes when relaunch is off). A push merged while the island was away (its earlier launch's last push, a drain beforeisland start, before a remove and add) is the earlier launch's and does not take the new launch's grace (REV-891d H-1). After its first merged push it is counted as usual; if none is merged by the end of the recover timeout it is counted from then on, reported N merge cycles later, and itsreasonsays the catch-up grace ran out. An adopted island has no grace: a join of an island already in the pool is a reconnect (REV-891d M-1). A reconnect's join neither starts nor extends a grace, and the same launch back from recovering has none.Store reads (review M2, REV-891b M-D, REV-891c H-1). No syncer incarnation is picked as the current one: a restarted syncer may resume an earlier step (from its checkpoint), keep its term, or write only its own records (round opens, connections) in its last chunk, and two may be level. The first read lists every incarnation and keeps each one's tail; only when every listing succeeds is the tail established (after a failure the next read is a first read again, so the history is never read). Each later read lists the known incarnations after their cursors (
start_after) within half the poll's budget, those that grew at their last listing first and the others in turn (REV-891d L-3, L-8), and reads the new chunks of those that grew, one chunk of each (the one read longest ago first) before a second of any, at most 16 GETs per read, the rest at the next read; the cursor moves per chunk read, and a failed GET returns what was already read (nothing is lost or read twice). A full listing every 10 reads adds only incarnations it did not know (a known one keeps its cursor); those are read from their start. The first read and the full listings go on across reads within the budget (REV-891d L-4). Per controller poll: at most one listing per known incarnation + at most 16 GETs, plus listing pages every 10 reads, within a 5 s budget; the store is read at most every 30 s. Known limits (docs): a join written before the first read finished is not read (that island is counted like an adopted one); an uploader rewriting a chunk already read adds lines that are not read; a late-listed syncer whose clock runs more than 10 minutes behind is skipped and reported silent.Report delay (REV-891b L-H). Usually about one store read (30 s) plus the controller poll, about 1 minute after the Nth missed cycle. A watch behind the tape reads at most 16 chunks (about 8 minutes of tape) per read, so after a one-hour store outage it catches up in about 4 minutes. A new syncer incarnation is found within 10 reads (about 5 minutes).
Not watchable (review L1, REV-891b L-F, REV-891c M-1). When the watch cannot work, each trainer island of the launch gets one
island_straggler_unavailableevent with the reason: turned off (--rl-island-straggler-cycles 0), no object run store, the tape upload off, a synced group whose syncer runs on a VM of its own (L2: that syncer's tape is never uploaded), or no record read for two of the syncer's longest rounds plus two upload intervals, at least 5 minutes. A round short of the pushes its soft deadline needs runs to its quorum timeout, so the longest round is the larger of--rl-sync-soft-deadline-sand the quorum timeout (--rl-elastic-quorum-timeout-s, else the syncer's 900 s default): 31 minutes with the defaults; derived from the launch's args (REV-891d M-2). The silence counts only after the first record about the launch's islands, so a slow start is never said unavailable; a fleet of 900 s rounds read every 30 s never is either. When a record is read again,island_straggler_availableis written.Dashboard (review M3, REV-891b L-I; minimal, the full view is 4.5). Since fleet.jsonl: learner id as island_id, chunked copy into the run store #910 a fleet's island records come from several sources and fold by their own time: the straggler mark follows the newest mark event by its source's time (one source in write order, its clock stepped back included), so a clear read before the report it closes, or one report read from two copies, ends as the newest says; the lifecycle replay never touches the mark, and the mark lands on the island of its learner id (
island_id).island_straggler*are fleet events in the reducer that do not change the island's lifecycle state; the event stream shows them (lag/back/info), and a cleared event shows only its reason. The trainer card carries astragglerbadge while the island is reported. The mark comes from the island's record in the run store (fleet_islands._trainer_recordsreadsstragglerfromfleet/trainers/<k>/state.json; an end-to-end test goes from the controller's write throughread_fleet_stateto the page), else from the newest fleet event. Its "Islands now" row showsstragglerin the warn color in place of the island's status (never "ok" next to it), on one line, with rows of equal height at 1440 px; the Fragments rows no longer repeat it. Screenshots at 2540/1920/1440/400 px (plain, reported, cleared, from one consistent run where the stuck merges have no push of island 1) were checked locally.Spare nodes (ssh islands: replace a lost node of a resident trainer island with a spare (own-cluster 4.1-4.4) #885, review L4). Rebased on ssh islands: replace a lost node of a resident trainer island with a spare (own-cluster 4.1-4.4) #885. A reported island that loses a node is recovering: the poll that finds the loss clears its report (
recovering), it is not counted while it waits for a spare, and on the spare it is a new launch with its catch-up grace; past its recover timeout it is reported N cycles later.tests/test_island_straggler_spares.pyruns the real controller over ssh islands: replace a lost node of a resident trainer island with a spare (own-cluster 4.1-4.4) #885's fake SSH cluster and spares, and the dashboard with the spare events in between.CPU end-to-end test of ssh: islands (9.2).
tests/test_ssh_island_fleet_e2e.py: the real Rust syncer, the trainer worker on a local store with the desired state, and for each island launch the launcher's ownFleetControllerover the residentssh:island ops (SshIslandOps) on the fake SSH cluster; rank 0's start connects a syncer client, its kill drops it. Twossh:2x8xb300@bmislands train, then one case each:fleet_islands.add): it catches up, then its pushes are merged;island_straggler(actionwait) once after 3 cycles, no relaunch, cleared once it pushes again;launcher._island_straggler_watchof its parsed argv, reading the run store (DirectoryObjectStore) where the real tape uploaders copy the syncer's tape chunk by chunk, next to an earlier syncer's history in which island 1 missed 40 merges. Island 1 is reported once (never from the history), then one of its ranks fails and its controller relaunches it (cleared:recovering); the new incarnation joins again and stays silent past its recover timeout, so it is reported again only after its catch-up grace ran out and N more cycles (its reason says so); then it pushes and is cleared. The watch reads the store every 0.5 s here only to keep the case short; its silence window is derived from the launch's argv (31 minutes), so no unavailable notice is written.Each case asserts: the other islands' processes never restart (one start per node, one launch, no kill before the end), the merged steps are 1..N with no gap or repeat, no push is merged twice, and the resource ledger holds each ssh incarnation exactly once. The limits of these assertions are written next to them (L3).
docs/OWN_CLUSTERS.md, section "Islands that lag, join or leave" (lag and remove; what is counted, the clear reasons, the report delay, when the report is unavailable and why for a synced group with its own syncer VM). The add-side checks (9.3) come in the stacked follow-up PR.Reused, not rebuilt: the syncer's quorum deadline and excuse (#865), per-island STOP, the desired state and
yeto fleet island add/remove, per-learner catch-up, the syncer tape uploaders, the resident ssh island ops and their fake cluster.Tests
tests/test_island_straggler.py(59 functions),tests/test_island_straggler_spares.py(3, over ssh islands: replace a lost node of a resident trainer island with a spare (own-cluster 4.1-4.4) #885's spare nodes),tests/test_dashboard_island_straggler.py(9),tests/test_ssh_island_fleet_e2e.py(4 cases with the real Rust syncer),tests/test_own_clusters_islands_doc.py(2).test_ssh_island_spares_recovery.py::test_an_owed_stop_retry_that_races_release_node_leaves_the_node_released(a race in the directory store's read, outside this change).tests/test_ssh_island_fleet_e2e.py10 consecutive runs at this head (port 0): 4/4 each._trainer_recordsdropping the mark, and 3 of the reducer's order (marks in arrival order, raw time instead of the source's time, marks in the lifecycle replay).Customer gate
tests/test_k31_customer_plan_golden.py,tests/golden/breakers) at head 9028167.examples/k31dry runs (run.agentic-262k, run.baremetal-b300-262k with their preflight logs, pool.nc-mi355x-agentic-262k), normalized, are identical line by line to main e896ad8.tests/golden,tests/fixtures/k31_customer_kitorexamples/k31.🤖 Generated with Claude Code