Skip to content

fleet follow-ups: shape-free advice, unparsable running records, copy record checks - #924

Merged
michaellchung merged 2 commits into
mainfrom
own/fleet-followups
Nov 26, 2026
Merged

michaellchung merged 2 commits into
mainfrom
own/fleet-followups

Conversation

@michaellchung

@michaellchung michaellchung commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-ups of #910 (fleet.jsonl store copy) and #913 (fleet placement preflight).

Shape-free advice where it helps. The shape check (fleet_session.shape_problems) told islands of two shapes to set --rl-sync-layout shape-free. A Miles full-parameter island also binds its placement into its contract, and shape-free takes only the parallel shape out of it: for two such islands whose placements differ (1x8 next to 1x4) the message now names the same nodes x GPUs per node and says shape-free does not help here. Islands whose placements agree (per-island placement on the same machines, TP2 next to TP1) or that bind none keep the shape-free advice, which is the way out there.

A running island whose recorded launch does not compile. yeto fleet island add/move compares the island with a starting or running island's launch as its trainer worker record has it (#913). When that recorded launch no longer compiles, the change is refused by default (exit 2). The message says the record was written when that incarnation started, so a changed config does not change it, and names the ways out: --allow-unparsable-running (new, on add and move; no --force exists) checks without that island with a WARN, or stop or remove the island first (yeto fleet island remove --name <island>). The option covers only a recorded launch: a running member rebuilt from the desired state that does not compile stays a refusal. Moving the island itself compares its old machines' record the same way. The docstring of fleet_islands._as_launched now states that a MOVING or STOPPING island is compared as the desired state has it (for a move, its new target).

A corrupt fleet.store.json. A record that does not parse (not JSON, not an object, schema / store / start / run missing, a start that is not a non-negative integer, another schema) is one WARN line and counts as no record. The next copy starts at this run's first line, the first complete line whose time_unix is at or after the run's registry start (an earlier run of the name wrote the lines before it), or at the file's end when that start is unknown: fewer lines rather than another run's, as #910 requires. yeto down copies nothing for it. Nothing in the store copy can fail a launch: copy_start falls back to the file's end on any error, and the launch's store-copy setup is guarded as a whole (a WARN, the file stays local). The record is now written whole (a temporary file renamed over it), so a crash mid-write leaves the previous record or the new one.

The run identity names the run directory. The copy record's run was the registry's started_at alone, which a copied run directory (meta.json included) shares with its original: yeto down of the copy could copy into the original's store. It is now <name>@<started_at>. Records of #910 (a bare number) no longer match: such a run's next launch starts at the file's end and its yeto down copies nothing, as for another run.

Docs (docs/DASHBOARD.md, docs/FLEET_TRAINER_ISLANDS.md, the fleet_store module header): a relaunched island launch of a per-island fleet is a new run (the new incarnation's cluster prefix and registry entry), so its copy starts afresh; a launcher killed outright (kill -9) may leave the lines of its last upload interval (under 30 s) only in the local file, observation data only; a run already running when yeto is upgraded to these rules (a record without its directory name) keeps the lines of the last interval before its launcher restarts and the island_stop lines of its yeto down in the local file only; the corrupt-record and copied-directory rules; the new option.

No customer path change: the customer K3.1 runs have no fleet and no copy record; the launch's store-copy block only gained a guard.

Tests

  • tests/test_fleet_log_store.py: 8 corrupt record forms (start a string, a bool, negative; not JSON; not an object; no start; no run; another schema): a WARN, no record, the copy from this run's first line and a sound record after; a run start that is unknown copies from the end; no complete line of this run yet copies from the end; a line exactly at the run's start is this run's; a failed rename keeps the previous record and leaves no temporary file; a launch over an earlier run's lines and a corrupt record puts every line of this run and none of the earlier run's into the store; a record read that raises, and a store-copy setup that raises, never fail the launch; yeto down with a corrupt record copies nothing; a copied run directory's yeto down leaves the original's store alone while the original's own yeto down copies.
  • tests/test_fleet_islands_placement.py: no shape-free advice for full-parameter islands on other machines; the advice kept for per-island placement, for verl and when only one island binds a placement; DOWN / MOVING / STOPPING records compare the desired member; an unparsable running record refused by default and admitted with --allow-unparsable-running (a WARN and checked 1 of 2 islands; skipped mixed), for a move of another island and for a move of that island itself; the option does not cover a desired launch that does not compile.
  • Mutation testing: first round 19 mutants, 18 killed; the survivor (one island binding a placement, the other none) is killed now by its own test. Review round 13 mutants (start from 0, unknown start, partial line, start boundary, non-atomic write, temporary file left, error fallback, run start parsing, skipped list, partial-check line x2, one-sided placement), all killed.
  • Affected test files after the rebase on main: 319 passed. Full suite in 4 shards locally before the review round (one process per shard): 18479 passed, 377 skipped, 11 xfailed, 0 failed; not rerun for the review round (CI runs it).
  • Goldens: test_k31_customer_plan_golden + tests/golden/breakers 52 passed, golden files unchanged.
  • customer dry-run diff: none (examples/k31 run*.json through yeto run up --dry-run with the trainer launch rc=0, and the pool dry-run, against origin/main)

🤖 Generated with Claude Code

michaellchung and others added 2 commits November 27, 2026 05:15
… record checks

- The shape check offers --rl-sync-layout shape-free only where it helps:
  for Miles full-parameter islands whose placements differ it names the
  same nodes x GPUs per node instead (shape-free keeps the placement in
  the contract).
- yeto fleet island add/move: a running island whose recorded launch
  (written when its incarnation started) does not compile is refused by
  default, naming why and the ways out; --allow-unparsable-running makes
  it a WARN for that case only. The MOVING / STOPPING comparison is
  documented.
- fleet.store.json: a record that does not parse is a WARN and counts as
  none (the next copy starts at the file's start, yeto down copies
  nothing); the store copy never fails a launch. The run identity names
  the run directory, so a copied run directory never copies into the
  original's store.
- Docs: a relaunched island of a per-island fleet is a new run; a killed
  launcher may leave its last upload interval only in the local file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes:
- A corrupt fleet.store.json starts the copy at this run's first line (the
  first with time_unix at or after the run's registry start), or at the
  file's end when that start is unknown, instead of the file's start: an
  earlier run's lines never reach this run's store. Any other error also
  starts at the file's end.
- The copy record is written whole (a temporary file renamed over it).
- An add/move that skipped a running island (--allow-unparsable-running)
  says how many islands it checked and which it skipped instead of the
  agreement line.
- Module header and docs follow the new rules; a run started before this
  rule loses the last interval and its yeto down lines after a restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaellchung
michaellchung merged commit 0c7e847 into main Nov 26, 2026
7 checks passed
@michaellchung
michaellchung deleted the own/fleet-followups branch November 26, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant