-
perf(ardour-sweep): derive the archive path instead of searching 25 G for it · 5468507b
The tool worked but could not answer its own question. Proving a missing source is gone meant `rglob(name)` per file across the Freebox — 24 full traversals of a 25 G network mount for one session. It ran 8m15s without finishing, and on the 600s budget it would have returned "not found" purely because it ran out of time. An unfinished search reported as an absence is how you drop the last reference to a take that was actually recoverable. The fix is not a faster search, it is not searching. The Freebox is a converged mirror of $HOME (fbk), so an archived file's location is COMPUTABLE: mirror root + the path relative to $HOME. One stat per file instead of a walk. Runtime went from "8m15s, unfinished" to 0.40s, and the answer is now exact rather than best-effort. It still checks the session's own dead/ and audiofiles dirs, since a file can be moved aside rather than removed, and it refuses outright if no mirror is mounted — "gone" is not a claim you get to make about audio when the SSOT is offline. It also now reports HOW CURRENT the mirror is, because that changes what the absence means. Here: the mirror last changed 2026-08-29 22:41, so it holds up to Take100. Take101 is therefore absent locally AND absent from the mirror, but was also never eligible for that backup — so the honest statement is "it is not anywhere I can reach", not "it was archived and then lost". The tool now says that distinction out loud rather than letting the operator read absence as proof. Verdict for Tidal Live: 294 sources, 24 missing, all Take101, 12 orbits x L/R. Would drop 24 sources and 24 regions. That take's .mid files survive; only the audio is gone. Two bugs of my own, fixed here and worth the note: the mirror loop bound `root`, shadowing the XML tree and killing the region sweep with "'PosixPath' object has no attribute 'iter'" — a local rebinding eating an outer name, which is this repo's recurring self-inflicted wound. And an ElementTree truth test that Python 3.14 deprecates. Verified the write refusal fires: with Ardour running it stops at "Refusing to write: Ardour is running (pid [2708769])" and the session file's mtime is unchanged. Applying it needs Ardour closed, by design.
PLN (Algolia) authored5468507b
×