commit cc3268dd0832fe173d8eafb0a997d28db0cc84e9
parent 4d0c68f87f3904f93ef6e0e0b0824f3e549b59f1
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 21 Sep 2026 02:04:57 -0400
snapshot: videoHasAnyArtifact was isVideoDownloaded under a second name
Byte for byte, in a module that already imported the original — it is what
increments `downloaded` in the same walk. Two names for one predicate is how
the settled short-circuit and totals.videos end up disagreeing about what an
artifact is, so the copy is gone and the name stays as an alias: "does this
dir hold anything we fetched?" reads better at the five call sites, and it is
now guaranteed to be the same question.
Last in the slice on purpose: another branch is editing this file's mediaBytes
loop, and this keeps that merge to one hunk.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat:
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/common/controller/channelSnapshot.ts b/common/controller/channelSnapshot.ts
@@ -659,9 +659,14 @@ async function readPlaylistUrls(file: string): Promise<string[]> {
}
}
-function videoHasAnyArtifact(files: VideoFiles): boolean {
- return files.hasYtVtt || files.hasWhisper || files.audioFiles.length > 0;
-}
+// WAS A PRIVATE COPY OF isVideoDownloaded, byte for byte, and this module
+// already imported that one (it is what increments `downloaded` in the same
+// walk). Two names for one predicate is how the settled short-circuit and the
+// totals end up disagreeing about what an artifact is, so the copy is gone and
+// the name stays as an alias: "does this dir hold anything we fetched?" reads
+// better at the five call sites than "is it downloaded?", and it is now
+// guaranteed to be the same question.
+const videoHasAnyArtifact = isVideoDownloaded;
export async function generateChannelSnapshot(
paths: Paths,
diff --git a/plans/FACTS.md b/plans/FACTS.md
@@ -4178,6 +4178,12 @@ rejects.
that skip says "we will try again", and a video with neither directory nor
outcome would silently leave the bucket. `channelSnapshot.test.ts` runs a whole
filtered channel with NO `data/` dirs at all and still gets the bucket.
+- **`videoHasAnyArtifact` was a private copy of `isVideoDownloaded`, byte for
+ byte**, in a module that already imported the original (it is what increments
+ `downloaded` in the same walk). It is an alias now: two names for one
+ predicate is how the settled short-circuit and `totals.videos` end up
+ disagreeing about what an artifact is, and the five call sites read better
+ asking "does this dir hold anything we fetched?".
- **It refuses rather than guesses.** Anything `isVideoDownloaded` calls
downloaded, a `clips/` window dir, or a `saved-video.json` pointer and the
directory stands. The returned `DownloadOutcomeRecord` is unchanged either way,