| … | … | @@ -333,6 +333,35 @@ then crawled back — a **1–3 min outage per cycle**, repeating as the temp-di |
| 333 | 333 | already correct, network was `VALIDATED`/`everCaptivePortalDetected{false}`, uptime 9.7 days |
| 334 | 334 | (no reboot), battery 64→75% charging at 30 °C. **None of the usual suspects.** |
| 335 | 335 | |
| 336 | **9. ⛔★ pgv3 "down" #2 — an aborted download killed the daemon (FIXED 0.1.200, 2026-08-07).** |
| 337 | Same day as trap 8, different fault. Symptom: `:4040` refused while the bare pid was |
| 338 | alive and burning ~58% of a core. Cause: clicking a partially-synced repo tore down a |
| 339 | file pipe mid-body and `fs.createReadStream(p).pipe(res)` had no error handler, so |
| 340 | streamx'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.** |
| 358 | Contrary to "not sidecar-registered means no OTA": `@pgh-celltron` pulled pgv3 0.1.200 on |
| 359 | its 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 |
| 361 | NOT 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 |
| 363 | restarting: `grep -c pipeFile .../apps/pear-git-v3/lib/web/router.js`. |
| 364 | |
| 336 | 365 | ## Quick command reference |
| 337 | 366 | |
| 338 | 367 | ```bash |