[PR #4234] [MERGED] Fix reasoning summaries and assigned issue sweep #6295

Closed
opened 2026-10-23 04:09:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4234
Author: @SpicyMarinara
Created: 7/28/2026
Status: ✅ Merged
Merged: 7/29/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/4233-openai-reasoning-summary-events


📝 Commits (4)

📊 Changes

23 files changed (+462 additions, -167 deletions)

View changed files

📝 packages/client/src/components/agents/AgentEditor.tsx (+22 -24)
📝 packages/client/src/components/chat/ConversationMessage.tsx (+63 -18)
📝 packages/client/src/components/chat/ConversationView.tsx (+4 -0)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+16 -4)
📝 packages/client/src/components/presets/PresetEditor.tsx (+1 -1)
📝 packages/client/src/localization/locales/en.json (+5 -4)
📝 packages/client/src/localization/locales/ko.json (+4 -4)
📝 packages/server/src/routes/connections.routes.ts (+4 -3)
📝 packages/server/src/routes/gallery.routes.ts (+13 -2)
📝 packages/server/src/routes/game.routes.ts (+3 -0)
📝 packages/server/src/routes/sprites.routes.ts (+2 -0)
📝 packages/server/src/services/conversation/schedule.service.ts (+7 -58)
📝 packages/server/src/services/generation/media-connection-fallback.ts (+8 -6)
📝 packages/server/src/services/llm/providers/openai.provider.ts (+49 -6)
📝 packages/server/src/services/video/game-video-runtime.ts (+3 -0)
📝 packages/server/src/services/video/video-generation.ts (+19 -5)
📝 packages/shared/src/constants/video-generation-defaults.ts (+2 -0)
📝 packages/shared/src/types/video-generation-defaults.ts (+3 -1)
📝 packages/shared/src/utils/conversation-presence.ts (+87 -25)
📝 scripts/regressions/open-issues.regression.ts (+87 -0)

...and 3 more files

📄 Description

Why

This PR combines the existing official OpenAI reasoning-summary fix with the current issue sweep assigned to @SpicyMarinara:

  • GPT-5.6 Sol can report reasoning tokens while Roleplay persists no readable summary, leaving the brain-icon affordance empty.
  • Overnight schedule ranges were resolved as though both sides of midnight belonged to the currently named day.
  • Conversation mode did not apply AI-output display regex scripts to every stored message and content part.
  • ComfyUI video profiles fixed %length% to an implicit 16 FPS and exposed no duration-seconds or FPS macros.
  • The connection image test used a 512×512 request that ByteDance Seedream 4.5 rejects; the supported OpenRouter path expects a 1K request.
  • Narrative Director could not opt into a prompt-section marker, and injected-agent choices were centered in the preset menu.

For #4240, the maintainer's important follow-up says the reported first-generation preprocessing/context symptom was resolved by reinstalling Marinara Engine. This PR deliberately does not rewrite that resolved orchestration path; it addresses only the remaining reproducible editor defects.

Closes #4233.
Closes #4236.
Closes #4237.
Closes #4238.
Closes #4239.
Closes #4240.

Intended change

  • Capture and deduplicate completed reasoning-summary text/part events across ordinary and tool-enabled OpenAI Responses streams.
  • Resolve midnight-crossing schedules against the day where each range begins, consistently on client and server.
  • Apply scoped AI-output display regex transformations to every Conversation message and multipart message using transcript depth.
  • Add a persisted 1–120 FPS control for ComfyUI video profiles and expose %length_s% plus %fps%, while preserving legacy %length% as the configured frame count.
  • Pass the configured FPS through all gallery, game, sprite, test-video, and fallback generation paths.
  • Generate connection test images at a broadly supported 1024×1024 size.
  • Expose and persist Add as Prompt Section for Narrative Director, and left-align injected-agent entries in the preset section menu.

Automated evidence

  • pnpm check — passed (one pre-existing NoodleHome hook warning, no errors).
  • pnpm localization:check — passed.
  • pnpm regression:timezone — passed.
  • pnpm regression:prompt — passed.
  • pnpm regression:issues — passed.
  • Prior branch validation: pnpm regression:providers — passed.
  • pnpm smoke:ui — 149 passed, 83 skipped; six unrelated existing accent-variable/tracker assertions failed and reproduced in an isolated one-worker run. The sweep-related browser paths passed.

Manual verification

  • Verify multiple official OpenAI GPT-5.6 Sol Roleplay replies through https://api.openai.com/v1 save reasoning and show the brain icon without duplicate summaries.
  • Verify Monday 02:00 uses a Sunday 23:00–07:00 block, while Monday 23:30 uses Monday's overnight block.
  • Verify a display-only regex hides matching text from every Conversation assistant message and multipart message.
  • Verify a ComfyUI workflow receives %length_s%, %fps%, and %length% using the saved FPS across connection test, Gallery, Roleplay, and Game generation paths.
  • Verify ByteDance Seedream 4.5 completes the saved connection's Test Image action at 1K.
  • Verify Narrative Director can be saved/exported as a prompt section and appears left-aligned in Preset → Add Section.

Summary by CodeRabbit

  • New Features

    • Added “Inject as Prompt Section” support for Director agents, including saving and exporting settings.
    • Added configurable FPS for ComfyUI video generation, with dynamic frame-count calculations and workflow placeholders.
    • Improved transcript rendering with scoped regex processing and message-depth awareness.
    • Enhanced overnight schedule status handling.
  • Bug Fixes

    • Improved OpenAI reasoning-summary streaming to prevent missing or duplicated text.
    • Updated image-generation tests to use broadly supported 1024×1024 dimensions.
    • Improved ComfyUI workflow validation and configuration display.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4234 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/28/2026 **Status:** ✅ Merged **Merged:** 7/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/4233-openai-reasoning-summary-events` --- ### 📝 Commits (4) - [`de345cd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/de345cdbe00e11c02053fe6d35c38710e5b3246e) Start issue #4233 - [`66f9df5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/66f9df56d80cf375c0dec000d48929ab887dfe5d) fix(openai): retain completed reasoning summaries - [`248f615`](https://github.com/Pasta-Devs/Marinara-Engine/commit/248f615c18e855e899cef90a0560ddedc85f40a1) Fix assigned issue sweep - [`42197b8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/42197b82009db3cd9112918e120b39a8c0f6a6d6) Address CodeRabbit review ### 📊 Changes **23 files changed** (+462 additions, -167 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/agents/AgentEditor.tsx` (+22 -24) 📝 `packages/client/src/components/chat/ConversationMessage.tsx` (+63 -18) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+4 -0) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+16 -4) 📝 `packages/client/src/components/presets/PresetEditor.tsx` (+1 -1) 📝 `packages/client/src/localization/locales/en.json` (+5 -4) 📝 `packages/client/src/localization/locales/ko.json` (+4 -4) 📝 `packages/server/src/routes/connections.routes.ts` (+4 -3) 📝 `packages/server/src/routes/gallery.routes.ts` (+13 -2) 📝 `packages/server/src/routes/game.routes.ts` (+3 -0) 📝 `packages/server/src/routes/sprites.routes.ts` (+2 -0) 📝 `packages/server/src/services/conversation/schedule.service.ts` (+7 -58) 📝 `packages/server/src/services/generation/media-connection-fallback.ts` (+8 -6) 📝 `packages/server/src/services/llm/providers/openai.provider.ts` (+49 -6) 📝 `packages/server/src/services/video/game-video-runtime.ts` (+3 -0) 📝 `packages/server/src/services/video/video-generation.ts` (+19 -5) 📝 `packages/shared/src/constants/video-generation-defaults.ts` (+2 -0) 📝 `packages/shared/src/types/video-generation-defaults.ts` (+3 -1) 📝 `packages/shared/src/utils/conversation-presence.ts` (+87 -25) 📝 `scripts/regressions/open-issues.regression.ts` (+87 -0) _...and 3 more files_ </details> ### 📄 Description ## Why This PR combines the existing official OpenAI reasoning-summary fix with the current issue sweep assigned to `@SpicyMarinara`: - GPT-5.6 Sol can report reasoning tokens while Roleplay persists no readable summary, leaving the brain-icon affordance empty. - Overnight schedule ranges were resolved as though both sides of midnight belonged to the currently named day. - Conversation mode did not apply AI-output display regex scripts to every stored message and content part. - ComfyUI video profiles fixed `%length%` to an implicit 16 FPS and exposed no duration-seconds or FPS macros. - The connection image test used a 512×512 request that ByteDance Seedream 4.5 rejects; the supported OpenRouter path expects a 1K request. - Narrative Director could not opt into a prompt-section marker, and injected-agent choices were centered in the preset menu. For #4240, the maintainer's important follow-up says the reported first-generation preprocessing/context symptom was resolved by reinstalling Marinara Engine. This PR deliberately does not rewrite that resolved orchestration path; it addresses only the remaining reproducible editor defects. Closes #4233. Closes #4236. Closes #4237. Closes #4238. Closes #4239. Closes #4240. ## Intended change - Capture and deduplicate completed reasoning-summary text/part events across ordinary and tool-enabled OpenAI Responses streams. - Resolve midnight-crossing schedules against the day where each range begins, consistently on client and server. - Apply scoped AI-output display regex transformations to every Conversation message and multipart message using transcript depth. - Add a persisted 1–120 FPS control for ComfyUI video profiles and expose `%length_s%` plus `%fps%`, while preserving legacy `%length%` as the configured frame count. - Pass the configured FPS through all gallery, game, sprite, test-video, and fallback generation paths. - Generate connection test images at a broadly supported 1024×1024 size. - Expose and persist Add as Prompt Section for Narrative Director, and left-align injected-agent entries in the preset section menu. ## Automated evidence - `pnpm check` — passed (one pre-existing `NoodleHome` hook warning, no errors). - `pnpm localization:check` — passed. - `pnpm regression:timezone` — passed. - `pnpm regression:prompt` — passed. - `pnpm regression:issues` — passed. - Prior branch validation: `pnpm regression:providers` — passed. - `pnpm smoke:ui` — 149 passed, 83 skipped; six unrelated existing accent-variable/tracker assertions failed and reproduced in an isolated one-worker run. The sweep-related browser paths passed. ## Manual verification - [ ] Verify multiple official OpenAI GPT-5.6 Sol Roleplay replies through `https://api.openai.com/v1` save reasoning and show the brain icon without duplicate summaries. - [ ] Verify Monday 02:00 uses a Sunday 23:00–07:00 block, while Monday 23:30 uses Monday's overnight block. - [ ] Verify a display-only regex hides matching text from every Conversation assistant message and multipart message. - [ ] Verify a ComfyUI workflow receives `%length_s%`, `%fps%`, and `%length%` using the saved FPS across connection test, Gallery, Roleplay, and Game generation paths. - [ ] Verify ByteDance Seedream 4.5 completes the saved connection's Test Image action at 1K. - [ ] Verify Narrative Director can be saved/exported as a prompt section and appears left-aligned in Preset → Add Section. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added “Inject as Prompt Section” support for Director agents, including saving and exporting settings. * Added configurable FPS for ComfyUI video generation, with dynamic frame-count calculations and workflow placeholders. * Improved transcript rendering with scoped regex processing and message-depth awareness. * Enhanced overnight schedule status handling. * **Bug Fixes** * Improved OpenAI reasoning-summary streaming to prevent missing or duplicated text. * Updated image-generation tests to use broadly supported 1024×1024 dimensions. * Improved ComfyUI workflow validation and configuration display. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:09:02 +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#6295
No description provided.