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: let productive character foundation work finish

[._.]/ Adam Eivyd2a5cc32bb75
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 3593568d4d..e95192bc64 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -23,7 +23,7 @@
- **The bundled local-LLM install catalog has been refreshed to the current model landscape.** Every suggested model was re-verified against the Ollama registry and the Hugging Face API, and the list is now built from what's current: Qwen3.5 / Qwen3.6, Gemma 4 (12B alongside the existing 26B/31B), Muse Glimmer, GLM-4.7 Flash, Granite 4.1, Ministral 3, Nemotron 3 Nano (including a 1M-context 30B), Olmo 3.1, LFM2.5, Qwen3-VL, MiniCPM-V 4.6, EmbeddingGemma, and the Ornith / North Mini Code / Devstral Small 2 coding tier. Models superseded by two generations were retired (Llama 3.1/3.2/3.3, Qwen2.5 + Qwen2.5-VL, Mistral 7B, Gemma 2, Phi-3, DeepSeek-R1 Distill, LLaVA 1.5, Code Llama, SmolLM2, Moondream) — but they still map exactly across backends, so migrating an older Ollama library to LM Studio doesn't degrade to a guessed name. Two entries were broken outright: the LM Studio repos for LLaVA 1.5 and Code Llama now 404. Ollama ids are checked for real local weights, because several headline 2026 models (Mistral Large 3, GLM-5.2, DeepSeek-V4, MiniMax-M3, Kimi K3) are published only as `:cloud` passthrough tags that would have installed nothing.
- **Local-model capability detection caught up with the models it now recommends.** Gemma 4 and Granite 4 report tool use (Gemma 3 genuinely couldn't, which is why the old rule stopped at Gemma 3), Gemma 4 reports vision, and Ornith / LFM2 / Olmo 3 / Muse Glimmer / North Mini Code / FunctionGemma are recognized as tool-callers — so they stop being hidden from agent and caption pickers on LM Studio, where PortOS has only the model id to go on. `embeddinggemma` is now correctly identified as an embedding model: it glues the marker onto the family name, slipped past the anchored `embedding` rule, and would otherwise have been offered as a chat model (the nomic-embed-text fallback bug). The editorial-model recommender learned the new families and now declines vision *specialists* (`*-VL`, `*V`, OCR) while still happily using a general model that can read images.
- **Series Autopilot now protects the author’s originating story intent.** The Universe Builder starter idea is included in foundation-cache invalidation, rendered ahead of derived canon for the independent foundation judge, and supplied explicitly to arc generation with a hard rule against replacing its ontology, protagonists, or core story engine. Full-control runs still unlock derived world fields, but they keep the human-authored starter idea locked.
-- **Character-first foundation repair gets a quality-first runtime.** Productive ensemble work may run for up to two hours instead of being discarded at ten minutes, while a finite ceiling still stops a genuinely hung provider.
+- **Character-first foundation repair gets a quality-first runtime.** Productive ensemble work may run for up to twelve hours instead of being discarded at ten minutes, matching the pipeline's other long-form editorial calls while operator cancellation remains available for a genuinely hung provider.
- **Episode synopsis revisions are now restorable.** Text-stage history snapshots preserve input-only stages as well as generated output, so regenerating an episode plan can no longer discard the prior synopsis merely because that planning stage stores its authored text in `input`.
- **Series Autopilot now validates the arc spine before spending on episodes.** A protected-intent checkpoint runs immediately after the macro arc, uses only canon demonstrably tied to the current series, honors the recommended volume count (including a single 12-issue volume), and blocks or auto-corrects an incompatible premise before issue generation. Existing empty issue placeholders are reused as an exact set so their ids, history, and visual links survive episode seeding.
- **Stopping Series Autopilot now stops the active AI run.** Direct arc, episode, foundation, correction, and fallback runs publish their concrete run ids to the conductor, so Stop no longer waits for a long provider call to finish. Runs History also exposes Stop for active rows.
diff --git a/server/services/pipeline/foundationJudge.js b/server/services/pipeline/foundationJudge.js
index 142a05844d..e4ea9236ef 100644
--- a/server/services/pipeline/foundationJudge.js
+++ b/server/services/pipeline/foundationJudge.js
@@ -881,9 +881,11 @@ const REPAIR_CHARACTERS_MAX_CHARS = 12_000;
// The character-foundation stage reasons over the whole ensemble at once, so it
// is the slowest repair stage by a wide margin. Ten minutes proved short enough
-// to kill productive high-effort work. Keep a finite safety ceiling for a truly
-// hung provider, but give a quality-first ensemble pass enough room to finish.
-const CHARACTER_FOUNDATION_TIMEOUT_MS = 7_200_000;
+// to kill productive high-effort work, and a fixed two-hour ceiling still cuts
+// off a healthy provider solely because the ensemble is large. Match the
+// quality-first ceiling used by the pipeline's other long-form editorial calls;
+// provider cancellation remains available for a truly hung run.
+const CHARACTER_FOUNDATION_TIMEOUT_MS = 43_200_000;
const CRAFT_REPAIR_MAX_ATTEMPTS = 2;
diff --git a/server/services/pipeline/foundationJudge.test.js b/server/services/pipeline/foundationJudge.test.js
index 870768578c..cd13a4cc05 100644
--- a/server/services/pipeline/foundationJudge.test.js
+++ b/server/services/pipeline/foundationJudge.test.js
@@ -773,14 +773,14 @@ describe('foundation repair prompt — bounded outline', () => {
}
});
- it('requests a two-hour timeout so productive high-effort ensemble work is not killed early', async () => {
+ it('requests a twelve-hour timeout so productive high-effort ensemble work is not killed early', async () => {
await applyFoundationFix('ser-1', 'character', { finding: { gap: 'blank lead', fix: 'build the causal chain' } });
- expect(__testing.CHARACTER_FOUNDATION_TIMEOUT_MS).toBe(7_200_000);
+ expect(__testing.CHARACTER_FOUNDATION_TIMEOUT_MS).toBe(43_200_000);
expect(stageRunner.runStagedLLM).toHaveBeenCalledWith(
'pipeline-character-foundation',
expect.anything(),
- expect.objectContaining({ timeoutOverride: 7_200_000 }),
+ expect.objectContaining({ timeoutOverride: 43_200_000 }),
);
});
});