commit 9f1d64a58a777d59cabc23ffb39f879f8877a862
parent e856583a10f0727f5eb2f6db9205d3bdf0ebcf79
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 2 Oct 2026 02:26:14 -0400
common: review L4 — a Syncthing temp (.syncthing.<name>.tmp) is scratch
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/common/lib/mediaTier.test.ts b/common/lib/mediaTier.test.ts
@@ -45,6 +45,7 @@ const TABLE: ReadonlyArray<[string, "media" | "text" | "scratch", boolean]> = [
[".audio.mp3.parakeet", "scratch", false],
[".audio.mp3.tierlink-4242", "scratch", false],
[".audio.mp3.tiering-4242", "scratch", false],
+ [".syncthing.audio.mp3.tmp", "scratch", false],
// The hot text.
["transcript.json", "text", false],
["transcript.en.vtt", "text", false],
diff --git a/common/lib/mediaTier.ts b/common/lib/mediaTier.ts
@@ -63,6 +63,9 @@ const SCRATCH_PATTERNS: ReadonlyArray<RegExp> = [
// beside the name, and the bytes being placed in `media/<id>/`.
/\.tierlink-\d+$/,
/\.tiering-\d+$/,
+ // Syncthing's in-flight temp (`.syncthing.audio.mp3.tmp`): a transfer the
+ // sync tool never finished.
+ /^\.syncthing\..*\.tmp$/,
];
export function isScratchEntry(name: string): boolean {