[GH-ISSUE #1501] Roleplay Writer Agent Review is unreachable and ignores overrides #751

Closed
opened 2026-10-20 17:32:54 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1501

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Roleplay has a Writer Agent Review modal path, but the current wiring appears unreachable and its continuation payload is ignored.

This came out of the Roleplay smoke/audit work for #1486.

Evidence

  • src/features/modes/roleplay/hooks/use-agent-injection-review.ts listens for window event marinara:agent-injection-review.
  • rg over src finds no dispatcher for marinara:agent-injection-review outside that listener.
  • The same hook continues with generate({ chatId, connectionId: null, agentInjectionOverrides: overrides }).
  • src/engine/contracts/schemas/chat.schema.ts accepts agentInjectionOverrides, but rg shows no engine-side consumer in src/engine/generation/start-generation.ts, prompt-assembly.ts, or agent-runner.ts.
  • src/engine/generation/agent-runner.ts excludes prompt-reviewer from pre-generation injection with pipeline.preGenerate((type) => type !== "prompt-reviewer"), and prompt_review results are treated as informational agent results rather than a pause/review contract.

Expected

If writer-agent review is a supported Roleplay feature:

  • pre-generation writer guidance can request review through a defined app contract,
  • the modal opens for the active Roleplay chat,
  • edited guidance is applied to the generation that continues after review,
  • cancellation/close has a clear behavior and does not leave generation state ambiguous.

If review is no longer supported, the dead modal/hook/schema contract should be removed or hidden so Roleplay does not expose a fake review path.

Actual

The review modal has no apparent production trigger. If triggered manually, Continue sends agentInjectionOverrides, but generation ignores that field, so edited guidance cannot affect the reply.

Suggested Fix

Define the owner contract first, then either:

  1. wire a real review pause/resume path where agentInjectionOverrides replaces the reviewed injections before prompt assembly/model call, or
  2. remove the unused review UI and schema field until the feature is ready.

Keep this in the Roleplay/generation contract layer, not as a UI-only guard.

  • #1486
  • #1497 tracks the separate raw invokeTauri Roleplay panel architecture finding.
Originally created by @Xelvanis on GitHub (May 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1501 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Roleplay has a `Writer Agent Review` modal path, but the current wiring appears unreachable and its continuation payload is ignored. This came out of the Roleplay smoke/audit work for #1486. ## Evidence - `src/features/modes/roleplay/hooks/use-agent-injection-review.ts` listens for `window` event `marinara:agent-injection-review`. - `rg` over `src` finds no dispatcher for `marinara:agent-injection-review` outside that listener. - The same hook continues with `generate({ chatId, connectionId: null, agentInjectionOverrides: overrides })`. - `src/engine/contracts/schemas/chat.schema.ts` accepts `agentInjectionOverrides`, but `rg` shows no engine-side consumer in `src/engine/generation/start-generation.ts`, `prompt-assembly.ts`, or `agent-runner.ts`. - `src/engine/generation/agent-runner.ts` excludes `prompt-reviewer` from pre-generation injection with `pipeline.preGenerate((type) => type !== "prompt-reviewer")`, and `prompt_review` results are treated as informational agent results rather than a pause/review contract. ## Expected If writer-agent review is a supported Roleplay feature: - pre-generation writer guidance can request review through a defined app contract, - the modal opens for the active Roleplay chat, - edited guidance is applied to the generation that continues after review, - cancellation/close has a clear behavior and does not leave generation state ambiguous. If review is no longer supported, the dead modal/hook/schema contract should be removed or hidden so Roleplay does not expose a fake review path. ## Actual The review modal has no apparent production trigger. If triggered manually, Continue sends `agentInjectionOverrides`, but generation ignores that field, so edited guidance cannot affect the reply. ## Suggested Fix Define the owner contract first, then either: 1. wire a real review pause/resume path where `agentInjectionOverrides` replaces the reviewed injections before prompt assembly/model call, or 2. remove the unused review UI and schema field until the feature is ready. Keep this in the Roleplay/generation contract layer, not as a UI-only guard. ## Related - #1486 - #1497 tracks the separate raw `invokeTauri` Roleplay panel architecture finding.
Author
Owner

@SpicyMarinara commented on GitHub (May 29, 2026):

Resolved on refactor in a706b274. Writer-agent review now emits an engine event, opens the Roleplay review modal, pauses before the main model call, and resumes with reviewed injection overrides.

<!-- gh-comment-id:4571930543 --> @SpicyMarinara commented on GitHub (May 29, 2026): Resolved on refactor in a706b274. Writer-agent review now emits an engine event, opens the Roleplay review modal, pauses before the main model call, and resumes with reviewed injection overrides.
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#751
No description provided.