commit aaaf0919c9f81766944094e69070f73061fe36c3
parent 06215ddebc1f379c3ae1311d2c280d08740ed254
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 7 Sep 2026 20:38:06 -0400
common: the projection's old half-rules go with the rule they served
Two dead things left by the two commits before this one, removed before the
suite runs over them rather than after.
`operationsNamedBy` had one caller — the 1.1 projection, which intersected what
a lane DISPATCHES with what its tree NAMES to keep the cost at zero while
nothing dispatched off it. The projection is the dispatch set now, so the
intersection is gone and so is the helper; the comment above `laneOperationIds`
already records why it was there and why it could not stay.
`RunOperationUnitOptions.plan` was a field nothing set. Worse than unused: it
offered a caller a way to hand `runOperationUnit` a classification made
earlier, which is the one thing this executor must never accept — the pull and
the run are separated by however long the pool held us, and re-deriving from
disk on every pull is the invariant rather than an optimisation to be skipped.
The note in its place says so.
Also: `openOperationRun` asks `digestLaneFor(chunking.app.lane)` whether the
lane can share a duplicate's output, rather than `laneForOperation` plus a
fabricated fallback lane for the case the registry does not answer. Same answer
— both digest queue keys share — off the engine this run actually resolved.
tsc clean in six packages, common 896, mcp 205, numbers diff empty.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat:
2 files changed, 13 insertions(+), 21 deletions(-)
diff --git a/common/controller/autoRunner.ts b/common/controller/autoRunner.ts
@@ -321,16 +321,6 @@ async function buildChannelWork(
return { channels, owner };
}
-// Every operation id named by a leaf anywhere in the tree, deduped. Drives the
-// projection above, so an operation costs nothing until a rule asks for it.
-export function operationsNamedBy(root: AutoQueueGroup): string[] {
- const out = new Set<string>();
- for (const leaf of flattenLeaves(root)) {
- if (leaf.match.operation) out.add(leaf.match.operation);
- }
- return [...out];
-}
-
// WHAT THIS LANE MAY PROJECT: the operations the lane actually dispatches, and
// nothing else.
//
diff --git a/common/controller/operationBatch.ts b/common/controller/operationBatch.ts
@@ -45,6 +45,7 @@ import { readVideoFiles, CUES_JSON_FILENAME } from "../lib/videoStatus";
import {
DIGEST_OPERATION_ID,
addOperationState,
+ digestLaneFor,
emptyOperationCounts,
laneYieldsToTranscription,
operationsForLane,
@@ -636,23 +637,22 @@ export async function openOperationRun(
if (opts.lane === "digest") {
const laneChoice = opts.digestLane ?? "local";
+ const chunking = resolveDigestChunking({ lane: laneChoice });
// WHETHER A LANE CAN SHARE A DUPLICATE'S OUTPUT IS DECLARED, not assumed
// from the fact that this is the digest branch. A chapter list is about what
// was SAID, so an aligned mirror gets the canonical member's digest for free
// (~11% of the sweep); diarization and attribution are grounded in one audio
- // track and one set of cue timings and can share nothing. An explicit
- // `useClusters: false` still wins — this is the default, not a lock.
+ // track and one set of cue timings and can share nothing. Asking the rule is
+ // what lets a dispatcher that does not know which operation it is holding
+ // get this right. An explicit `useClusters: false` still wins — this is the
+ // default, not a lock.
const sharesDuplicates = laneSharesDuplicates(
- laneForOperation(DIGEST_OPERATION_ID) ?? {
- queueKey: "",
- contendsFor: "cpu",
- },
+ digestLaneFor(chunking.app.lane),
);
const clusterPlan =
opts.useClusters === false || !sharesDuplicates
? null
: (opts.clusterPlan ?? (await buildDigestClusterPlan(opts.paths)));
- const chunking = resolveDigestChunking({ lane: laneChoice });
run.digest = {
laneChoice,
sections: opts.sections,
@@ -932,10 +932,12 @@ export type RunOperationUnitOptions = {
// The run's own hard-cancel signal, distinct from the per-item one: an abort
// on either must propagate rather than being counted as a failure.
runSignal?: AbortSignal;
- // A plan already made by the caller's pull. Omitted → classified here.
- // Supplying it does NOT skip the re-derivation: the pull and the run are
- // separated by however long the pool held us, so this is re-asked either way.
- plan?: OperationUnitPlan;
+ // NOTE: there is deliberately NO "plan already made by the caller's pull"
+ // option. Both callers classify before dispatching — the batch to keep a
+ // non-dispatch off a pool slot, the runner to choose WHICH operation a video
+ // needs — and this re-asks anyway: the pull and the run are separated by
+ // however long the pool held us, and re-deriving from disk on every pull is
+ // the invariant, not an optimisation to be handed a cached answer.
};
// RUN ONE UNIT OF ONE OPERATION ON ONE VIDEO — the whole of it, whichever lane