OverviewFilesCommitsIssuesDocsReleasesPeers

hypercore-kb commits / 2ac59fe

skills/celltron: pgv3 crash-loop from aborted downloads, and the sidecar DOES autoupdate
Two traps from the 0.1.200 incident. The daemon died on any torn-down file pipe (uncaught PREMATURE_CLOSE); the supervisor logs that as "exited (code 0)", which reads like a clean shutdown and sent me down the wrong path first. Recovery is ~2.5 min, so a user retrying the link self-sustains the loop. Also corrects the standing note that celltron gets no OTA: its own sidecar pulled the new tree unprompted with no 5.7GB re-materialize. What it does not do is cycle the running daemon. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2ac59fe4ee16eded009d807a71141953814744cc
by plankatron <fleeky@gmail.com> · 2026-08-07T21:37:03.000Z

Changed files (1) +29 -0

.claude/skills/celltron/SKILL.md +29 -0
……@@ -333,6 +333,35 @@ then crawled back — a **1–3 min outage per cycle**, repeating as the temp-di
333333 already correct, network was `VALIDATED`/`everCaptivePortalDetected{false}`, uptime 9.7 days
334334 (no reboot), battery 64→75% charging at 30 °C. **None of the usual suspects.**
335335
336**9. ⛔★ pgv3 "down" #2 — an aborted download killed the daemon (FIXED 0.1.200, 2026-08-07).**
337Same day as trap 8, different fault. Symptom: `:4040` refused while the bare pid was
338alive and burning ~58% of a core. Cause: clicking a partially-synced repo tore down a
339file pipe mid-body and `fs.createReadStream(p).pipe(res)` had no error handler, so
340streamx's `PREMATURE_CLOSE` went uncaught and **Bare terminated the process**.
341- ⚠ **The supervisor's `exited (code 0)` reads like a clean shutdown. It is not** — that
342 is just how Bare reports this abort. The `Uncaught StreamError` one line ABOVE it is
343 the cause. Also: no `shutting down...` line means it was NOT the SIGTERM path.
344- ⚠ **Recovery is ~2.5 min** (60 s supervisor backoff + ~100 s remounting 36 repos before
345 the port binds), so a user retrying the link keeps it in a self-sustaining loop. A node
346 that is "down, then up, then down" on a ~2-3 min cadence is this, not the network.
347- ⚠ `pgv3.log` is APPEND-ONLY ACROSS RESTARTS — old FATALs from weeks ago sit in it. Slice
348 the current boot first: `n=$(grep -n "starting pear-git-v3" pgv3.log | tail -1 | cut -d: -f1); sed -n "${n},\$p"`.
349- Fixed in pgv3 by routing all three `.pipe(res)` sites through `lib/web/pipe-file.js`
350 plus an `uncaughtException` allow-list in `server.js`. **The enclosing try/catch never
351 helped** — it only guards synchronous setup; stream errors land a tick later.
352- ★ **The regression test ONLY reproduces under `bare`** (`test/pipe-file-abort.test.js`):
353 Node's streams tolerate the abort and the test passes pre-fix, while `bare` aborts with
354 exit 134 and the exact production stack. Run bare-runtime tests with
355 `bare ./node_modules/.bin/brittle <file>`, not `npx brittle`.
356
357**10. celltron's own sidecar DOES autoupdate — the forge process does not restart itself.**
358Contrary to "not sidecar-registered means no OTA": `@pgh-celltron` pulled pgv3 0.1.200 on
359its own within ~15 min of `pgh publish`, no manual install and no 5.7 GB re-materialize
360(the dep closure was already in the store — only changed trees are fetched). What it does
361NOT do is cycle the running daemon. Apply = kill the inner bare pid (trap 3) and let
362`supervise-pgv3.sh` relaunch; expect ~60 s backoff + boot. Verify the tree BEFORE
363restarting: `grep -c pipeFile .../apps/pear-git-v3/lib/web/router.js`.
364
336365## Quick command reference
337366
338367```bash