chore(desktop): drop the committed update-mutex artifact directory - #102191
chore(desktop): drop the committed update-mutex artifact directory#102191jonpol01 wants to merge 1 commit into
Conversation
`apps/desktop/'` is not a real path. It is a literal single-quote directory
holding a full absolute path as nested subdirectories:
apps/desktop/'/var/folders/5h/.../hermes-update-mutex-LMF9y5/home/.hermes-update-in-progress.mutex'
Both files are 0 bytes, nothing in the tree references them, and the leading
and trailing `'` are part of the filenames. They are the fingerprint of the
double-quoted mutex path in `withRemoteUpdateMutex()`: the path reaches Python
with its shell quotes still attached, so it is treated as CWD-relative and
`os.makedirs()` materialises the whole absolute path under whatever directory
the process happened to be in. Running
`apps/desktop/electron/remote-lifecycle.test.ts` from `apps/desktop`
reproduces it on the spot.
They were swept in by a `git add .` in 3662057, an unrelated menu-label
commit.
This only removes the committed artifact. The generator is a separate concern
already covered by open PRs (NousResearch#99189, NousResearch#96187, NousResearch#96260) and issues (NousResearch#99133,
NousResearch#96212, NousResearch#96188); those repair the quoting but none of them deletes these two
files, so the litter would survive whichever one lands.
Chunk5 review — chore(desktop): drop committed update-mutex artifactsDeletes two empty committed files whose paths embed a macOS
Non-blocking. Merge. |
|
Salvaged into #104206 — your commit Re the automated review on this PR: the deletion is correct and complete (both zero-byte files, no consumers — the only |
Summary
apps/desktop/'is a tracked directory whose name is a literal single quote. Inside it, a full absolute path is materialised as nested subdirectories:Both files are 0 bytes, nothing in the tree references them, and the leading and trailing
'are part of the filenames — they are shell quotes that were never stripped.They arrived in
36620578f0, an unrelated menu-label commit, via agit add ..Where they come from
withRemoteUpdateMutex()builds its Python invocation as:mutexPathcomes fromexpandRemotePath(), which already returns a shell-quoted string (it has to — it is interpolated bare into shell commands like[ ! -e ${marker} ], and the~form returns"$HOME"'/…'so the shell still expands$HOME). Quoting it a second time means Python receives the quotes as part of the filename:A path beginning with
'is relative, so the script'sos.makedirs(os.path.dirname(mutex_path))recreates the entire absolute path underneath whatever directory the process was started in. Runningapps/desktop/electron/remote-lifecycle.test.tsfromapps/desktopreproduces the directory immediately — that is how these two files came to exist.Scope
This PR only deletes the committed artifact. The quoting fault that generates it is a separate concern and is already covered upstream:
I deliberately did not touch
remote-lifecycle.tshere — #99189 already makes exactly the one-line change (${shq(mutexPath)}→${mutexPath}) plus a matching assertion, and a fourth copy of that fix would not help anyone. But none of those PRs deletes these two files, so the litter survives whichever of them lands. That is the gap this closes.Test plan
git ls-tree -r origin/main --name-only | grep "^apps/desktop/'"→ exactly the 2 files, both 0 bytes (git cat-file -s→ 0).hermes-update-mutex-LMF9y5,hermes-update-mutex-us8HZu, or the temp-dir hash anywhere in the tree. (git grep "apps/desktop/'"matches only@apps/desktop/string literals in the composer path tests — unrelated.)git check-ignorereports nothing), so they were tracked deliberately-looking but accidentally.apps/desktop/electron/remote-lifecycle.test.ts: 91 passed, before and after.