Archilyzer · Source

archilyzer

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

commit 3caac3c614b6d18a13acb0abd41d5cb5d3fb6f7c
parent def2ab2ec238f59fc89f052182fd8c87aeafb939
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 29 Sep 2026 21:16:37 -0400

common: review L3 + L5 — one unreadable video directory is logged as "a video in its data directory could not be read", apart from an unreadable data/; the full-rebuild refusal says where ARCHILYZER_INDEX_ALLOW_HELD is set (the command's own environment, or the editor's, which takes a restart)

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

Diffstat:
Mcommon/controller/buildIndex.test.ts | 13+++++++++++--
Mcommon/controller/buildIndex.ts | 10++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/common/controller/buildIndex.test.ts b/common/controller/buildIndex.test.ts @@ -386,7 +386,15 @@ test("(c) a full rebuild with a channel held refuses without the override, and h err.message, /For each: mount its media and run this again; or repair or re-point its location on \/storage; or finish or clear its move .*; or, if it is gone for good, delete the channel or set excludeFromBuild/, ); - assert.match(err.message, new RegExp(`set ${INDEX_ALLOW_HELD_ENV}=1\\.$`)); + // The override by name, and where it is set for each way a build runs. + assert.match( + err.message, + new RegExp( + `set ${INDEX_ALLOW_HELD_ENV}=1 in the environment of the process that runs the build: ` + + `for the command line, the command's own \\(\`${INDEX_ALLOW_HELD_ENV}=1 pnpm archilyzer index\`\\); ` + + `for the editor's Build index job, or a site build started from the editor, the editor's own environment, which takes a restart of the editor\\.$`, + ), + ); assert.ok(!err.message.includes(ROOT), err.message); return true; }); @@ -526,7 +534,8 @@ test("(g) a data directory that cannot be read holds its channel, and says why", log.join("\n"), ); assert.ok( - log.some((l) => l.startsWith("Channel flaky: its data directory could not be read (EACCES)")), + // One video's directory, said apart from the whole data/ above. + log.some((l) => l.startsWith("Channel flaky: a video in its data directory could not be read (EACCES)")), log.join("\n"), ); } finally { diff --git a/common/controller/buildIndex.ts b/common/controller/buildIndex.ts @@ -453,7 +453,10 @@ async function scanSource( }); } if (readFailure !== null) { - held.set(ch.name, `its data directory could not be read (${readFailure})`); + // One video, not the directory: said apart from the readdir failure + // above, so the log points at the right place. The whole channel is + // held all the same. + held.set(ch.name, `a video in its data directory could not be read (${readFailure})`); continue; } // Asked again after the walk: a drive that went away DURING it leaves the @@ -651,7 +654,10 @@ export async function buildIndex({ `but ${held.size} channel(s) cannot be read: ${describeHeld(held)}. ` + `A full rebuild clears every channel's index records, so these would come out empty and the next site build would publish them as gone. ` + `${HELD_WAYS_OUT} ` + - `To rebuild without them anyway (each stays out of the index until its media is back and the index is built again), set ${INDEX_ALLOW_HELD_ENV}=1.`, + `To rebuild without them anyway (each stays out of the index until its media is back and the index is built again), set ${INDEX_ALLOW_HELD_ENV}=1 ` + + `in the environment of the process that runs the build: for the command line, the command's own ` + + `(\`${INDEX_ALLOW_HELD_ENV}=1 pnpm archilyzer index\`); for the editor's Build index job, or a site build started from the editor, ` + + `the editor's own environment, which takes a restart of the editor.`, ); }