Archilyzer · Source

archilyzer

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

commit f589b9a6a4b379b72659e2fcb37afc8a2b94d2a5
parent 543e702e99004f12625b4a09b97018d80240a358
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 29 Jul 2026 21:09:10 -0400

Attach the two-signals doc to the function that implements it

The refactor into a pure decision function left the doc block explaining
both signals sitting above evaluateTranscriptionActivity while still
reading as if it documented transcriptionActivity, with a second comment
glued to its last line.

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

Diffstat:
Mcommon/controller/digestYield.ts | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/common/controller/digestYield.ts b/common/controller/digestYield.ts @@ -60,7 +60,10 @@ export function workerContendsForGpu( return w.device?.trim().toLowerCase() !== "cpu"; } -// Is the local transcription lane using the GPU right now? +// Is the local transcription lane using the GPU right now? The whole decision, as +// a PURE function of the two signals — so both directions of the CPU-worker fix can +// be asserted without a live pool, a live registry or a GPU. transcriptionActivity() +// below is the thin I/O wrapper that feeds it. // // Two signals, because one alone leaves a hole: // - a busy LOCAL worker on a GPU device is the transcription engine actually @@ -83,9 +86,6 @@ export function workerContendsForGpu( // is loading a model onto the GPU, this reports not-busy and one digest chunk may // overlap it. A yield is not a lock — an in-flight generation was never // interrupted either — and the alternative reinstates the bug. -// The whole decision, as a pure function of the two signals — so both directions -// of the CPU-worker fix can be asserted without a live pool, a live registry or a -// GPU. transcriptionActivity() below is the thin I/O wrapper that feeds it. export function evaluateTranscriptionActivity(opts: { workers: readonly Pick<WorkerSummary, "busy" | "kind" | "device">[]; transcriptionJobRunning: boolean; @@ -104,6 +104,8 @@ export function evaluateTranscriptionActivity(opts: { return { busy: false, reason: null }; } +// The I/O wrapper the digest batch actually calls: read the live pool, the live +// registry and the setting, then hand them to the pure decision above. export function transcriptionActivity(): TranscriptionActivity { // Read once: a setting flipping mid-scan would produce an answer that matches // neither configuration.