Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
document phosphene LoRA-watchdog review + stage the M5 mflux/mlx version bisect
[._.]/ Adam Eivy27db8d9db887
diff --git a/PLAN.md b/PLAN.mdindex 0a9d582e2f..ae60bbc05a 100644--- a/PLAN.md+++ b/PLAN.md@@ -33,6 +33,10 @@ independently.- [ ] [authors-headshot-upload-asset-sync] **Make uploaded (non-gallery) author headshots transfer their bytes to peers.** The authors federation (above) syncs the headshot IMAGE BYTES only when `headshotImageUrl` points at `/data/images/<f>` (gallery-picked) — `headshotImageFilename()` in `authors/logic.js` maps that to an `image` asset the peer-sync pull worker fetches. But the Authors page's *upload* button (`client/src/pages/Authors.jsx` → `POST /api/uploads`) stores the file in `data/uploads/` and sets `headshotImageUrl = /api/uploads/<f>`, which is NOT one of the three pullable asset kinds (`image`→`/data/images`, `image-ref`, `video`), so on a peer the author record syncs but the headshot 404s. Two options: (a) route author-headshot uploads through the gallery (`/data/images/`) so they ride the existing `image` pull path (smaller change, recommended), or (b) add an `upload`/`/data/uploads` pullable asset kind end-to-end — new `ASSET_KIND_TO_URL_PREFIX` entry + `directoryForAssetKind` + `PATHS.uploads` + the `peerAssetManifestEntrySchema` kind enum in `peerSyncValidation.js`. External `http(s)`/`data:` URLs intentionally never transfer (the receiver resolves them itself). Estimated scope: small (a) / medium (b).- [ ] [peer-sync-unknown-kind-as-schema-block] **Treat a pre-feature peer's generic 400 rejection of a brand-new record `kind` as a schema-version block (not a bare `http-400` retry).** From codex review of the authors-federation PR (#1263). `pushRecordToPeer`'s schema-block / SchemaGapBadge pause path keys on a **409 `SCHEMA_VERSION_AHEAD`** from `applyIncomingPush`'s version gate. But when a NEW record kind is introduced (authors now; `mediaCollection` had the same gap when it landed), a peer running an older PortOS whose `peerSyncPushSchema` discriminated union doesn't include that `kind` rejects the push at **Zod validation with a generic 400** — *before* `applyIncomingPush` (and its gate) ever runs. So the sub retries as a plain `http-400` and the UI never surfaces "peer needs to update PortOS." This is benign under the trust model (the push lands once the peer upgrades; no corruption), which is why it's deferred — but the proper fix is cross-cutting version-negotiation work that applies to EVERY kind, not just authors: in `pushRecordToPeer`, detect a 400 whose body indicates an unrecognized `kind` discriminator (mirror the existing `portosMeta`/`catalogBundle` 400-retry detection block) and route it into `persistSchemaVersionBlock` with an empty-gap/`peer-pre-feature` marker so the SchemaGapBadge shows and the edit-push cooldown engages, OR preflight the peer's advertised `schemaVersions`/capabilities before creating the sub. Needs its own tests for the unknown-kind-400 classification. Estimated scope: medium (cross-cutting peer-sync negotiation + tests).+- [ ] [lora-training-version-bisect-and-pin-validated-trio] **Bisect the mflux/mlx/mlx-metal stack on the M5 and pin a validated trio that survives a full LoRA run.** From `reference-watch` review of Phosphene (2026-06-14, `docs/plans/2026-06-14-lora-watchdog-phosphene-review.md`). The three macOS GPU watchdog kernel panics (`docs/research/2026-06-13-mflux-training-watchdog-panic.md`) all happen on the currently-installed stack: **mflux 0.17.5 · mlx 0.30.6 · mlx-metal 0.30.6 · mlx-lm 0.29.1**. PortOS installs `mflux>=0.17` (a floor) and lets pip resolve mlx under mflux's `mlx<0.32` constraint (`scripts/setup-image-video.sh`), so the stack can drift silently. Phosphene's discipline is to pin a *validated trio* ("every pin is a paid lesson") — but pinning to the *current* versions would lock in the known-bad set, so this is a **bisect, not a blind pin**: on the M5, try mlx/mlx-metal 0.30.6 ↔ 0.31.x (and a newer mflux if `mlx<0.32` is relaxed), run a full training to completion under each, find a trio that survives, then pin it in `setup-image-video.sh` with a comment recording the test that proved it. Also: emit a one-line runtime fingerprint (`mflux`/`mlx`/`mlx-metal` version + Apple chip + macOS) at trainer startup in `train_mflux_lora.py` so each run log + future paniclog self-documents its exact stack (mirrors the video-gen `ref-watch-phosphene-runtime-fingerprint-in-status` item). File an upstream mflux/MLX issue with the three paniclogs + the fingerprint. **Ready to run:** confirmed the dev box IS the panicking M5 Max (`Mac17,7`/`T6050`, macOS 26.5.1, no OS update available); telemetry now armed; a one-command bisect harness (reuses run `15cfeed1…`, bf16, segmentation OFF) + upstream-issue draft are in `docs/plans/2026-06-14-lora-watchdog-phosphene-review.md` + `docs/research/2026-06-14-upstream-issue-draft-m5-watchdog.md`. **Gated only on:** each failing candidate hard-reboots the box, so run when free to lose the session (not mid-other-work). Estimated scope: medium (mostly bench time).++- [ ] [lora-training-phase-aware-soft-hang-stall-watchdog] **Phase-aware stall watchdog that SIGKILLs a wedged-but-not-rebooted mflux child and auto-resumes from the newest checkpoint.** From `reference-watch` review of Phosphene (2026-06-14). Phosphene proved an in-process daemon-thread watchdog can't fire during a Metal hang (the completion-handler dealloc chain holds the GIL — `docs/STATE.md:436`); the rescue must be out-of-process. PortOS's Node orchestrator is already out-of-process but its training idle watchdog is 30 min (`WATCHDOG_TRAINING_MS`). Add a **phase-aware** stall detector keyed off the wrapper's existing stage lines (`STAGE:load-model`, `STAGE:training`, `STEP:n:m:loss`, `STAGE:cooldown:heartbeat`): a tight budget during `STAGE:training` (consecutive `STEP:` lines should arrive within a few × the observed per-step time), and a generous/disabled budget during model load, dataset encode, preview generation, and cooldown — then SIGKILL + auto-resume from the newest checkpoint via the existing `--resume-checkpoint` path. **Important caveat / scope:** this does NOT address the observed *hard-reboot* kernel panics (the machine is gone before any userspace watchdog runs — checkpoint-resume already covers that); it only recovers *soft* GPU hangs faster, so it's defensive hygiene, not a fix for the incident. Must avoid false-killing a legitimately slow load/encode (derive the training budget from the first few observed step intervals, not a hardcoded 45s). Unit-test by feeding synthetic line streams. Estimated scope: medium.+### Trigger-gated (waiting for a precondition)diff --git a/docs/plans/2026-06-14-lora-watchdog-phosphene-review.md b/docs/plans/2026-06-14-lora-watchdog-phosphene-review.mdnew file mode 100644index 0000000000..b9a9bb00e7--- /dev/null+++ b/docs/plans/2026-06-14-lora-watchdog-phosphene-review.md@@ -0,0 +1,190 @@+# Phosphene reference review — LoRA training & the macOS GPU watchdog panic++**Date:** 2026-06-14 · **PortOS:** v2.20.0 · **Reference:** `mrbizarro/phosphene` @ v3.2.1+(`data/cos/reference-repos/0ff2e4fb…/`)++Goal of the review: phosphene also trains LoRAs MLX-natively on Apple Silicon —+see whether it solved the macOS GPU watchdog kernel panic that PortOS is fighting+on `lora-training-gpu-cooldown-segments`, or has techniques worth porting.++This is a design record. It deliberately documents one **negative result** so the+eval-cadence dead end is not re-attempted. The authoritative living incident+record stays `docs/research/2026-06-13-mflux-training-watchdog-panic.md`.++## What the two apps actually do (they differ at the model layer)++| | Phosphene | PortOS |+|---|---|---|+| Trains | LTX-2.3 **video** character LoRAs (face + voice from one dataset) | FLUX.2 Klein **image** LoRAs |+| Trainer | `ltx_trainer_mlx.LtxvTrainer` (vendored `ltx-2-mlx`) | `mflux-train` CLI (preferred) / torch+diffusers (fallback) |+| Watchdog survival | `mx.eval` cadence (inference) · out-of-process watchdog · pinned deps | process-teardown GPU-cooldown **segments** + checkpoint resume |++The trainers are different packages for different models, so there is no+lift-and-shift. The useful comparison is narrowly the **macOS-survival** layer.++## Negative result: the `mx.eval` cadence trick does NOT transfer to training++Phosphene's central watchdog lever for **inference** is MLX eval cadence. MLX is+lazy; it batches a whole forward into one graph and only materializes on+`mx.eval`. Letting the Metal command buffer grow unbounded risks an allocation+stall past the GPU watchdog window, so phosphene flushes inside the denoise loop+every N blocks via `LTX2_DIT_EVAL_EVERY` (`mlx_warm_helper.py:32-71`). PortOS+**already ported this to its LTX-2 video *generation* path**+(`scripts/generate_ltx2.py:63` sets `LTX2_DIT_EVAL_EVERY=1`).++It was tempting to port the same flush into mflux *training*. Reading the code,+it does not work, for three independent reasons:++1. **`LTX2_DIT_EVAL_EVERY` is foreign to mflux.** It is read by `ltx_core_mlx`+ (the inference engine). mflux reads no eval/flush/watchdog env var at all+ (grep of the installed package). So there is no env knob to flip.+2. **A `value_and_grad` step can't be partially eval'd.** mflux fuses forward ++ backward under `nn.value_and_grad` and materializes the whole thing with a+ **single** `mx.eval(params, optimizer.state)` per step+ (`mflux/models/common/training/trainer.py:141-143`). Inserting a per-block+ `mx.eval` inside the forward does not bound the *backward* command buffer —+ the gradient graph is one fused submission and can't be split by eval cadence+ the way a no-autodiff inference forward can.+3. **`batch_size: 1`.** PortOS configures one example per step+ (`server/services/loraTraining/runtimes.js:204`), so there is not even a+ batch loop to micro-accumulate over — each step is one irreducible+ forward+backward at 768px.++Conclusion: **do not add an eval-cadence "fix" to the trainer.** It would be a+no-op against a kernel panic, which is worse than not shipping. The technique is+correct only on the inference paths, where PortOS already applies it.++## What the panic actually is (and why the shipped mitigations are right)++Per the incident doc: three `watchdog timeout: no checkins from watchdogd in+90 seconds` kernel panics on brand-new `Mac17,7` / `T6050` (M5-class) silicon,+macOS 26.5, same caller (mod ASLR slide). That is a **whole-system stall**, not a+long single GPU kernel — leading hypothesis a GPU/Metal **driver hang** under+sustained ML load on new silicon, with thermal/power-trip and swap-thrash as+secondaries. A 768px, batch-1, single forward+backward step is seconds of GPU+time; it does not, by itself, starve `watchdogd` for 90s. So the right levers are+the ones already shipped:++- **Segmentation + GPU cooldown** (tear the process down → driver state resets) ✓+- **Memory-pressure reclaim + headroom gate** (attacks the swap secondary) ✓+- **Checkpoint floor + resume** (survives the hard reboot) ✓+- **powermetrics telemetry** (thermal-vs-driver forensics) ✓ — but blind on all+ three crashes because passwordless sudo wasn't configured.++Phosphene's experience **confirms the architecture** rather than replacing it.++## What phosphene genuinely adds++1. **Out-of-process watchdog principle (confirmation).** Phosphene proved an+ in-Python daemon-thread watchdog *cannot fire* — "Metal's command-buffer+ completion handlers block every thread's GIL during the deallocator chain"+ (`docs/STATE.md:436`, `ROADMAP.md:266`); the rescue must come from a separate+ process. PortOS's Node orchestrator + segmentation already sit on the right+ side of this line. The only gap is **soft** hangs (a wedged-but-not-rebooted+ mflux child): the Node idle watchdog is 30 min. A *phase-aware* stall detector+ (tight budget during `STAGE:training` where `STEP:` lines should arrive every+ few seconds; generous/disabled during `load-model`, dataset-encode, preview,+ and `cooldown`) would SIGKILL + auto-resume from the newest checkpoint faster.+ **Caveat:** this does **not** address the observed *hard-reboot* panics — the+ machine is gone before any userspace watchdog runs. It is defensive hygiene+ for the soft-hang case only. → PLAN item, gated on careful phase budgets to+ avoid false-killing a legitimately slow load/encode.++2. **Version-pinning discipline (+ bisect).** Phosphene pins a *validated trio*+ (`mlx==0.31.1`, etc.) precisely because "every pin is a paid lesson" and a+ `>=` floor lets the stack drift silently. PortOS installs `mflux>=0.17`+ (a floor) and lets pip resolve mlx under mflux's `mlx<0.32` constraint+ (`scripts/setup-image-video.sh`). Currently installed:+ **mflux 0.17.5 · mlx 0.30.6 · mlx-metal 0.30.6 · mlx-lm 0.29.1** — and this is+ the stack that panics. The actionable lever the incident doc already flags+ ("update the stack; search mflux/MLX trackers for M5/watchdog/hang") is a+ **bisect**, not a blind pin: pinning to the *current* versions would lock in+ the known-bad set. → PLAN item: bisect mlx/mlx-metal (e.g. 0.30.6 ↔ 0.31.x)+ and mflux on the M5, find a trio that survives a full run, *then* pin it with+ the test that proved it (phosphene's rule), and file an upstream mflux/MLX+ issue with the three paniclogs.++3. **Runtime-fingerprint logging** (already a PLAN item for video-gen,+ `ref-watch-phosphene-runtime-fingerprint-in-status`) should extend to the+ trainer: emit `mflux`/`mlx`/`mlx-metal` version + chip + macOS on each run so a+ future paniclog correlates to an exact stack. Small add to+ `train_mflux_lora.py`. → folded into the bisect item.++## Capability ideas (separate, larger, not watchdog-related)++- mflux in PortOS's venv already ships **`z_image` and `flux2_edit` training+ adapters** beyond plain FLUX.2 — on-device MLX LoRA paths PortOS could expose.+- Phosphene's **face + voice LoRA from one dataset** is a category PortOS lacks;+ it's a much larger lift (different model `ltx_trainer_mlx`, audio pipeline) and+ belongs in its own proposal, not this watchdog thread.++## Revised plan (honest scope)++| # | Action | Where | Status |+|---|---|---|---|+| 1 | Record the eval-cadence negative result | this doc + incident doc | done |+| 2 | ~~Inject per-block `mx.eval` into training~~ | — | **dropped** (not viable; see above) |+| 3 | Phase-aware soft-hang stall watchdog (SIGKILL + auto-resume) | Node `loraTraining` + `mediaJobQueue` | PLAN item (defensive-only; needs careful phase budgets) |+| 4 | Version bisect on the M5 → pin validated trio + runtime fingerprint + upstream issue | `setup-image-video.sh`, `train_mflux_lora.py` | PLAN item (blocked on M5 + a full run) |+| 5 | Z-Image / FLUX.2-edit LoRA training; face+voice LoRA | future | separate proposals |++Items 3–5 are captured as slug-tagged entries in `PLAN.md` → "Next Up".++## Ready-to-run bisect procedure (DO NOT RUN UNTIL READY — it can hard-reboot the box)++Confirmed 2026-06-14: the dev box **is** the panicking hardware — Apple **M5 Max**,+`Mac17,7`/`T6050`, macOS **26.5.1** (`25F80`, fully current — no OS update available),+128 GB. Passwordless `powermetrics` is now configured, so the next run finally+captures thermal/power forensics (all three prior panics were blind). Available+in-constraint versions: mlx/mlx-metal up to **0.31.2** (current 0.30.6; mflux+caps `<0.32` and its `dev` extra pins `mlx==0.31.0`); mflux up to **0.18.0**+(current 0.17.5).++**Why a test run is destructive:** to reproduce the *sustained-GPU* condition a+candidate must run with **segmentation OFF** (`--segment-steps 0`). If the+candidate version doesn't fix the driver hang, the box hard-reboots (and this+session dies). Each failing candidate ≈ one reboot. Telemetry-on means even a+failed run yields first forensics (thermal vs driver).++**Repro harness (reuse an existing dataset/config):** run+`data/training-runs/15cfeed1-f4ee-4fc2-a767-67b2336dd277/` — 25 images × 24+epochs = 600 steps, batch 1, **quantize null (bf16)**, low_ram, save_freq 150.+bf16 is the heaviest sustained-GPU config = most panic-prone = best repro.++Direct sustained run (bypasses the server; telemetry auto-starts; segmentation+OFF so the panic condition is reproduced):++```bash+cd ~/github.com/atomantic/PortOS+RUN=data/training-runs/15cfeed1-f4ee-4fc2-a767-67b2336dd277+./data/python/venv/bin/python scripts/train_mflux_lora.py \+ --config "$RUN/mflux-train.json" --output-dir "$RUN" \+ --total-steps 600 --segment-steps 0+# watch: tail -f "$RUN/powermetrics.log" (GPU temp/power up to the gap)+```++**Bisect order (isolate one variable at a time; pip changes survive a reboot):**++1. Baseline confirm (optional, costs a reboot): current stack, command above →+ expect panic, but now WITH telemetry. Read `powermetrics.log`: GPU die temp+ climbing to ~100 °C / SMC throttle before the gap ⇒ **thermal** (no version+ bump helps; improve cooling / cap power). Temps normal, log just stops ⇒+ **driver hang** ⇒ proceed to bump.+2. Bump the Metal backend only (highest-probability driver fix):+ `./data/python/venv/bin/python -m pip install --user 'mlx==0.31.2' 'mlx-metal==0.31.2'`+ then re-run the harness. Completes ⇒ run once more to confirm, then pin+ (step 4). Panics ⇒ reboot, continue.+3. Add mflux 0.18.0 (`pip install --user 'mflux==0.18.0'`, keeps mlx 0.31.2) and+ re-run. (Try mlx 0.31.0/0.31.1 if 0.31.2 regressed something image-side.)+4. **Pin the surviving trio** in `scripts/setup-image-video.sh` (replace the+ `mflux>=0.17` floor) with a comment recording the run that proved it —+ phosphene's "every pin is a paid lesson." Add a startup runtime-fingerprint+ line to `scripts/train_mflux_lora.py` (mflux/mlx/mlx-metal + chip + macOS).+5. Revert to current if no candidate survives: `pip install --user 'mlx==0.30.6'+ 'mlx-metal==0.30.6'` — segmentation (default ON) remains the mitigation, and+ file the upstream issue (`docs/research/2026-06-14-upstream-issue-draft-m5-watchdog.md`).++**Before running:** commit/stash any in-flight work (a reboot is abrupt — the+incident doc notes downstream tombstone/sync fallout), and `git commit` this+branch so the docs survive. Bisect progress should be logged back into the+incident doc after each candidate so a session-killing reboot doesn't lose it.diff --git a/docs/research/2026-06-13-mflux-training-watchdog-panic.md b/docs/research/2026-06-13-mflux-training-watchdog-panic.mdindex 85e7bf5118..742d42d02e 100644--- a/docs/research/2026-06-13-mflux-training-watchdog-panic.md+++ b/docs/research/2026-06-13-mflux-training-watchdog-panic.md@@ -148,6 +148,52 @@ add a sudoers rule (use `sudo visudo -f /etc/sudoers.d/portos-powermetrics`):Without this the sidecar simply skips capture — training is unaffected.+## Phosphene cross-reference (2026-06-14)++Reviewed the `mrbizarro/phosphene` reference repo (it also trains LoRAs+MLX-natively on Apple Silicon) for a watchdog fix. Full write-up:+`docs/plans/2026-06-14-lora-watchdog-phosphene-review.md`. Key takeaways:++- **Negative result — do NOT add an `mx.eval`-cadence "fix" to the trainer.**+ Phosphene's `LTX2_DIT_EVAL_EVERY` flush bounds the Metal command buffer on the+ *inference* denoise loop (no autodiff), and PortOS already uses it on the LTX-2+ generation path (`scripts/generate_ltx2.py:63`). It does **not** transfer to+ mflux training: mflux reads no such env var, its step fuses forward+backward+ under `nn.value_and_grad` materialized by a single `mx.eval`+ (`mflux/.../training/trainer.py:141-143`) which a per-block flush can't split,+ and `batch_size` is 1 (`runtimes.js:204`) so there's no batch loop to chunk.+ A per-step panic on a 768px batch-1 step is consistent with a system stall,+ not a too-long single GPU kernel — reinforcing the driver-hang hypothesis.+- **Out-of-process watchdog is the only kind that works.** Phosphene confirmed an+ in-Python daemon-thread watchdog is starved by Metal's GIL-holding dealloc+ chain; PortOS's Node orchestrator + segmentation already sit on the right side+ of that. A phase-aware *soft*-hang stall detector would help wedged-not-rebooted+ runs but cannot catch the hard reboots seen here (PLAN:+ `lora-training-phase-aware-soft-hang-stall-watchdog`).+- **Version-bisect, then pin a validated trio** (phosphene's "every pin is a paid+ lesson"). This is the most promising untried lever for a new-silicon driver+ hang; tracked as PLAN `lora-training-version-bisect-and-pin-validated-trio`+ (current stack: mflux 0.17.5 · mlx 0.30.6 · mlx-metal 0.30.6 · mlx-lm 0.29.1).++### Confirmed on the hardware (2026-06-14)++This dev box **is** the panicking machine: Apple **M5 Max** `Mac17,7`/`T6050`,+macOS **26.5.1** (`25F80`) — and `softwareupdate -l` shows **no OS update+available**, so Apple hasn't shipped a driver fix; the paniclogs confirm the OS+was already 26.5.1 at all three crashes (this doc's earlier "26.5" was imprecise).+**Passwordless `powermetrics` is now configured**, so the next run captures the+thermal/power forensics that were blind on all three prior panics. In-constraint+upgrade room: mlx/mlx-metal → **0.31.2** (mflux caps `<0.32`; its `dev` extra+pins `mlx==0.31.0`), mflux → **0.18.0**.++A **ready-to-run bisect harness** (reuses run `15cfeed1…` — 25 img × 24 ep, bf16,+the most panic-prone config; runs with `--segment-steps 0` to reproduce the+sustained condition) is written up in+`docs/plans/2026-06-14-lora-watchdog-phosphene-review.md` → "Ready-to-run bisect+procedure". **Not yet run** — it can hard-reboot the box, so it waits for an+explicit go. Upstream issue drafted at+`docs/research/2026-06-14-upstream-issue-draft-m5-watchdog.md`.+## If it recurs — investigation checklist1. **Read the telemetry.** Open the newest `<run>/powermetrics*.log` from thediff --git a/docs/research/2026-06-14-upstream-issue-draft-m5-watchdog.md b/docs/research/2026-06-14-upstream-issue-draft-m5-watchdog.mdnew file mode 100644index 0000000000..1b7b280d7d--- /dev/null+++ b/docs/research/2026-06-14-upstream-issue-draft-m5-watchdog.md@@ -0,0 +1,43 @@+# Draft upstream issue — M5 Max GPU watchdog kernel panic under sustained MLX LoRA training++Copy-paste target: file against **mflux** (https://github.com/filipstrand/mflux/issues)+and/or **mlx** (https://github.com/ml-explore/mlx/issues). Not yet filed — pending a+telemetry-captured repro to disambiguate thermal vs driver (see incident doc).++---++**Title:** Sustained FLUX.2 LoRA training hard-reboots Apple M5 Max (Mac17,7 / T6050) — `watchdog timeout: no checkins from watchdogd`++**Environment**+- Hardware: Apple **M5 Max**, `Mac17,7`, SoC `T6050` (socRevision 11), 128 GB unified memory+- OS: macOS **26.5.1** (`25F80`), kernel `Darwin 25.5.0 … xnu-12377.121.6~2/RELEASE_ARM64_T6050` (built 2026-04-27) — fully up to date (`softwareupdate -l` → no new software)+- mflux **0.17.5**, mlx **0.30.6**, mlx-metal **0.30.6**, mlx-lm 0.29.1, Python 3.14+- Workload: `mflux-train` FLUX.2 Klein LoRA, 25-image dataset, 768px, batch_size 1, `quantize: null` (bf16 base), `low_ram: true`, 600 steps++**Symptom**+The machine **hard-reboots** mid-training. Three reproductions, all kernel watchdog-timeout panics with an identical signature (the caller addresses differ only by the ASLR kernel slide — same low bytes `…65d8c` each time):++| Time (local) | panicString |+|---|---|+| 2026-06-13 06:28:45 | `watchdog timeout: no checkins from watchdogd in 90 seconds` |+| 2026-06-13 20:49:36 | `watchdog timeout: no checkins from watchdogd in 90 seconds` |+| 2026-06-14 07:26:47 | `watchdog timeout: no checkins from watchdogd in 93 seconds` |++Panic backtrace top frames are in `com.apple.driver.AppleARMWatchdogTimer` /+`AppleInterruptControllerV3` — i.e. the watchdog firing, not the originating+fault. A `watchdogd` timeout means nothing could be scheduled for ~90s, so this+is a system-level stall, not an ordinary userspace error. The crashes occur a+fairly consistent depth into the run (sustained GPU compute), suggesting a+cumulative driver/thermal trigger rather than a specific op.++**What we've ruled in/out**+- Memory pressure was *elevated but not critical* at panic time (compressor ~13% of limit, swap OK), so OOM/swap-thrash is possible but not strongly indicated.+- Per-step work is tiny (768px, batch 1, single forward+backward) — not a single long-running kernel.+- Leading hypothesis: a **GPU/Metal driver hang on new M5-class silicon** under sustained ML load.++**Questions for maintainers**+1. Any known M5/`T6050` Metal-backend hangs under sustained training in mlx-metal 0.30.x? Is 0.31.x expected to help? (mflux's `dev` extra pins `mlx==0.31.0`.)+2. Recommended `mx.set_wired_limit` / memory-limit settings for a 128 GB box to avoid starving the scheduler?+3. Any backend flag to bound Metal command-buffer submission size during training?++**Attachments to include when filing:** the three `panic-full-*.panic` files and the per-run `powermetrics.log` once a telemetry-captured repro exists.