Archilyzer · Source

archilyzer

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

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

Reflow the lines prettier disagreed with, and de-duplicate one comment

Only the three files my edits made newly unformatted; five others were
already unformatted at 62b4cfc and are left alone, since the repo does not
enforce prettier and reformatting them would be noise.

The digestPlan.ts header had ended up with two paragraphs stating the same
factoring with inconsistent 2.20/2.22 figures. Merged, and the residual is
now labelled as not-yet-attributable rather than as contention.

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

Diffstat:
Mcommon/controller/digestPlan.ts | 25+++++++++++++------------
Mcommon/controller/digestYield.test.ts | 15++++++++++++---
2 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/common/controller/digestPlan.ts b/common/controller/digestPlan.ts @@ -59,20 +59,18 @@ import { // // The 24.7 is recomputed from the validation run's OWN artifacts, not from its // report: 62.9 min of wall over the 153 chunks its 102 sidecars actually record in -// `provenance.chunks`. Its 3.33× "contention penalty" then factors as 1.49× sample -// length mix (3.63 chunks/audio-hour against round 2's 2.44) × 2.20× per-chunk -// cost = 3.27×. -// -// The old 27 → 90 s/audio-hour "contention penalty" factors exactly: 1.49× from -// the validation sample's length mix (3.63 vs 2.44 chunks/audio-hour) × 2.22× -// per-chunk cost = 3.30× against the observed 3.33×. So the honest range is ~25 -// days idle to ~55 contended — not 81. +// `provenance.chunks`. The old 27 → 90 s/audio-hour "contention penalty" then +// factors almost exactly — 1.49× sample length mix (3.63 chunks/audio-hour against +// round 2's 2.44) × 2.20× per-chunk cost = 3.27×, against the 3.33× observed. So +// the honest range is ~25 days idle to ~55 contended — not 81. // // The DEFAULT is the contended wall figure, deliberately: it is the only one // measured in production, on this corpus, with all the sidecar work a bake-off -// skips. It is pessimistic on an idle box by design. The 2.22× gap has three -// parts (idle engine, contended engine, and non-engine wall inflation from the -// yield gate's 3 s poll) which only a production run can separate. +// skips. It is pessimistic on an idle box by design. The 2.20× residual is NOT +// yet attributable to contention: it compares wall against engine time, so it also +// contains model-load, prefill, and the yield gate idling at its 3 s poll. Only a +// production run can separate those, which is why the optional load/prefill/decode +// fields on DigestRunResult exist. export const MEASURED_SECONDS_PER_CHUNK = 24.7; // Corpus-wide chunk density, from the free census over `statsByPath.cueCount` — @@ -473,7 +471,10 @@ export function sweepDaysFromAudio( // longest-first and its density drifts from 1.7 toward 6.8 as it drains, so a // running s/audio-hour will look like the projection is falling apart when it is // only reaching shorter videos. -export function chunksPerAudioHour(chunks: number, audioSeconds: number): number { +export function chunksPerAudioHour( + chunks: number, + audioSeconds: number, +): number { const h = audioHours(audioSeconds); return h > 0 ? chunks / h : 0; } diff --git a/common/controller/digestYield.test.ts b/common/controller/digestYield.test.ts @@ -29,11 +29,17 @@ test("only an explicit cpu device is non-contending", () => { // The fix: explicit "cpu" competes for zero GPU shaders. assert.equal(workerContendsForGpu(CPU_A, false), false); // Trimmed and case-folded: settings.json is hand-editable. - assert.equal(workerContendsForGpu({ ...CPU_A, device: " CPU " }, false), false); + assert.equal( + workerContendsForGpu({ ...CPU_A, device: " CPU " }, false), + false, + ); // A device we did not set is the engine binary's OWN default, which may be the // GPU. The unknown case must fail SAFE, i.e. still contend. assert.equal(workerContendsForGpu(GPU, false), true); - assert.equal(workerContendsForGpu({ kind: "local", device: "" }, false), true); + assert.equal( + workerContendsForGpu({ kind: "local", device: "" }, false), + true, + ); assert.equal(workerContendsForGpu(CUDA, false), true); // A remote worker runs on another machine and competes for nothing here. assert.equal(workerContendsForGpu(REMOTE, false), false); @@ -135,7 +141,10 @@ test("yieldToCpuWorkers defaults off; yieldToTranscription defaults on", () => { assert.equal(legacy.yieldToTranscription, true); // Explicit values survive, in both directions, for both fields. - assert.equal(sanitizeDigest({ yieldToCpuWorkers: true }).yieldToCpuWorkers, true); + assert.equal( + sanitizeDigest({ yieldToCpuWorkers: true }).yieldToCpuWorkers, + true, + ); assert.equal( sanitizeDigest({ yieldToCpuWorkers: false }).yieldToCpuWorkers, false,