# TODO

## Next
- [x] Rename junk-rig → Tersler in the repo: commands `tersler-*`, services `tersler-*`, `/opt/tersler`, `/etc/tersler`,
  `install/tersler.conf`, image hostname (2026-11-10)
- [x] Migrate the rig: `~/tersler`, `sudo ~/tersler/install/rename-from-junk-rig.sh` (2026-11-10, done)
- [ ] Afterwards: clients and SSH config from `junk-rig.local` / `10.6.67.113` to `tersler.local`; delete `~/junk-rig` on the rig;
  optionally rename this PC's checkout `~/src/junk-rig`
- [ ] Replacement CPU (IT-Hardware Möhling, ordered): check the underside, then test A1 + D1; if channel D works,
  move to one stick per channel (A1/B1/C1/D1) and rerun the bandwidth and Strata speed tests
- [x] Strata: image input (strata-vision + ISTA mmproj) and 262k context
- [ ] Agent tests at 262k with a long (>131k) conversation
- [ ] lean_bench: a "with Python" track (sandboxed `run_python` tool) next to the thinking-only score
- [ ] Opus reference run, thinking only, via `claude -p --tools ""` on the Team plan (needs `claude` → `/login`)

## Now: while the parts are in transit

### Front duct (tower case; replaces the shroud)
- [ ] Measure `plug_zone`, `x_off`/`y_off`, `case_dx`/`case_dy` and the free wall area ([hardware-notes.md](docs/hardware-notes.md#front-duct-current-plan-tower-case))
- [ ] Print `shroud/p100_front_duct.scad` (duct card-end down + wall plate); 4× M4×50 + 4 nuts, foam tape
- [ ] How is the old 92 mm fan held? The plate expects screws from outside into 3.4 mm pilot holes (max. wall + 8 mm long)

### Shroud (original open-frame design, superseded)
- [ ] Measure both P100s: `card_h`, `card_t`, cooler gap, and any holes, tabs or bracket on the tail end ([hardware-notes.md](docs/hardware-notes.md#measure-on-arrival-needed-for-the-shroud))
- [ ] Put the values into `shroud/p100_shroud.scad`, check with `cutaway = true`, export the STL
- [ ] Test-print a thin slice of the sleeve (set `trans_len`/flange small) to check the fit on the card tails before the full print
- [ ] Print the shroud in PETG/ASA, sleeve opening on the bed, no supports
- [ ] Fit the fan: 4× M4 × 45 + nuts; line the sleeve with foam tape

### Small parts to buy
- [ ] 4× M4 × 45 bolts + nuts, foam tape, filament
- [ ] Thermal paste (if the cooler has none), C13 power cord
- [ ] Open-frame mount: standoffs + a board or plate; a support strut for the fan/shroud

### Software prep
- [ ] Build the disk image: `image/build-image.sh`, then `dd` it to the SSD ([image/README.md](image/README.md))
- [x] Run `scripts/check-updates.sh`: the fork is at `83a7f0839`, 29 own commits past `d90ec36a3` ([changelog](docs/changelog.md))
- [ ] Plan: first bring-up on the pinned `d90ec36a3` (reproduce the video's numbers), then build + bench the head
- [x] Pick the model, a Qwen3.8-27B Q6_K GGUF **with the MTP head**:
  - [ ] Set `MODEL_URL` (+ `MODEL_SHA256`, `MODEL_HF_REPO`) in `install/tersler.local.conf` (copy from `tersler.local.conf.example`)
  - [ ] Optionally pre-download it (~22 GB) to a USB disk to save time later
- [ ] Optional dry run of the installer in an Ubuntu 24.04 container or VM. The `base`, `cuda` and `build` stages need no GPU, so this tests the fork's build with our flags:
  ```bash
  docker run --rm -it -v "$PWD":/tersler ubuntu:24.04 bash -c \
    'apt-get update && apt-get install -y sudo curl && cd /tersler && \
     ./install/install.sh base cuda build'
  ```
  (`stage_base` needs `linux-headers-$(uname -r)`, which may not exist in a container. Drop it there if it fails.)
- [ ] Get nvflash ready on the USB stick (fallback only, if Above 4G Decoding isn't enough), from a trustworthy source

### DIY power cable
- [x] Not needed: the cards came with their own 2× PCIe → EPS Y-adapters

## On arrival
- [ ] Inspect the board (bent socket pins!) and keep the PnP cap (ASUS RMA needs it)
- [ ] CPU + cooler + **16 GB in A1**, PSU, onboard VGA, **no GPUs yet**. Does it POST?
- [ ] Later: 3× 16 GB DDR4 RDIMM 2Rx4 (same type as the one in A1) into B1/C1/D1, then memtest86+ one pass
- [ ] Note the BIOS version (later updates need a working v3 CPU, which we have)
- [ ] BIOS: **Above 4G Decoding = Enabled**; VT-d stays enabled; set the fan headers (CPU_FAN1)
- [ ] Boot from the SSD (the image from `image/`), then `ssh tersler.local`

## First GPU boot
- [ ] Power off. P100 #1 into **PCIE6**, P100 #2 into **PCIE4**; PCIE3/PCIE5 stay empty
- [ ] Power: native EPS → P100 #1, the card's Y-adapter (both legs) → P100 #2
- [ ] Shroud + fan on, the fan at full speed for now
- [ ] Boot. If it's black or loops: [BAR1 fallback](docs/hardware-notes.md#if-the-board-still-wont-boot-with-the-cards-bar1-problem)

## Install
- [ ] The repo is already in `~/tersler` (from the image); pull any later changes over
- [x] `sudo ./install/install.sh` → reboot when told → `sudo ./install/install.sh` again (resumes)
- [x] `sudo ./install/install.sh verify`: driver 580, BAR1 16 GB each, x16 links, P2P OK, iommu=pt
- [x] `sudo systemctl start tersler-llama`, then `journalctl -u tersler-llama -f`

## Tune and measure
- [x] `tersler-bench`, record the result in [docs/changelog.md](docs/changelog.md). Target ≈ the video's 66.7 / 49.2 tok/s
- [x] Thermals: sustained load < ~75 °C (20 min: max 55/63 °C, fan pwm ≤177, cardboard duct; `tersler-loadtest`)
- [x] Fan control: `tersler-fan-control --discover` → `--test chip/pwmN` → set `FAN_*` and `FAN_CONTROL=1`, then rerun `install.sh config services`
- [ ] Try `GPU_POWER_LIMIT` 125/150/175 and write the results down
- [ ] Try P2P on vs off (`LLAMA_P2P=0`)
- [ ] Optional: try Kindi's ternary 27B with the same prompts, mainly for long context and agent use ([research.md](docs/research.md#alternative-engine-kindi-checked-2026-11-05))

## Ongoing
- [ ] Weekly `tersler-check-updates` (timer setup in [docs/keeping-up.md](docs/keeping-up.md))
- [ ] Every pin change: build side by side → bench → changelog → commit
