Archilyzer · Source

archilyzer

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

commit 4af664ce7cbd7495a5f6eb1c25fead860df129c5
parent 8755dcb087111810edaa4f40ea245fa47d77841a
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue,  6 Oct 2026 11:27:32 -0400

editor: the publish lane's runner starts at boot (below the idle gate); Retry re-enqueues a publish stage from its spec

- instrumentation.ts: startPublishRunnerIfEnabled beside the auto-queue
  runners, below the idle-boot gate (the dispatch layer may not import the
  publish layer, so not inside startAutoRunnersIfEnabled)
- jobReplayRegistry.ts: the seven publish-* kinds re-enqueue the stage the
  spec carries (same run id, same preconditions), through enqueueStage

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/app/jobs/jobReplayRegistry.ts | 20++++++++++++++++++++
Meditor/instrumentation.ts | 13+++++++++++++
2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/editor/app/jobs/jobReplayRegistry.ts b/editor/app/jobs/jobReplayRegistry.ts @@ -56,6 +56,10 @@ import { import { replayFetchWindowAction } from "../channels/[slug]/videos/[id]/videoActions"; import { reportsPrepareAction } from "../sites/lib/reportsPrepareAction"; import { reportsExportAction } from "../sites/lib/reportsExportAction"; +import { + enqueueStage, + stageRequestFromSpec, +} from "yt-dlp-transcript-common/publish/publishStages"; export type ReplayHandler = (spec: JobSpec) => Promise<StreamActionResult>; @@ -90,7 +94,23 @@ function params(spec: JobSpec): { return { p, queueKey: str(p.queueKey) }; } +// A PUBLISH STAGE (release 18): the spec IS the stage request, so a retry +// re-enqueues it as it was — same run id, same preconditions, which the child +// re-asks on disk. A spec the stage row would refuse is refused here. +const replayPublishStage: ReplayHandler = async (spec) => { + const req = stageRequestFromSpec(spec); + if (!req) return { ok: false, error: `Not a publish stage this editor can re-run (${spec.kind} ${spec.slug})` }; + return enqueueStage(getPaths(), req); +}; + export const JOB_REPLAY_HANDLERS: Record<string, ReplayHandler> = { + "publish-update-index": replayPublishStage, + "publish-build-site": replayPublishStage, + "publish-deploy-site": replayPublishStage, + "publish-build-hub": replayPublishStage, + "publish-deploy-hub": replayPublishStage, + "publish-build-homepage": replayPublishStage, + "publish-deploy-homepage": replayPublishStage, // A report site's evidence media. The spec's slug is the SITE (the job has // no channel); a re-run re-reads the site's reports and cuts only what its // cache does not already hold. diff --git a/editor/instrumentation.ts b/editor/instrumentation.ts @@ -223,6 +223,19 @@ export async function register() { /* a runner that fails to start must not block server readiness */ } + // THE PUBLISH LANE (release 18): its runner, when settings.publish.enabled. + // Beside the four above rather than inside startAutoRunnersIfEnabled — the + // dispatch layer may not import the publish layer — and, like them, below + // the idle gate: an idle boot leaves it off. + try { + const { startPublishRunnerIfEnabled } = await import( + "yt-dlp-transcript-common/publish/publishRunner" + ); + await startPublishRunnerIfEnabled(); + } catch { + /* a runner that fails to start must not block server readiness */ + } + // NO SECOND RESUME HOOK. There used to be two more here, one per sweep, and // each re-launched a corpus-wide pass from its own persisted flag. Both lanes // are runner lanes now, so `startAutoRunnersIfEnabled` above resumes all four