Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit bbd6fc5cf0cd9a464d87c6ac2b922e12cac50317
parent 540f7b6c26e72c720cfb67f03a5f28917a097f7b
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 24 Nov 2026 19:21:50 -0500

space-suggestions: the scan names the raw live chat through the stored-text rules

storedText.grep.test.ts (the stored-text gate) failed on spaceScan.ts comparing
entries to the chat's constant; it now classifies by isStoredTextName and
not a caption track, and opens nothing.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Mcommon/controller/spaceScan.ts | 16++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/common/controller/spaceScan.ts b/common/controller/spaceScan.ts @@ -34,9 +34,17 @@ import type { ChannelConfig } from "../lib/channelConfig"; import type { StorageLocation, StorageSettings } from "../lib/storageLocations"; import type { SavedVideoCompactionSettings } from "../lib/savedVideoCompaction"; import { inspectChannelMedia, type ChannelMediaLocation } from "../lib/channelMedia"; -import { CLIPS_DIR, LIVE_CHAT_MEDIA_FILENAME, isKeptChatCapture, isScratchEntry, isTierable } from "../lib/mediaTier"; +import { CLIPS_DIR, isKeptChatCapture, isScratchEntry, isTierable } from "../lib/mediaTier"; import { isRealAudioFile, isSourceMediaFile } from "../lib/mediaFiles"; -import { isStoredCaptionName } from "../lib/storedText"; +import { isStoredCaptionName, isStoredTextName } from "../lib/storedText"; + +// The raw live chat in its PLAIN form, by the stored-text rules +// (lib/storedText.ts): a declared stored-text name that is not a caption +// track. A listing's entry is only classified here, never opened; its stored +// form (.zst) is already compressed and is not proposed. +function isPlainRawChat(name: string): boolean { + return isStoredTextName(name) && !isStoredCaptionName(name); +} import { SAVED_VIDEO_POINTER_FILENAME, savedVideoRoot } from "../lib/savedVideo"; import { formatBytes } from "../lib/format"; import { readJsonFile, writeJsonAtomic } from "../lib/jsonFile-server"; @@ -536,7 +544,7 @@ export async function scanSpace(opts: SpaceScanOptions): Promise<SpaceScanResult // location's root, or `media/` in place) — here only for the row. const f = acc.fact(real, tst); if (isRealAudioFile(name)) audio.push({ name, fact: f }); - else if (name === LIVE_CHAT_MEDIA_FILENAME) bump(tally.chat, f); + else if (isPlainRawChat(name)) bump(tally.chat, f); continue; } if (st.isDirectory()) { @@ -562,7 +570,7 @@ export async function scanSpace(opts: SpaceScanOptions): Promise<SpaceScanResult if (!st.isFile()) continue; const f = acc.add(abs, st, mediaByName(name) ? "media" : "text"); if (isStoredCaptionName(name)) bump(tally.captions, f); - else if (name === LIVE_CHAT_MEDIA_FILENAME) bump(tally.chat, f); + else if (isPlainRawChat(name)) bump(tally.chat, f); else if (name === "metadata.info.json") unmanaged(um, `metadata:${f.dev}`, { what: "Video metadata (metadata.info.json)", disk: diskIdOf(f.dev), owner: "no writer compresses it yet" }, f.bytes); else if (name === "transcript.json") unmanaged(um, `asr:${f.dev}`, { what: "Raw transcriber output (transcript.json)", disk: diskIdOf(f.dev), owner: "no writer compresses it yet" }, f.bytes); else if (name === "transcript.cues.json") unmanaged(um, `cues:${f.dev}`, { what: "Cue files (transcript.cues.json)", disk: diskIdOf(f.dev), owner: "derived and rebuildable (build-cues); nothing removes them" }, f.bytes);