[GH-ISSUE #167] Retired visual_novel still baked into captured Engine sources and feature-package runtime bundles #86

Closed
opened 2026-10-20 17:24:14 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/167

Originally assigned to: @kolacheee on GitHub.

Follow-up to #165. That issue removes the retired visual_novel mode from the eight packages' agent modeAllowlist — the values that actually crash a recent Engine. This issue is about the deeper residue: visual_novel is still baked into the catalog's captured Engine sources and compiled feature-package runtimes. It doesn't crash anything today, but it's a seed for the same regression coming back, so it's worth cleaning separately.

Why this can bite us later

The captured Engine baseline under sources/engine/ (and the per-package src/engine/ trees) is a pre-removal snapshot — it still knows about visual_novel. Feature packages reproduce their bundles and manifests from that baseline. So a future rebuild of any feature package that derives mode metadata, schema, or boundary checks from this stale source can quietly re-introduce visual_novel into an emitted modeAllowlist — reopening exactly the startup crash #165 just closed. The shipped runtime bundles also still carry dead "Visual Novel" mode labels.

Where it is

1. Captured Engine baseline (sources/engine/, 16 files) — pre-removal Engine code, e.g.:

  • sources/engine/packages/server/src/db/schema/chats.ts and chat-presets.ts — the old four-value enum ["conversation", "roleplay", "visual_novel", "game"]
  • sources/engine/packages/server/src/routes/generate/generate-route-utils.ts — live branching chatMode === "roleplay" || chatMode === "visual_novel"
  • sources/engine/packages/client/src/stores/chat.store.ts — Exclude<ChatMode, "visual_novel">
  • sources/engine/packages/shared/dist/constants/chat-modes.js, chat-mode-capabilities.js — compiled constants

2. Per-package vendored source (packages/<id>/src/engine/): hierarchical-maps, long-term-memory (mode-label maps like visual_novel: "Visual Novel" and locale strings).

3. Compiled, shipped runtime bundles (client.js / server.mjs) in nine feature packages: chess, conversation-calls, eightball, hierarchical-maps, long-term-memory, poker, rock-paper-scissors, tic-tac-toe, uno.

See it yourself

# captured baseline + vendored per-package sources
git grep -n visual_novel sources/engine packages/*/src

# shipped compiled runtimes
git grep -lI visual_novel packages/*/client.js packages/*/server.mjs

Suggested fix

Refresh the captured Engine sources (sources/engine/ and the per-package src/engine/ trees) from a current, post-visual_novel-removal Engine, then rebuild the affected feature runtimes with node scripts/build-feature-packages.mjs so the regenerated client.js/server.mjs and boundary metadata no longer reference the retired mode. Bump the rebuilt package versions. Success check: git grep visual_novel sources/ packages/ returns nothing (outside git history).

This is lower-urgency than #165 (nothing is broken right now), but doing it removes the last way visual_novel can creep back into a shipped package.

Originally created by @kolacheee on GitHub (Jul 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/167 Originally assigned to: @kolacheee on GitHub. Follow-up to #165. That issue removes the retired `visual_novel` mode from the eight packages' **agent `modeAllowlist`** — the values that actually crash a recent Engine. This issue is about the *deeper* residue: `visual_novel` is still baked into the catalog's **captured Engine sources** and **compiled feature-package runtimes**. It doesn't crash anything today, but it's a seed for the same regression coming back, so it's worth cleaning separately. ## Why this can bite us later The captured Engine baseline under `sources/engine/` (and the per-package `src/engine/` trees) is a **pre-removal snapshot** — it still knows about `visual_novel`. Feature packages reproduce their bundles and manifests from that baseline. So a future rebuild of any feature package that derives mode metadata, schema, or boundary checks from this stale source can quietly re-introduce `visual_novel` into an emitted `modeAllowlist` — reopening exactly the startup crash #165 just closed. The shipped runtime bundles also still carry dead "Visual Novel" mode labels. ## Where it is **1. Captured Engine baseline (`sources/engine/`, 16 files)** — pre-removal Engine code, e.g.: - `sources/engine/packages/server/src/db/schema/chats.ts` and `chat-presets.ts` — the old four-value enum `["conversation", "roleplay", "visual_novel", "game"]` - `sources/engine/packages/server/src/routes/generate/generate-route-utils.ts` — live branching `chatMode === "roleplay" || chatMode === "visual_novel"` - `sources/engine/packages/client/src/stores/chat.store.ts` — `Exclude<ChatMode, "visual_novel">` - `sources/engine/packages/shared/dist/constants/chat-modes.js`, `chat-mode-capabilities.js` — compiled constants **2. Per-package vendored source (`packages/<id>/src/engine/`)**: `hierarchical-maps`, `long-term-memory` (mode-label maps like `visual_novel: "Visual Novel"` and locale strings). **3. Compiled, shipped runtime bundles (`client.js` / `server.mjs`)** in nine feature packages: `chess`, `conversation-calls`, `eightball`, `hierarchical-maps`, `long-term-memory`, `poker`, `rock-paper-scissors`, `tic-tac-toe`, `uno`. ## See it yourself ```bash # captured baseline + vendored per-package sources git grep -n visual_novel sources/engine packages/*/src # shipped compiled runtimes git grep -lI visual_novel packages/*/client.js packages/*/server.mjs ``` ## Suggested fix Refresh the captured Engine sources (`sources/engine/` and the per-package `src/engine/` trees) from a current, post-`visual_novel`-removal Engine, then rebuild the affected feature runtimes with `node scripts/build-feature-packages.mjs` so the regenerated `client.js`/`server.mjs` and boundary metadata no longer reference the retired mode. Bump the rebuilt package versions. Success check: `git grep visual_novel sources/ packages/` returns nothing (outside git history). This is lower-urgency than #165 (nothing is broken right now), but doing it removes the last way `visual_novel` can creep back into a shipped package.
bsakaguchi 2026-10-20 17:24:14 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#86
No description provided.