[GH-ISSUE #8185] Game narration can retain planning-only and post-roll planning text #7602

Closed
opened 2026-10-24 04:04:40 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8185

Originally assigned to: @SpicyMarinara on GitHub.

Game narration can still display private planning in two cases already present in staging. This was independently verified while reviewing the clean staging integration into #8153; it is outside that PR's agent-lorebook changes.

Observed with the real Fastify /api/generate/ route, actual disposable storage and synthetic model replies:

  1. A single reply Plan: Hidden preparation only. is saved verbatim and emitted visibly. extractLeadingGmPlanning intentionally restores the original text when no narration follows (the existing regression explicitly preserves this case). The follow-up should choose a safe no-narration outcome without deleting legitimate out-of-character answers.
  2. A draft requesting [dice: 1d1] causes a real engine roll and a second narration request. When that second reply begins Plan: This is hidden final planning.\n\nThe stone strikes the floor., both the plan and scene are saved before the real dice receipt. The extraction currently runs before this replacement narration is generated; the follow-up extracts tagged thinking, but does not apply the labeled-planning extraction again.

Code ownership: Engine packages/server/src/services/game/gm-planning.ts and the final Game narration path in packages/server/src/routes/generate.routes.ts. Keep the fix focused on final visible narration and preserve resolved rolls, receipts, actual harm/healing/resource commands, impersonation and normal prose.

Runnable probe and actual route results. All four raw files in that evidence gist were byte-verified. Probe source is marinara-upstream-planner-787-probe.mts; results are marinara-upstream-planner-787-actual.log. Proof used candidate 787ea1481, whose planning implementation is the already-published staging implementation. No live model or paid-provider test was performed.

Owner for triage: @SpicyMarinara. Implementation has not started in this follow-up; no branch or draft duplicates the active lorebook work.

Originally created by @SpicyMarinara on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8185 Originally assigned to: @SpicyMarinara on GitHub. Game narration can still display private planning in two cases already present in staging. This was independently verified while reviewing the clean staging integration into #8153; it is outside that PR's agent-lorebook changes. Observed with the real Fastify `/api/generate/` route, actual disposable storage and synthetic model replies: 1. A single reply `Plan: Hidden preparation only.` is saved verbatim and emitted visibly. `extractLeadingGmPlanning` intentionally restores the original text when no narration follows (the existing regression explicitly preserves this case). The follow-up should choose a safe no-narration outcome without deleting legitimate out-of-character answers. 2. A draft requesting `[dice: 1d1]` causes a real engine roll and a second narration request. When that second reply begins `Plan: This is hidden final planning.\n\nThe stone strikes the floor.`, both the plan and scene are saved before the real dice receipt. The extraction currently runs before this replacement narration is generated; the follow-up extracts tagged thinking, but does not apply the labeled-planning extraction again. Code ownership: Engine `packages/server/src/services/game/gm-planning.ts` and the final Game narration path in `packages/server/src/routes/generate.routes.ts`. Keep the fix focused on final visible narration and preserve resolved rolls, receipts, actual harm/healing/resource commands, impersonation and normal prose. [Runnable probe and actual route results](https://gist.github.com/SpicyMarinara/455e82ade9320f0257d0fdf1802353e5). All four raw files in that evidence gist were byte-verified. Probe source is `marinara-upstream-planner-787-probe.mts`; results are `marinara-upstream-planner-787-actual.log`. Proof used candidate 787ea1481, whose planning implementation is the already-published staging implementation. No live model or paid-provider test was performed. Owner for triage: @SpicyMarinara. Implementation has not started in this follow-up; no branch or draft duplicates the active lorebook work.
Author
Owner

@coderabbitai[bot] commented on GitHub (Oct 23, 2026):

⚠️ Possible Duplicate Issue(s)

📝 Issue Planner

Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

  • Create Plan

🧪 Issue enrichment is currently in open beta.

You can configure auto-planning by selecting labels in the issue_enrichment configuration.

To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

issue_enrichment:
  auto_enrich:
    enabled: false

💬 Have feedback or questions? Drop into our discord!

<!-- gh-comment-id:6368946261 --> @coderabbitai[bot] commented on GitHub (Oct 23, 2026): <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated issue plan by CodeRabbit --> <details> <summary>⚠️ Possible Duplicate Issue(s)</summary> - https://github.com/Pasta-Devs/Marinara-Engine/issues/8171 </details> --- <details> <summary>📝 Issue Planner</summary> <sub>Check the box below or use the `@coderabbitai plan` command to generate an implementation plan and prompts that you can use with your favorite coding assistant.</sub> - [ ] <!-- {"checkboxId":"8d4f2b9c-3e1a-4f7c-a9b2-d5e8f1c4a7b9"} --> Create Plan </details> --- <details> <summary> 🧪 Issue enrichment is currently in open beta.</summary> You can configure auto-planning by selecting labels in the issue_enrichment configuration. To disable automatic issue enrichment, add the following to your `.coderabbit.yaml`: ```yaml issue_enrichment: auto_enrich: enabled: false ``` </details> 💬 Have feedback or questions? Drop into our [discord](https://discord.gg/coderabbit)!
Author
Owner

@SpicyMarinara commented on GitHub (Oct 23, 2026):

Implementation owner: @SpicyMarinara (Codex lane assigned_agents_ui). I am taking the bounded server-only planner helper/final narration fix in an isolated branch. I will reproduce the actual generation-route cases before changing source and preserve OOC, impersonation, resolved dice receipts and game commands.

<!-- gh-comment-id:6368980545 --> @SpicyMarinara commented on GitHub (Oct 23, 2026): Implementation owner: @SpicyMarinara (Codex lane assigned_agents_ui). I am taking the bounded server-only planner helper/final narration fix in an isolated branch. I will reproduce the actual generation-route cases before changing source and preserve OOC, impersonation, resolved dice receipts and game commands.
bsakaguchi 2026-11-07 16:42:11 +07:00
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-Engine#7602
No description provided.