commit 89c1f7ffff64802e662dfa179be3a0cb245f7244
parent 688135130b1594890d6cf24bf4f6620d00abc675
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 28 Sep 2026 18:00:50 -0400
common: buildStats test (b) asserts the heal before the new unindexed count
So that on the unfixed code the case fails where the bug is (the heal), not
on the result field that did not exist yet.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat:
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/common/controller/buildStats.test.ts b/common/controller/buildStats.test.ts
@@ -183,19 +183,21 @@ test("(b) stats built before the index had the video heal after the index build"
// video was downloaded after the last index build.
const first = await runStats();
assert.equal(statOf(first.byId, "early").hasTranscript, false);
- assert.equal(first.res.unindexed, 1);
- assert.ok(
- first.log.some((l) => l.startsWith("1 video(s) are not in the index yet")),
- first.log.join("\n"),
- );
await runIndex();
const second = await runStats();
- assert.equal(second.res.changed, 1);
- assert.equal(second.res.unindexed, 0);
+ assert.equal(second.res.changed, 1, "the key moved off NOT_INDEXED, so the stat is redone");
const s = statOf(second.byId, "early");
assert.equal(s.hasTranscript, true);
assert.equal(s.transcribedDate, "20260711");
+
+ // And the lag is said, not silent: counted in the result and logged.
+ assert.equal(first.res.unindexed, 1);
+ assert.ok(
+ first.log.some((l) => l.startsWith("1 video(s) are not in the index yet")),
+ first.log.join("\n"),
+ );
+ assert.equal(second.res.unindexed, 0);
});
test("(c) a caption-only video is dated by its captions' arrival, not by a later Normalize", async () => {