Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat([issue-1514]): thread autopilot run provider as a soft default across all stage calls
[._.]/ Adam Eivy9c4107d2fdbd
diff --git a/server/services/pipeline/arcPlanner/arcCore.js b/server/services/pipeline/arcPlanner/arcCore.jsindex 5c0d03ea18..f4973a5d14 100644--- a/server/services/pipeline/arcPlanner/arcCore.js+++ b/server/services/pipeline/arcPlanner/arcCore.js@@ -32,6 +32,7 @@ export async function generateArcOverview(seriesId, options = {}) {ctx,{providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,returnsJson: true,source: 'pipeline-arc-overview',@@ -94,6 +95,7 @@ export async function generateReaderMap(seriesId, options = {}) {ctx,{providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,returnsJson: true,source: 'story-builder-reader-map',@@ -248,6 +250,7 @@ export async function verifyArc(seriesId, options = {}) {ctx,{providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,returnsJson: true,source: 'pipeline-arc-verify',@@ -310,6 +313,7 @@ export async function verifyVolume(seriesId, seasonId, options = {}) {ctx,{providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,returnsJson: true,source: 'pipeline-volume-verify',@@ -362,6 +366,7 @@ export async function resolveVerifyIssues(seriesId, options = {}) {ctx,{providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,returnsJson: true,source: 'pipeline-arc-resolve',diff --git a/server/services/pipeline/arcPlanner/beatContinuity.js b/server/services/pipeline/arcPlanner/beatContinuity.jsindex c9a42bf1de..b34f7ee8c6 100644--- a/server/services/pipeline/arcPlanner/beatContinuity.js+++ b/server/services/pipeline/arcPlanner/beatContinuity.js@@ -72,6 +72,7 @@ export async function analyzeBeatContinuity(seriesId, options = {}) {ctx,{providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,returnsJson: true,source: 'pipeline-beat-continuity',@@ -115,6 +116,7 @@ export async function resolveBeatContinuity(seriesId, options = {}) {ctx,{providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,returnsJson: true,source: 'pipeline-beat-continuity-resolve',diff --git a/server/services/pipeline/arcPlanner/completenessPass.js b/server/services/pipeline/arcPlanner/completenessPass.jsindex 501fe0c113..ac744dd7f5 100644--- a/server/services/pipeline/arcPlanner/completenessPass.js+++ b/server/services/pipeline/arcPlanner/completenessPass.js@@ -222,6 +222,7 @@ export async function analyzeManuscriptCompleteness(seriesId, options = {}) {const baseCtx = await buildCompletenessContext(series, '', options.preloadedWorld);const { contextWindow } = await resolveStageContext(COMPLETENESS_STAGE, {providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,});const outputReserveTokens = withEdits@@ -262,6 +263,7 @@ export async function analyzeManuscriptCompleteness(seriesId, options = {}) {const runOne = (manuscript) => runStagedLLM(COMPLETENESS_STAGE, { ...fittedBaseCtx, manuscript, withEdits }, {providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,returnsJson: true,source: 'pipeline-manuscript-completeness',diff --git a/server/services/pipeline/arcPlanner/episodeSeedPass.js b/server/services/pipeline/arcPlanner/episodeSeedPass.jsindex 6e1f8a6702..c6ae904dd2 100644--- a/server/services/pipeline/arcPlanner/episodeSeedPass.js+++ b/server/services/pipeline/arcPlanner/episodeSeedPass.js@@ -158,6 +158,7 @@ export async function generateSeasonEpisodes(seriesId, seasonId, options = {}) {ctx,{providerOverride: options.providerOverride,+ providerDefault: options.providerDefault,modelOverride: options.modelOverride,returnsJson: true,source: 'pipeline-season-episodes',diff --git a/server/services/pipeline/editorial/checkRunner.js b/server/services/pipeline/editorial/checkRunner.jsindex 01b3a8445a..1e35825f8e 100644--- a/server/services/pipeline/editorial/checkRunner.js+++ b/server/services/pipeline/editorial/checkRunner.js@@ -306,7 +306,7 @@ const EDITORIAL_OUTPUT_RESERVE_TOKENS = 2_000;* @returns {Promise<{ runId, findings, perCheck, canceled }>}*/export async function runEditorialChecks(seriesId, options = {}) {- const { checkIds = null, providerOverride, modelOverride, signal, onProgress } = options;+ const { checkIds = null, providerOverride, providerDefault, modelOverride, signal, onProgress } = options;const settings = options.settings || await getSettings();const enabled = getEnabledChecks(settings, checkIds);@@ -398,6 +398,7 @@ export async function runEditorialChecks(seriesId, options = {}) {storyboardScenes,canon,providerOverride,+ providerDefault,modelOverride,// The run's AbortSignal, so a multi-chunk LLM check can stop launching// further chunk calls mid-run (the runner only checks it before/after each@@ -406,19 +407,19 @@ export async function runEditorialChecks(seriesId, options = {}) {// Injected LLM caller — keeps server/lib/editorial pure. Forwards the// provider/model overrides so an LLM check honors the autopilot's choice.callStagedLLM: (stage, vars, opts = {}) =>- runStagedLLM(stage, vars, { providerOverride, modelOverride, ...opts }),+ runStagedLLM(stage, vars, { providerOverride, providerDefault, modelOverride, ...opts }),// Injected inline-prompt caller for user-defined checks (#1346) whose prompt// body is authored from the UI (no shipped stage template). Same provider/// model overrides as callStagedLLM so a custom check honors the run's choice.callInlineLLM: (prompt, opts = {}) =>- runInlineLLM(prompt, { providerOverride, modelOverride, ...opts }),+ runInlineLLM(prompt, { providerOverride, providerDefault, modelOverride, ...opts }),// Inline-prompt caller that resolves the provider/model from a NAMED STAGE's// pin (#1403). The cross-chunk setup-summary call rides alongside a stage-// pinned manuscript check, so it must run on the SAME provider as that stage —// routing it through the active provider (plain callInlineLLM) could leak// manuscript text to a different (e.g. cloud) provider than the stage chose.callStageScopedInlineLLM: (stage, prompt, opts = {}) =>- runStageScopedInlineLLM(stage, prompt, { providerOverride, modelOverride, ...opts }),+ runStageScopedInlineLLM(stage, prompt, { providerOverride, providerDefault, modelOverride, ...opts }),// Injected manuscript chunker — plans the stitched manuscript into chunks// sized to `stage`'s resolved provider context window (reusing the same// budgeter as the completeness pass), so a long series is fully reviewed@@ -440,7 +441,7 @@ export async function runEditorialChecks(seriesId, options = {}) {// returned array as `.context` so the check feeds the trimmed values to the LLM.planManuscriptChunks: async (stage, { overheadTokens = 0, context = null, fixedOverheadTokens = 0 } = {}) => {if (!sections.length) return [];- const { contextWindow } = await resolveStageContext(stage, { providerOverride, modelOverride });+ const { contextWindow } = await resolveStageContext(stage, { providerOverride, providerDefault, modelOverride });let effectiveOverhead = overheadTokens;let fittedContext = null;if (context && typeof context === 'object') {diff --git a/server/services/pipeline/editorial/checkRunner.test.js b/server/services/pipeline/editorial/checkRunner.test.jsindex 9f6266464d..90281e9231 100644--- a/server/services/pipeline/editorial/checkRunner.test.js+++ b/server/services/pipeline/editorial/checkRunner.test.js@@ -159,6 +159,23 @@ describe('runEditorialChecks', () => {expect(result.findings.every((f) => f.checkId === 'naming.dissimilar-names')).toBe(true);});+ // #1514: Series Autopilot's run provider arrives as a SOFT providerDefault so a+ // per-stage pin still wins for an LLM check; a manual route override stays a HARD+ // providerOverride. The LLM check (prose.info-dumping) routes through callStagedLLM.+ it('threads providerDefault (autopilot run provider) into LLM checks as a soft default', async () => {+ await runEditorialChecks('s1', { checkIds: ['prose.info-dumping'], providerDefault: 'codex' });+ const opts = runStagedLLM.mock.calls[0][2];+ expect(opts.providerDefault).toBe('codex');+ expect(opts.providerOverride).toBeUndefined();+ });++ it('threads a manual providerOverride into LLM checks as a hard override', async () => {+ await runEditorialChecks('s1', { checkIds: ['prose.info-dumping'], providerOverride: 'ollama' });+ const opts = runStagedLLM.mock.calls[0][2];+ expect(opts.providerOverride).toBe('ollama');+ expect(opts.providerDefault).toBeUndefined();+ });+it('skips manuscript collection when no enabled check needs it', async () => {// Only the deterministic naming check (no needsManuscript) → no section I/O.await runEditorialChecks('s1', { checkIds: ['naming.dissimilar-names'] });diff --git a/server/services/pipeline/manuscriptFix.js b/server/services/pipeline/manuscriptFix.jsindex 2b49558467..1d5ed6db22 100644--- a/server/services/pipeline/manuscriptFix.js+++ b/server/services/pipeline/manuscriptFix.js@@ -458,7 +458,7 @@ function mergeFixes(fixes) {return fixFromEdits(edits);}-export async function generateManuscriptFix(seriesId, { commentId, providerOverride, modelOverride } = {}) {+export async function generateManuscriptFix(seriesId, { commentId, providerOverride, providerDefault, modelOverride } = {}) {const series = await getSeries(seriesId);const comment = await getComment(seriesId, commentId);if (!comment) throw makeErr(`Comment not found: ${commentId}`, ERR_NOT_FOUND);@@ -501,6 +501,7 @@ export async function generateManuscriptFix(seriesId, { commentId, providerOverr});const runChunk = (sections) => runStagedLLM(FIX_STAGE, buildCtx(sections), {providerOverride,+ providerDefault,modelOverride,returnsJson: true,source: 'pipeline-manuscript-fix',@@ -510,7 +511,7 @@ export async function generateManuscriptFix(seriesId, { commentId, providerOverr// across the whole book — so we keep it whole when it fits the model's// window, and only chunk by issue (degrading the holistic view) when it// can't. Single-issue comments are always one section → always whole.- const { contextWindow } = await resolveStageContext(FIX_STAGE, { providerOverride, modelOverride });+ const { contextWindow } = await resolveStageContext(FIX_STAGE, { providerOverride, providerDefault, modelOverride });const overheadTokens = estimateTokens(JSON.stringify(baseCtx)) + 2_000;const plan = planManuscriptPass({contextWindow,diff --git a/server/services/pipeline/reverseOutline.js b/server/services/pipeline/reverseOutline.jsindex 8b8fe99362..903887daba 100644--- a/server/services/pipeline/reverseOutline.js+++ b/server/services/pipeline/reverseOutline.js@@ -226,11 +226,14 @@ async function buildManuscriptCorpus(seriesId) {** @param {string} seriesId* @param {object} [options]- * - providerId / model — forwarded to the LLM stage (autopilot/manual override)+ * - providerId / model — explicit HARD provider/model (manual route override)+ * - providerIdDefault — Series Autopilot's run provider as a SOFT default+ * (#1349/#1514): loses to a per-stage pin and soft-falls-through to active+ * when unavailable, unlike the hard providerId* - force — re-segment even when the manuscript hash is unchanged* - signal — AbortSignal checked before the persist*/-export async function generateReverseOutline(seriesId, { providerId, model, force = false, signal } = {}) {+export async function generateReverseOutline(seriesId, { providerId, providerIdDefault, model, force = false, signal } = {}) {assertValidSeriesId(seriesId);const { corpus, byNumber } = await buildManuscriptCorpus(seriesId);if (!corpus.trim()) return { seriesId, status: 'no-content' };@@ -248,7 +251,7 @@ export async function generateReverseOutline(seriesId, { providerId, model, forc// Scale the content cap to the model's context window, reserving a manuscript// floor so a small/local provider window trims the corpus to fit rather than// overflowing on a fixed 60K floor (#1488); a big window scales up.- const { contextWindow } = await resolveStageContext(STAGE, { providerOverride: providerId, modelOverride: model });+ const { contextWindow } = await resolveStageContext(STAGE, { providerOverride: providerId, providerDefault: providerIdDefault, modelOverride: model });const overheadTokens = 1_500 + estimateTokens([series?.name || '', series?.styleNotes || '', characterNames.join(', ')].join(' '));const contentMax = manuscriptContentBudgetChars({contextWindow,@@ -268,6 +271,7 @@ export async function generateReverseOutline(seriesId, { providerId, model, forcconst result = await runStagedLLM(STAGE, vars, {returnsJson: true,providerOverride: providerId,+ providerDefault: providerIdDefault,modelOverride: model,source: 'pipeline-reverse-outline',});diff --git a/server/services/pipeline/reverseOutline.test.js b/server/services/pipeline/reverseOutline.test.jsindex 3697fa7bdb..66fa74fc3f 100644--- a/server/services/pipeline/reverseOutline.test.js+++ b/server/services/pipeline/reverseOutline.test.js@@ -12,8 +12,8 @@ vi.mock('../../lib/fileUtils.js', () => ({const llmQueue = [];const llmCalls = [];vi.mock('../../lib/stageRunner.js', () => ({- runStagedLLM: vi.fn(async (stage, vars) => {- llmCalls.push({ stage, vars });+ runStagedLLM: vi.fn(async (stage, vars, opts = {}) => {+ llmCalls.push({ stage, vars, opts });const content = llmQueue.shift();return { content, model: 'mock-model', providerId: 'mock-provider', runId: 'run-1' };}),@@ -129,6 +129,23 @@ describe('generateReverseOutline', () => {await svc.generateReverseOutline(SERIES_ID, { force: true });expect(llmCalls).toHaveLength(2);});++ // #1514: Series Autopilot's run provider threads through as providerIdDefault →+ // a SOFT providerDefault, so a per-stage pin still wins; a manual route override+ // (providerId) stays a HARD providerOverride.+ it('threads providerIdDefault as a soft providerDefault (autopilot run provider)', async () => {+ llmQueue.push(cannedOutline());+ await svc.generateReverseOutline(SERIES_ID, { providerIdDefault: 'codex' });+ expect(llmCalls[0].opts.providerDefault).toBe('codex');+ expect(llmCalls[0].opts.providerOverride).toBeUndefined();+ });++ it('threads a manual providerId as a hard providerOverride (route override)', async () => {+ llmQueue.push(cannedOutline());+ await svc.generateReverseOutline(SERIES_ID, { providerId: 'ollama' });+ expect(llmCalls[0].opts.providerOverride).toBe('ollama');+ expect(llmCalls[0].opts.providerDefault).toBeUndefined();+ });});describe('getReverseOutline + staleness', () => {diff --git a/server/services/pipeline/scriptVerify.js b/server/services/pipeline/scriptVerify.jsindex 5fdc6583c6..c7818fb463 100644--- a/server/services/pipeline/scriptVerify.js+++ b/server/services/pipeline/scriptVerify.js@@ -192,12 +192,15 @@ function mergeVerifyIssues(first, second) {* `{ issues:[{severity,location,problem,suggestion}], raw, runId, providerId,* model }`, or `{ issues: [], skipped }` when there's no comic script to check.*/-// `providerId` here is Series Autopilot's blanket run provider, NOT a per-call-// demand for this specific stage — so it's threaded as a `providerDefault`. That-// lets a deliberate `pipeline-script-verify` provider pin (Prompts page) win,-// e.g. running the craft pass on Codex while the rest of the run uses another-// provider, while an unpinned stage still follows the run's chosen provider.-export async function verifyComicScript(issueId, { providerId, model } = {}) {+// `providerIdDefault` here is Series Autopilot's blanket run provider, NOT a+// per-call demand for this specific stage — so it's threaded as a+// `providerDefault`. That lets a deliberate `pipeline-script-verify` provider+// pin (Prompts page) win, e.g. running the craft pass on Codex while the rest+// of the run uses another provider, while an unpinned stage still follows the+// run's chosen provider. (Autopilot is the only caller; #1514 renamed the field+// from `providerId` to match the soft-default channel used by every other+// autopilot-driven stage.)+export async function verifyComicScript(issueId, { providerIdDefault, model } = {}) {const issue = await getIssue(issueId);const script = (issue.stages?.comicScript?.output || '').trim();if (!script) return { issues: [], skipped: 'no-comic-script' };@@ -209,7 +212,7 @@ export async function verifyComicScript(issueId, { providerId, model } = {}) {// manuscript floor so a small/local provider window trims the script to fit// rather than overflowing on a fixed 48K floor (#1488); a big-context model gets// the whole script.- const { contextWindow } = await resolveStageContext(STAGE, { providerDefault: providerId, modelOverride: model });+ const { contextWindow } = await resolveStageContext(STAGE, { providerDefault: providerIdDefault, modelOverride: model });const overheadTokens = 1_200 + estimateTokens([series?.name, series?.logline, issue.title].filter(Boolean).join(' '));const contentMax = manuscriptContentBudgetChars({contextWindow,@@ -228,7 +231,7 @@ export async function verifyComicScript(issueId, { providerId, model } = {}) {const { content: parsed, runId, providerId: pid, model: m } = await runStagedLLM(STAGE, ctx, {returnsJson: true,- providerDefault: providerId,+ providerDefault: providerIdDefault,modelOverride: model,source: 'pipeline-script-verify',});diff --git a/server/services/pipeline/seriesAutopilot.js b/server/services/pipeline/seriesAutopilot.jsindex 9dfd846525..eae2326a2d 100644--- a/server/services/pipeline/seriesAutopilot.js+++ b/server/services/pipeline/seriesAutopilot.js@@ -481,9 +481,6 @@ async function persistMarker(seriesId, patch) {});}-// Two override shapes because the delegated services disagree on field names:-// the arc/episode/verify passes take { providerOverride, modelOverride }; the-// child runners (volumeBeatsRunner, autoRunner) take { providerId, model }.// File a CoS task for a capability/quality gap the autopilot can't resolve on// its own (a script that won't parse, a render that keeps failing, a stalled// verify, a run-ending error). Opt-in via `options.fileGaps`; never fires in@@ -502,12 +499,26 @@ async function fileGap(record, sId, { gapKind, issueId = null, summary, context}}+// Series Autopilot threads its run provider as a SOFT default, NOT a hard+// override — so a deliberate per-stage pin (Prompts page / stage-config.json)+// still wins for that stage, matching what verifyComicScript already does+// (#1514). The run provider lands on stageRunner's `providerDefault` channel+// (tier 3): it applies only to UNPINNED stages and soft-falls-through to the+// active provider when unavailable, rather than throwing+// PROVIDER_OVERRIDE_UNAVAILABLE the way a tier-1 override would.+//+// Two shapes because the delegated services disagree on field names: the+// arc/episode/verify passes take `providerDefault`/`modelOverride`; the child+// runners (volumeBeatsRunner, autoRunner) and the `providerId`-style services+// take `providerIdDefault`/`model`. Each maps its incoming default to+// stageRunner's `providerDefault` at the leaf call while keeping its existing+// hard `providerOverride`/`providerId` param untouched for manual route callers.const providerOverrideOpts = (record) => ({- providerOverride: record.options.providerOverride,+ providerDefault: record.options.providerOverride,modelOverride: record.options.modelOverride,});const providerIdOpts = (record) => ({- providerId: record.options.providerOverride,+ providerIdDefault: record.options.providerOverride,model: record.options.modelOverride,});@@ -1434,4 +1445,4 @@ export async function recoverStuckAutopilots() {}// Export internals for tests.-export const __testing = { runs, buildDryRunPlan };+export const __testing = { runs, buildDryRunPlan, providerOverrideOpts, providerIdOpts };diff --git a/server/services/pipeline/seriesAutopilot.test.js b/server/services/pipeline/seriesAutopilot.test.jsindex 4cfbd86840..10ab0a11b4 100644--- a/server/services/pipeline/seriesAutopilot.test.js+++ b/server/services/pipeline/seriesAutopilot.test.js@@ -181,6 +181,34 @@ beforeEach(() => {// ---------------------------------------------------------------------------// Pure resolver — the highest-value unit (no I/O, table-driven).// ---------------------------------------------------------------------------+describe('provider threading helpers (#1514 — run provider is a SOFT default)', () => {+ const record = { options: { providerOverride: 'codex', modelOverride: 'gpt-x' } };++ it('providerOverrideOpts emits providerDefault (NOT a hard providerOverride) so a stage pin still wins', () => {+ const opts = autopilot.__testing.providerOverrideOpts(record);+ expect(opts.providerDefault).toBe('codex');+ expect(opts.modelOverride).toBe('gpt-x');+ // The whole point of the change: the run provider must NOT arrive as a hard+ // tier-1 override, or it would beat a deliberate per-stage pin.+ expect(opts).not.toHaveProperty('providerOverride');+ expect(opts).not.toHaveProperty('providerId');+ });++ it('providerIdOpts emits providerIdDefault for the { providerId }-style services', () => {+ const opts = autopilot.__testing.providerIdOpts(record);+ expect(opts.providerIdDefault).toBe('codex');+ expect(opts.model).toBe('gpt-x');+ expect(opts).not.toHaveProperty('providerId');+ expect(opts).not.toHaveProperty('providerOverride');+ });++ it('passes an undefined default through untouched when the run pins no provider', () => {+ const none = { options: {} };+ expect(autopilot.__testing.providerOverrideOpts(none).providerDefault).toBeUndefined();+ expect(autopilot.__testing.providerIdOpts(none).providerIdDefault).toBeUndefined();+ });+});+describe('resolveNextStep (pure)', () => {const comic = { targetFormat: 'comic', arc: { logline: 'L', summary: 'S' }, seasons: [{ id: 'se1', number: 1 }] };const issue = (over = {}) => ({ id: 'iss1', seasonId: 'se1', number: 1, arcPosition: 1, stages: {}, ...over });diff --git a/server/services/pipeline/textStages.js b/server/services/pipeline/textStages.jsindex 24b65f49c6..4c5c9868c5 100644--- a/server/services/pipeline/textStages.js+++ b/server/services/pipeline/textStages.js@@ -495,6 +495,11 @@ export async function generateStage(issueId, stageId, options = {}) {try {result = await runStagedLLM(template, ctx, {providerOverride: options.providerId,+ // Soft run-level default (Series Autopilot, #1514): unlike providerId it+ // loses to a per-stage pin and soft-falls-through to active when+ // unavailable. Route callers pass providerId (hard); autopilot passes+ // providerIdDefault (soft).+ providerDefault: options.providerIdDefault,modelOverride: options.model,source: 'pipeline-text-stage',});diff --git a/server/services/pipeline/textStages.test.js b/server/services/pipeline/textStages.test.jsindex 7feee36fd7..7839ed1ae2 100644--- a/server/services/pipeline/textStages.test.js+++ b/server/services/pipeline/textStages.test.js@@ -109,6 +109,25 @@ describe('pipeline text stage generator', () => {expect(llmCalls[0].prompt).toContain('RENDERED:pipeline-idea-expansion');});+ // #1514: the autopilot threads its run provider as a SOFT providerIdDefault, the+ // manual route as a HARD providerId. These run against the REAL stageRunner, so+ // they prove the end-to-end resolution: an unavailable soft default falls through+ // to the active provider (no throw), while an unavailable hard override throws.+ it('soft-falls-through to the active provider when an autopilot providerIdDefault is unavailable', async () => {+ const { issue } = await seed();+ // No stage pin (getStage → null) and 'gone-provider' resolves to null, so a+ // SOFT default must drop to the active provider rather than throwing.+ const result = await textStages.generateStage(issue.id, 'idea', { providerIdDefault: 'gone-provider' });+ expect(result.stage.status).toBe('ready');+ expect(llmCalls[0].provider).toBe('mock-provider'); // active provider used+ });++ it('throws when a manual hard providerId is unavailable (override is a per-call demand)', async () => {+ const { issue } = await seed();+ await expect(textStages.generateStage(issue.id, 'idea', { providerId: 'gone-provider' }))+ .rejects.toMatchObject({ code: 'PROVIDER_OVERRIDE_UNAVAILABLE' });+ });+it('folds the structured style guide into series.styleNotes in the prompt context', async () => {const series = await seriesSvc.createSeries({name: 'Salt Run',diff --git a/server/services/pipeline/volumeBeatsRunner.js b/server/services/pipeline/volumeBeatsRunner.jsindex 23174f7f6a..7b817a3485 100644--- a/server/services/pipeline/volumeBeatsRunner.js+++ b/server/services/pipeline/volumeBeatsRunner.js@@ -125,6 +125,9 @@ export async function startVolumeBeatsRun(seriesId, seasonId, options = {}) {try {const { stage, runId: stageRunId } = await generateStage(issue.id, 'idea', {providerId: options.providerId,+ // Soft run-level default (Series Autopilot, #1514) — forwarded+ // alongside the hard providerId so a per-stage pin still wins.+ providerIdDefault: options.providerIdDefault,model: options.model,});generated += 1;