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
address review (codex): respect comicPages lock, dry-run plan parity for arc-only series
[._.]/ Adam Eivy194ec7ef3a31
diff --git a/server/services/pipeline/seriesAutopilot.js b/server/services/pipeline/seriesAutopilot.jsindex 07d4860ec6..f1b13681c6 100644--- a/server/services/pipeline/seriesAutopilot.js+++ b/server/services/pipeline/seriesAutopilot.js@@ -609,6 +609,14 @@ async function runVisualDraft(sId, issueId, record) {let issue = await getIssue(issueId);let cp = issue.stages?.comicPages;+ // Respect an explicit lock — the user froze this stage, so don't seed pages+ // or render. Skip (intentional, not a gap) and mark drafted so we don't loop.+ if (cp?.locked === true) {+ broadcast(sId, { type: 'step:skip', kind: 'visualDraft', issueId, reason: 'comicPages stage is locked — skipping draft render' });+ record.runState.visualDrafted.add(issueId);+ return {};+ }+// 1. Seed pages + cover concepts from the comic script if not already done// (mirrors the extract-pages route; pure parse, no LLM).if (!(Array.isArray(cp?.pages) && cp.pages.length > 0)) {@@ -804,7 +812,10 @@ function buildDryRunPlan(series, issues, options) {const plan = [];const ordered = orderedIssues(issues);const seasons = Array.isArray(series?.seasons) ? [...series.seasons].sort(byNumber) : [];- if (!series?.arc?.logline && !series?.arc?.summary) plan.push({ kind: 'generateArc', count: 1 });+ // Mirror the resolver: generateArc runs when arc text is missing OR there are+ // no volumes at all (an arc-only series), so a dry-run plan must show it too.+ const noArc = !series?.arc?.logline && !series?.arc?.summary;+ if (noArc || seasons.length === 0) plan.push({ kind: 'generateArc', count: 1 });const emptySeasons = seasons.filter((s) => !ordered.some((i) => i.seasonId === s.id));if (emptySeasons.length) plan.push({ kind: 'generateEpisodes', count: emptySeasons.length });plan.push({ kind: 'verifyArc', count: 1, note: `up to ${MAX_ARC_VERIFY_ROUNDS} rounds` });diff --git a/server/services/pipeline/seriesAutopilot.test.js b/server/services/pipeline/seriesAutopilot.test.jsindex e32b31c217..86e47dde26 100644--- a/server/services/pipeline/seriesAutopilot.test.js+++ b/server/services/pipeline/seriesAutopilot.test.js@@ -167,6 +167,13 @@ describe('resolveNextStep (pure)', () => {expect(resolveNextStep(arcOnly, [], { arcAttempted: true }).kind).not.toBe('generateArc');});+ it('dry-run plan includes generateArc for an arc-only series (parity with execute)', () => {+ const plan = autopilot.__testing.buildDryRunPlan(+ { targetFormat: 'comic', arc: { logline: 'L', summary: 'S' }, seasons: [] }, [], {},+ );+ expect(plan[0].kind).toBe('generateArc');+ });+it('asks to generate episodes for a season with no issues', () => {const step = resolveNextStep(comic, []);expect(step).toMatchObject({ kind: 'generateEpisodes', seasonId: 'se1' });@@ -505,6 +512,15 @@ describe('autopilot conductor', () => {expect(visualSpies.enqueueComicCover).not.toHaveBeenCalled();});+ it('skips visual draft for a locked comicPages stage (does not mutate it)', async () => {+ const { seriesId, issueId } = await seedComplete();+ await issuesSvc.updateStage(issueId, 'comicPages', { locked: true });+ await autopilot.startSeriesAutopilot(seriesId, { includeVisual: true });+ await waitFor(runFinished(seriesId));+ expect(autopilot.__testing.runs.get(seriesId)?.lastPayload?.type).toBe('complete');+ expect(visualSpies.enqueueComicCover).not.toHaveBeenCalled();+ });+it('does not render visuals when includeVisual is false', async () => {const { seriesId } = await seedComplete();await autopilot.startSeriesAutopilot(seriesId, { includeVisual: false });