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

chore: renumber migration 135→136 (collision with #1588 fact-accuracy after rebase) (#1589)

Adam Eivy0a3d388ae2d7
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 60a0120db4..998b3a6a86 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -65,7 +65,7 @@
- **[issue-1588] A new opt-in editorial check catches contradictions to real-world facts — Paris placed in Germany, an anachronistic technology, a physiologically impossible feat.** Distinct from the internal timeline/canon check (#1581), nothing reconciled grounded fiction against *external* truth, so a checkable howler in a historical or hard-SF series — a city in the wrong country, an event dated before the war it belongs to, a survivable injury that isn't — could ship and quietly torch the story's credibility. The new **Research / fact accuracy** check (`research.fact-accuracy`) scans the stitched manuscript against an **author-supplied fact reference** and flags geography, history/chronology, and science/physiology claims that contradict it. It is deliberately **opt-in and gated**: it runs only when a series is marked **fact-critical** *and* a non-empty fact reference is supplied, so it never second-guesses deliberate invention in pure fantasy. A new **Fact accuracy** section in the series bible (Pipeline → series) carries the toggle + reference textarea; the reference is a fingerprinted editorial source (`series.factReference`), so editing it re-runs the check, and findings surface in the existing editorial-review UI and Series Autopilot under a new **Fact accuracy** category. Both new series fields (`factCritical`, `factReference`) are wire-gated (pipelineSeries schema v7) so an older federated peer can't strip-then-LWW the loss. (`server/lib/editorial/checkRegistry.js`, `server/services/pipeline/series.js`, `client/src/pages/PipelineSeries.jsx`, `data.reference/prompts/stages/pipeline-editorial-fact-accuracy.md`, `scripts/migrations/135-editorial-fact-accuracy-stage.js`)
-- **[issue-1589] A new editorial check catches comic↔prose drift in hybrid issues — a plot beat the prose narrates that no panel shows, panel dialogue that contradicts the prose, or events ordered differently across the two media.** The existing `comic.*` checks validate comic content *in isolation* (lettering load, balloon attribution, panel rhythm), but for an issue told as **both prose and comic** nothing checked that the two media tell the *same* story — so a character the prose stabs could stand unharmed in the panels, a line could be put in a different character's mouth on the page, or the comic could reorder events the prose places in a fixed sequence, all unflagged. The new **Comic ↔ prose synchronization** check (`comic.prose-sync`) pairs each hybrid issue's prose narration with its authoritative comic pages (each panel's visual description, dialogue, captions, and SFX) and flags three substantive divergences: an **unshown beat** (a consequential event the prose narrates that no panel depicts), **contradicted dialogue** (a line said with materially different meaning or attributed to a different speaker), and a **chronology disagreement** (the two media ordering the same events incompatibly). It is deliberately tuned to *ignore* ordinary medium translation — comics legitimately compress, cut, reorder for page rhythm, and externalize interior narration into image — so a faithful adaptation that simply differs in density isn't flagged. It runs one model call per issue that has both prose and comic content (capped per run), reading each issue's **`prose`-stage** text (specifically, not the stitched manuscript — which prefers the comic script for a hybrid issue) plus the `comicScript.pacing` comic content, and anchors every finding to its issue; its findings go stale and re-run when either the prose or the comic for that issue drifts. It's a default-on, issue-scope check that surfaces in the existing editorial-review UI and Series Autopilot like every other check, marking a flat contradiction or a dropped consequential beat medium-severity. (`server/lib/editorial/checkRegistry.js`, `data.reference/prompts/stages/pipeline-editorial-comic-prose-sync.md`, `scripts/migrations/135-editorial-comic-prose-sync-stage.js`)
+- **[issue-1589] A new editorial check catches comic↔prose drift in hybrid issues — a plot beat the prose narrates that no panel shows, panel dialogue that contradicts the prose, or events ordered differently across the two media.** The existing `comic.*` checks validate comic content *in isolation* (lettering load, balloon attribution, panel rhythm), but for an issue told as **both prose and comic** nothing checked that the two media tell the *same* story — so a character the prose stabs could stand unharmed in the panels, a line could be put in a different character's mouth on the page, or the comic could reorder events the prose places in a fixed sequence, all unflagged. The new **Comic ↔ prose synchronization** check (`comic.prose-sync`) pairs each hybrid issue's prose narration with its authoritative comic pages (each panel's visual description, dialogue, captions, and SFX) and flags three substantive divergences: an **unshown beat** (a consequential event the prose narrates that no panel depicts), **contradicted dialogue** (a line said with materially different meaning or attributed to a different speaker), and a **chronology disagreement** (the two media ordering the same events incompatibly). It is deliberately tuned to *ignore* ordinary medium translation — comics legitimately compress, cut, reorder for page rhythm, and externalize interior narration into image — so a faithful adaptation that simply differs in density isn't flagged. It runs one model call per issue that has both prose and comic content (capped per run), reading each issue's **`prose`-stage** text (specifically, not the stitched manuscript — which prefers the comic script for a hybrid issue) plus the `comicScript.pacing` comic content, and anchors every finding to its issue; its findings go stale and re-run when either the prose or the comic for that issue drifts. It's a default-on, issue-scope check that surfaces in the existing editorial-review UI and Series Autopilot like every other check, marking a flat contradiction or a dropped consequential beat medium-severity. (`server/lib/editorial/checkRegistry.js`, `data.reference/prompts/stages/pipeline-editorial-comic-prose-sync.md`, `scripts/migrations/136-editorial-comic-prose-sync-stage.js`)
## Series Autopilot
diff --git a/scripts/migrations/135-editorial-comic-prose-sync-stage.js b/scripts/migrations/136-editorial-comic-prose-sync-stage.js
similarity index 100%
rename from scripts/migrations/135-editorial-comic-prose-sync-stage.js
rename to scripts/migrations/136-editorial-comic-prose-sync-stage.js
diff --git a/scripts/migrations/135-editorial-comic-prose-sync-stage.test.js b/scripts/migrations/136-editorial-comic-prose-sync-stage.test.js
similarity index 94%
rename from scripts/migrations/135-editorial-comic-prose-sync-stage.test.js
rename to scripts/migrations/136-editorial-comic-prose-sync-stage.test.js
index 197d63e196..90280d4648 100644
--- a/scripts/migrations/135-editorial-comic-prose-sync-stage.test.js
+++ b/scripts/migrations/136-editorial-comic-prose-sync-stage.test.js
@@ -4,7 +4,7 @@ import { tmpdir } from 'os';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
-import migration from './135-editorial-comic-prose-sync-stage.js';
+import migration from './136-editorial-comic-prose-sync-stage.js';
// scripts/migrations/<this> → ../.. is the repo root (matches _testHelpers.js).
const repoRoot = join(dirname(fileURLToPath(import.meta.url)), '..', '..');
@@ -16,7 +16,7 @@ const FILENAME = 'pipeline-editorial-comic-prose-sync.md';
const STAGE_KEY = 'pipeline-editorial-comic-prose-sync';
const BODY = '# Comic ↔ prose synchronization\n\nshipped body\n';
-describe('migration 135 — seed editorial-comic-prose-sync stage', () => {
+describe('migration 136 — seed editorial-comic-prose-sync stage', () => {
let rootDir;
let stagesDir;
let refStagesDir;
@@ -34,7 +34,7 @@ describe('migration 135 — seed editorial-comic-prose-sync stage', () => {
};
beforeEach(() => {
- rootDir = mkdtempSync(join(tmpdir(), 'migration-135-'));
+ rootDir = mkdtempSync(join(tmpdir(), 'migration-136-'));
stagesDir = join(rootDir, 'data', 'prompts', 'stages');
refStagesDir = join(rootDir, 'data.reference', 'prompts', 'stages');
installedConfigPath = join(rootDir, 'data', 'prompts', 'stage-config.json');
diff --git a/server/lib/editorial/checkRegistry.js b/server/lib/editorial/checkRegistry.js
index 07ba5b765a..195ee07088 100644
--- a/server/lib/editorial/checkRegistry.js
+++ b/server/lib/editorial/checkRegistry.js
@@ -715,9 +715,9 @@ export const APPEARANCE_CONTINUITY_STAGE = 'pipeline-editorial-appearance-contin
// Stage name for the comic ↔ prose synchronization LLM check (#1589). Ships in
// data.reference/prompts/stages/ + stage-config.json (fresh installs via
-// setup-data.js) and migrates to existing installs via migration 135 (boot runs
+// setup-data.js) and migrates to existing installs via migration 136 (boot runs
// migrations but NOT setup-data, so the migration is required). For a hybrid
-// comic+prose issue it pairs the issue's PROSE (a manuscript section) with its
+// comic+prose issue it pairs the issue's PROSE (its prose stage) with its
// authoritative COMIC content (description + dialogue + caption + SFX — the same
// fields the `comicScript.pacing` source carries) and asks the model to flag
// SUBSTANTIVE cross-media divergences: a plot beat the prose narrates that no