Skip to content

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

fix: qualify autopilot "complete" when blocking script-craft gaps were filed (#1572)

[._.]/ Adam Eivy33ea26dd1dbf
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 3b365a4370..d75618e44c 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -115,6 +115,7 @@
## Fixed
+- **Series Autopilot no longer reports a "clean complete" while blocking comic-script gaps are still filed.** The advisory script-*craft* gate (empty dialogue / missing panel descriptions from `verifyComicScript`) files a CoS gap task per offending issue but never pauses the run — so a multi-issue series could silently accumulate gap tasks, report **complete — production-ready**, and only later pause when visual rendering hit the un-renderable panels. The terminal `complete` frame and the persisted autopilot marker now carry the count of issues that filed blocking craft gaps; when any were filed, the completion toast and the status banner switch to a caution — *"Completed with N filed script-craft gap(s) — resolve before rendering"* — instead of claiming the draft is production-ready. The craft gate stays advisory (the run still completes); the terminal state just stops hiding the work that remains. (`server/services/pipeline/seriesAutopilot.js`, `server/services/pipeline/series.js`, `client/src/components/pipeline/AutopilotPanel.jsx`)
- **The Local LLM installer no longer offers Ollama a sharded GGUF it can't pull.** Picking a large quant whose GGUF is split into parts (e.g. `unsloth/Qwen3-Coder-Next-GGUF:UD-Q8_K_XL`, ~80 GB across two files) failed with Ollama's raw `400: The specified tag is a sharded GGUF. Ollama does not support this yet.` ([ollama/ollama#5245](https://github.com/ollama/ollama/issues/5245)). The Hugging Face catalog already detected multi-part shards (it sums their sizes) but still presented them as Ollama-installable. Each variant now carries a `sharded` flag; on the Ollama backend a sharded quant is marked unsupported, the quant picker tags it `· sharded (not on Ollama)`, the **Install** button is disabled with the reason, and the RAM-aware default skips it so it never auto-selects a build that can't be pulled. LM Studio is unaffected — it loads sharded GGUFs natively, so the same quant stays installable there. As defense-in-depth for the pull-by-name path, an Ollama pull that hits the sharded-GGUF 400 is now tagged `code: SHARDED_GGUF` and surfaces an actionable toast ("pick a smaller single-file quant, or install on LM Studio") instead of the raw error. (`server/services/huggingFaceCatalog.js`, `server/services/ollamaManager.js`, `client/src/components/settings/LocalLlmTab.jsx`)
- **The `/do:next` Slashdo button now honors the app's Work Tracker.** Per-app Work Tracker (PLAN.md / GitHub / GitLab / JIRA) already routed the *scheduled* `claim-work` flow, but the manual `/do:next` button inlined the raw slashdo command body — which always drains PLAN.md unless `--issues` is passed. Clicking it for an app set to GitHub/GitLab/JIRA Issues silently worked the wrong queue. The button now resolves the app's Work Tracker and delegates to the same claim flow the scheduler uses (`plan-task` / `claim-issue` / `claim-issue-gitlab` / `claim-issue-jira`, via a shared `buildClaimWorkTask` router that also drives the scheduled path), each of which self-manages its own worktree + MR/PR. It also resolves the same configured `claim-work` metadata the scheduler does (global → per-app override → Code Review Defaults), so clicking it honors the app's `issueAuthorFilter` (e.g. claim any open issue, not just owner-filed) and configured reviewers instead of silently forcing owner-only + Copilot. The task description and button tooltip now read generically ("claim the next work item per this app's Work Tracker") instead of naming PLAN.md.
- **The GitHub Release workflow no longer crashes on a large changelog.** The v2.22.0 release (a ~175KB changelog) failed at the "Create Release" step with `Argument list too long`: the changelog was passed to `softprops/action-gh-release` as the `body:` input, which GitHub materializes as an `INPUT_BODY` environment variable, and a 175KB env var overflows `ARG_MAX` when the action's Node process is exec'd. The body also exceeds GitHub's hard 125,000-character release-note limit (a separate HTTP 422). The workflow now writes the (placeholder-substituted) changelog to a file and feeds it via `body_path:` instead of an env var, and caps it at 120,000 chars on a whole-line boundary — appending a pointer to the full changelog file at the tag when truncated. (`.github/workflows/release.yml`)
diff --git a/client/src/components/pipeline/AutopilotPanel.jsx b/client/src/components/pipeline/AutopilotPanel.jsx
index a9f06fdca1..852a8124f5 100644
--- a/client/src/components/pipeline/AutopilotPanel.jsx
+++ b/client/src/components/pipeline/AutopilotPanel.jsx
@@ -110,6 +110,10 @@ function frameLabel(f) {
const RUN_ENDED = new Set(['complete', 'canceled', 'error', 'paused']);
+// #1572 — shared caution tail for a `done` run that filed blocking script-craft
+// gaps, so the completion toast and the persisted-status banner can't drift.
+const craftGapCaution = (n) => `${n} filed script-craft gap${n === 1 ? '' : 's'} — resolve before rendering`;
+
function Findings({ items }) {
if (!items?.length) return null;
return (
@@ -242,7 +246,11 @@ export default function AutopilotPanel({ series, onSeriesUpdate, onIssuesUpdate
setActive(false);
getPipelineSeries(seriesId, { silent: true }).then((s) => { if (s) onSeriesUpdateRef.current?.(s); }).catch(() => null);
listPipelineIssues(seriesId, { silent: true }).then((is) => onIssuesUpdateRef.current?.(Array.isArray(is) ? is : [])).catch(() => null);
- if (latest.type === 'complete') toast.success(latest.dryRun ? 'Autopilot plan ready' : 'Autopilot complete — draft is production-ready');
+ if (latest.type === 'complete') {
+ if (latest.dryRun) toast.success('Autopilot plan ready');
+ else if (latest.craftGapIssues > 0) toast.warning(`Autopilot complete with ${craftGapCaution(latest.craftGapIssues)}`);
+ else toast.success('Autopilot complete — draft is production-ready');
+ }
else if (latest.type === 'canceled') toast.success('Autopilot canceled');
else if (latest.type === 'paused') toast.warning(`Autopilot paused — ${latest.reason || 'needs review'}`);
else toast.error(latest.error || 'Autopilot failed');
@@ -416,15 +424,23 @@ export default function AutopilotPanel({ series, onSeriesUpdate, onIssuesUpdate
</div>
) : null}
- {/* Persisted status banner (paused / done / error) */}
- {!active && ap && ap.status && ap.status !== 'idle' && ap.status !== 'running' ? (
- <div className={`px-3 pb-3 border-t pt-2 ${ap.status === 'paused' ? 'border-port-warning/30' : ap.status === 'error' ? 'border-port-error/30' : 'border-port-success/30'}`}>
+ {/* Persisted status banner (paused / done / error). A `done` run that
+ filed blocking script-craft gaps (#1572) is shown as a caution, not
+ "production-ready" — those gaps still block downstream rendering. */}
+ {!active && ap && ap.status && ap.status !== 'idle' && ap.status !== 'running' ? (() => {
+ const doneWithGaps = ap.status === 'done' && ap.craftGapIssues > 0;
+ const tone = ap.status === 'paused' || doneWithGaps ? 'warning' : ap.status === 'error' ? 'error' : 'success';
+ return (
+ <div className={`px-3 pb-3 border-t pt-2 ${tone === 'warning' ? 'border-port-warning/30' : tone === 'error' ? 'border-port-error/30' : 'border-port-success/30'}`}>
<div className="flex items-center gap-2 text-xs">
{ap.status === 'paused' ? <PauseCircle size={13} className="text-port-warning" />
- : ap.status === 'done' ? <CheckCircle2 size={13} className="text-port-success" />
- : <AlertCircle size={13} className="text-port-error" />}
- <span className={ap.status === 'paused' ? 'text-port-warning' : ap.status === 'done' ? 'text-port-success' : 'text-port-error'}>
- {ap.status === 'paused' ? (ap.currentStep ? `Paused at ${stepLabel(ap.currentStep)}` : 'Paused') : ap.status === 'done' ? 'Last run completed — draft is production-ready' : 'Last run errored'}
+ : doneWithGaps ? <AlertCircle size={13} className="text-port-warning" />
+ : ap.status === 'done' ? <CheckCircle2 size={13} className="text-port-success" />
+ : <AlertCircle size={13} className="text-port-error" />}
+ <span className={tone === 'warning' ? 'text-port-warning' : tone === 'success' ? 'text-port-success' : 'text-port-error'}>
+ {ap.status === 'paused' ? (ap.currentStep ? `Paused at ${stepLabel(ap.currentStep)}` : 'Paused')
+ : doneWithGaps ? `Completed with ${craftGapCaution(ap.craftGapIssues)}`
+ : ap.status === 'done' ? 'Last run completed — draft is production-ready' : 'Last run errored'}
</span>
{ap.status === 'paused' && ap.pauseKind === 'divergence' ? (
<span
@@ -438,7 +454,8 @@ export default function AutopilotPanel({ series, onSeriesUpdate, onIssuesUpdate
{ap.lastError && ap.status !== 'done' ? <p className="text-[11px] text-gray-400 mt-1">{ap.lastError}</p> : null}
<Findings items={ap.residualFindings} />
</div>
- ) : null}
+ );
+ })() : null}
{/* Production readiness (canon descriptive integrity) */}
<div className="px-3 pb-3 border-t border-port-border pt-2">
diff --git a/client/src/components/pipeline/AutopilotPanel.test.jsx b/client/src/components/pipeline/AutopilotPanel.test.jsx
index 3458ccf9ee..c7746bb667 100644
--- a/client/src/components/pipeline/AutopilotPanel.test.jsx
+++ b/client/src/components/pipeline/AutopilotPanel.test.jsx
@@ -150,6 +150,25 @@ describe('AutopilotPanel', () => {
expect(screen.queryByText(/not converging/i)).not.toBeInTheDocument();
});
+ it('shows the production-ready banner for a clean done marker', async () => {
+ renderPanel({ id: 's1', targetFormat: 'comic', autopilot: { status: 'done', craftGapIssues: 0 } });
+ await waitFor(() => expect(getPipelineAutopilotStatus).toHaveBeenCalled());
+ expect(screen.getByText(/draft is production-ready/i)).toBeInTheDocument();
+ });
+
+ it('qualifies a done marker that filed script-craft gaps as a caution (#1572)', async () => {
+ renderPanel({ id: 's1', targetFormat: 'comic', autopilot: { status: 'done', craftGapIssues: 2, craftGapFindings: 3 } });
+ await waitFor(() => expect(getPipelineAutopilotStatus).toHaveBeenCalled());
+ expect(screen.getByText(/Completed with 2 filed script-craft gaps — resolve before rendering/i)).toBeInTheDocument();
+ expect(screen.queryByText(/draft is production-ready/i)).not.toBeInTheDocument();
+ });
+
+ it('uses the singular gap label when exactly one craft gap was filed (#1572)', async () => {
+ renderPanel({ id: 's1', targetFormat: 'comic', autopilot: { status: 'done', craftGapIssues: 1, craftGapFindings: 1 } });
+ await waitFor(() => expect(getPipelineAutopilotStatus).toHaveBeenCalled());
+ expect(screen.getByText(/Completed with 1 filed script-craft gap —/i)).toBeInTheDocument();
+ });
+
it('ignores a stale terminal frame from a previous run when starting again', async () => {
startPipelineAutopilot.mockResolvedValue({ runId: 'B', mode: 'execute' });
sseLatest = { type: 'complete', runId: 'A' }; // leftover terminal frame from run A
diff --git a/server/services/pipeline/series.js b/server/services/pipeline/series.js
index 3a54bde36c..4997e66ea5 100644
--- a/server/services/pipeline/series.js
+++ b/server/services/pipeline/series.js
@@ -147,10 +147,20 @@ export const sanitizeAutopilot = (raw) => {
// strip is real data loss), a stale peer that drops pauseKind just briefly
// shows a generic "paused" banner until the next run re-stamps it.
pauseKind: AUTOPILOT_PAUSE_KINDS.includes(raw.pauseKind) ? raw.pauseKind : null,
+ // #1572 — a `done` run that filed blocking script-craft gaps (the advisory
+ // craft gate) carries the count here so the marker can qualify "complete"
+ // instead of reporting clean while downstream rendering is still blocked.
+ // Same transient-marker rationale as pauseKind: no schema-gate bump.
+ craftGapIssues: toCount(raw.craftGapIssues),
+ craftGapFindings: toCount(raw.craftGapFindings),
updatedAt: isStr(raw.updatedAt) ? raw.updatedAt : null,
};
};
+// Coerce a marker counter to a non-negative integer, defaulting to 0 (so an
+// older marker that predates the field reads as "no gaps", not undefined).
+const toCount = (v) => (Number.isInteger(v) && v >= 0 ? v : 0);
+
const sanitizeSeriesLocked = (raw = {}) => {
if (!raw || typeof raw !== 'object') return {};
const out = {};
diff --git a/server/services/pipeline/seriesAutopilot.js b/server/services/pipeline/seriesAutopilot.js
index b554468f4e..0314aac8d9 100644
--- a/server/services/pipeline/seriesAutopilot.js
+++ b/server/services/pipeline/seriesAutopilot.js
@@ -799,6 +799,13 @@ async function runScriptVerify(sId, issueId, record) {
summary: `Comic script craft review found ${blocking.length} blocking issue(s): ${blocking.map((b) => b.problem).join(' | ').slice(0, 600)}`,
context: JSON.stringify(blocking).slice(0, 1000),
});
+ // #1572 — fileGap is advisory and only persists a gap task when fileGaps is
+ // on (mirror its predicate). Tally what was actually FILED so the terminal
+ // "complete" frame can qualify itself instead of silently reporting clean.
+ if (record.options.fileGaps && record.mode === 'execute') {
+ record.runState.scriptCraftGapIssues.add(issueId);
+ record.runState.scriptCraftBlocking += blocking.length;
+ }
}
return {};
}
@@ -1372,6 +1379,12 @@ export async function startSeriesAutopilot(sId, options = {}) {
textAttempted: new Set(),
scriptChecked: new Set(),
visualDrafted: new Set(),
+ // #1572 — issues whose ADVISORY craft gate filed a blocking gap task, and
+ // the total blocking-finding count. Carried into the terminal `complete`
+ // frame + persisted marker so a "clean complete" doesn't hide downstream
+ // render blockers the user still has to resolve.
+ scriptCraftGapIssues: new Set(),
+ scriptCraftBlocking: 0,
},
activeChild: null,
};
@@ -1411,9 +1424,15 @@ export async function startSeriesAutopilot(sId, options = {}) {
const step = resolveNextStep(series, issues, record.runState, runOptions);
if (step.kind === 'done') {
- await persistMarker(sId, { status: 'done', runId, currentStep: null });
- broadcast(sId, { type: 'complete', runId, steps: ordinal, completedAt: new Date().toISOString() });
- console.log(`✅ autopilot complete — series=${sId.slice(0, 12)} steps=${ordinal}`);
+ // #1572 — qualify "complete" when the advisory craft gate filed
+ // blocking script-craft gaps during this run: the run is done, but
+ // those gaps still block downstream visual rendering, so report them
+ // on both the persisted marker and the terminal frame.
+ const craftGapIssues = record.runState.scriptCraftGapIssues.size;
+ const craftGapFindings = record.runState.scriptCraftBlocking;
+ await persistMarker(sId, { status: 'done', runId, currentStep: null, craftGapIssues, craftGapFindings });
+ broadcast(sId, { type: 'complete', runId, steps: ordinal, craftGapIssues, craftGapFindings, completedAt: new Date().toISOString() });
+ console.log(`✅ autopilot complete — series=${sId.slice(0, 12)} steps=${ordinal}${craftGapIssues ? ` (${craftGapIssues} issue(s) with filed script-craft gaps)` : ''}`);
return;
}
diff --git a/server/services/pipeline/seriesAutopilot.test.js b/server/services/pipeline/seriesAutopilot.test.js
index 5f0d7a20a8..82fcde5b67 100644
--- a/server/services/pipeline/seriesAutopilot.test.js
+++ b/server/services/pipeline/seriesAutopilot.test.js
@@ -1028,7 +1028,11 @@ describe('autopilot conductor', () => {
await autopilot.startSeriesAutopilot(seriesId, { includeVisual: false });
await waitFor(runFinished(seriesId));
expect(verifyComicScript).toHaveBeenCalledTimes(1);
- expect(autopilot.__testing.runs.get(seriesId)?.lastPayload?.type).toBe('complete');
+ const done = autopilot.__testing.runs.get(seriesId)?.lastPayload;
+ expect(done?.type).toBe('complete');
+ // #1572 — a genuinely clean run reports no filed craft gaps.
+ expect(done?.craftGapIssues).toBe(0);
+ expect(done?.craftGapFindings).toBe(0);
});
it('files a gap for blocking script-craft findings but does not block the run', async () => {
@@ -1042,6 +1046,37 @@ describe('autopilot conductor', () => {
expect(gapKinds.some((d) => /script-craft/.test(d))).toBe(true);
});
+ it('qualifies the terminal complete frame + marker with filed script-craft gap counts (#1572)', async () => {
+ scriptVerifyFindings = [
+ { severity: 'high', problem: 'page 2 panel 1 has no description' },
+ { severity: 'high', problem: 'page 3 panel 2 dialogue is empty' },
+ ];
+ const { seriesId } = await seedComplete();
+ await autopilot.startSeriesAutopilot(seriesId, { fileGaps: true, includeVisual: false });
+ await waitFor(runFinished(seriesId));
+ const done = autopilot.__testing.runs.get(seriesId)?.lastPayload;
+ expect(done?.type).toBe('complete');
+ // One issue verified, two blocking findings on it → 1 gap-issue / 2 findings.
+ expect(done?.craftGapIssues).toBe(1);
+ expect(done?.craftGapFindings).toBe(2);
+ const marker = (await seriesSvc.getSeries(seriesId)).autopilot;
+ expect(marker.status).toBe('done');
+ expect(marker.craftGapIssues).toBe(1);
+ expect(marker.craftGapFindings).toBe(2);
+ });
+
+ it('does not tally craft gaps into the complete frame when fileGaps is off (#1572)', async () => {
+ scriptVerifyFindings = [{ severity: 'high', problem: 'page 2 panel 1 has no description' }];
+ const { seriesId } = await seedComplete();
+ await autopilot.startSeriesAutopilot(seriesId, { includeVisual: false });
+ await waitFor(runFinished(seriesId));
+ const done = autopilot.__testing.runs.get(seriesId)?.lastPayload;
+ expect(done?.type).toBe('complete');
+ // Nothing was filed (fileGaps off), so the run stays a clean complete.
+ expect(done?.craftGapIssues).toBe(0);
+ expect(done?.craftGapFindings).toBe(0);
+ });
+
it('files a CoS gap task when a verify gate stalls (fileGaps)', async () => {
verifyFindings = [{ severity: 'high', problem: 'unresolved plot hole' }];
const { seriesId } = await seedComplete();