SRE #84 phases 1 and 2. Five files, ~30 load-bearing lines, and the point is
not tidiness: on a box where the account is not `pln`, SuperDirt booted
completely cleanly with every one of the three sample roots silently absent,
and the LCXL painter units exec-failed while rig-doctor reported the LCXL
section green. Two silent failures, each standing behind something that looked
like a pass.
**Phase 1 — the three sample roots and the two same-repo loads.**
start_and_midi.scd and sample_watch.scd held /home/pln as literal strings.
The fix is not a blind sed, because a raw tilde expands nowhere by itself.
Three traps, all verified on sclang 3.14.1 before writing a line:
- `"~/x".standardizePath` keeps a trailing glob intact, so the loadSoundFiles
calls can stay one-liners. Good.
- `File.exists("~/x")` returns FALSE. A naive tilde substitution would have
left the preload and sample-watcher guards syntactically perfect and
permanently false — a dead preload with no error, which is worse than the
hardcoded path it replaced.
- `thisProcess.nowExecutingPath` is nil inside s.waitForBoot's closure. The
two same-repo loads live in there, so the repo root is captured at TOP
level into ~pvRepoRoot and used later. Reading it in place would have
produced exactly the same dead-guard failure as the tilde.
Deriving the repo root from the file's own location beats a home-relative
guess: the rig now runs from any clone path, not merely any username.
**Phase 2 — the two outlier units.** lcxl3-driver.service and
lcxl-leds-watch.service baked WorkingDirectory and an absolute ExecStart,
where every sibling unit (midiviz, perf-tray, parvagues-bridge,
midi-autoconnect, tidal-ardour-autoroute) already used %h. Now they do too,
verified with systemd-analyze --user verify.
**Phase 3, unplanned — the fix broke the check that guards the fix.**
rig-doctor's check_scd_sample_roots reads the roots OUT of start_and_midi.scd
rather than hardcoding them, which is the right design and is why it caught
this at all. But it then called Path.is_dir() on the extracted literal, and
Python does not expand a tilde either — the same trap as File.exists, one
language over. So the portability fix turned three PASSes into three false
FAILs on the box where all three roots exist. That is how a check gets
switched off. It now expands before testing, and reports the resolved path so
the reader can see what was actually stat'ed.
Validation: both .scd files compile (File.readAllString(f).compile, which
parses without executing); both units pass systemd-analyze verify; rig-doctor
goes from 3 fail / 36 pass to 0 fail / 39 pass with the same verdict logic;
901 passed, 2 skipped across the suite.
The lesson for the log is the third phase, not the first two. A checker that
derives its expectations from the source it checks is strictly better than one
with hardcoded copies — and it still shares the source's bugs, one runtime
removed.
| Name |
Last commit
|
Last update |
|---|---|---|
| .gitea/workflows | Loading commit data... | |
| armada | Loading commit data... | |
| blocks | Loading commit data... | |
| blog | Loading commit data... | |
| config/wireplumber | Loading commit data... | |
| copycat | Loading commit data... | |
| docs | Loading commit data... | |
| gifts | Loading commit data... | |
| lib-parvagues | Loading commit data... | |
| live | Loading commit data... | |
| mix | Loading commit data... | |
| output | Loading commit data... | |
| releases | Loading commit data... | |
| sandbox | Loading commit data... | |
| study | Loading commit data... | |
| test | Loading commit data... | |
| tools | Loading commit data... | |
| utils | Loading commit data... | |
| visuals | Loading commit data... | |
| viz | Loading commit data... | |
| .gitignore | Loading commit data... | |
| BootTidal.hs | Loading commit data... | |
| BootTidal.hs.broken | Loading commit data... | |
| BootTidal.visuals.broken.hs | Loading commit data... | |
| CLAUDE.md | Loading commit data... | |
| EVENING.md | Loading commit data... | |
| FOH_MASTER.md | Loading commit data... | |
| LAST_THIRD.md | Loading commit data... | |
| LICENSE | Loading commit data... | |
| Logo.xcf | Loading commit data... | |
| MORNING.md | Loading commit data... | |
| PatchBay_MultiChannel.xml | Loading commit data... | |
| PatchBay_Perf.xml | Loading commit data... | |
| PatchBay_Perf5.1.xml | Loading commit data... | |
| README.md | Loading commit data... | |
| RUNBOOK.md | Loading commit data... | |
| SETUP.md | Loading commit data... | |
| SHOPPING_LIST.md | Loading commit data... | |
| TASKS_DUMP.md | Loading commit data... | |
| backlog.md | Loading commit data... | |
| bullet_train.tidal | Loading commit data... | |
| collide.sh | Loading commit data... | |
| conftest.py | Loading commit data... | |
| debug.tidal | Loading commit data... | |
| didacticpatternvisualizer.pde | Loading commit data... | |
| gig-up.sh | Loading commit data... | |
| gpu-mode.sh | Loading commit data... | |
| hello.sc | Loading commit data... | |
| init_midi.sh | Loading commit data... | |
| install_superdirt.sclang | Loading commit data... | |
| intro.md | Loading commit data... | |
| library.txt | Loading commit data... | |
| link_jack.sh | Loading commit data... | |
| link_samples.sh | Loading commit data... | |
| link_samples_all.txt | Loading commit data... | |
| main_fairbanks.scd | Loading commit data... | |
| notes.md | Loading commit data... | |
| parvagues-sc.service | Loading commit data... | |
| perf-audio.sudoers | Loading commit data... | |
| perf-tray.py | Loading commit data... | |
| perf-tray.service | Loading commit data... | |
| perf.sh | Loading commit data... | |
| process-palette.json | Loading commit data... | |
| realtime.tidal | Loading commit data... | |
| sample-manifest.json | Loading commit data... | |
| sample_watch.scd | Loading commit data... | |
| samples.txt | Loading commit data... | |
| setlist_opal2026.txt | Loading commit data... | |
| sketch.properties | Loading commit data... | |
| start_and_midi.scd | Loading commit data... | |
| test.tidal | Loading commit data... |