[PR #3053] [MERGED] [codex] Fix provider and library issue sweep #5789

Closed
opened 2026-10-22 04:19:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: codex/issue-sweep-3033-3052


📝 Commits (3)

  • c857f26 Start issue sweep 3033-3052
  • bfb1bc7 Fix provider and library issue sweep
  • 939cb6a Address CodeRabbit review feedback

📊 Changes

17 files changed (+434 additions, -248 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+0 -1)
📝 packages/client/src/components/modals/ImportPersonaModal.tsx (+1 -1)
📝 packages/client/src/components/personas/PersonaEditor.tsx (+2 -0)
📝 packages/server/src/routes/characters.routes.ts (+25 -31)
📝 packages/server/src/routes/connections.routes.ts (+7 -5)
📝 packages/server/src/routes/conversation.routes.ts (+47 -23)
📝 packages/server/src/routes/generate.routes.ts (+18 -5)
📝 packages/server/src/services/conversation/impersonate-prompt.ts (+15 -5)
📝 packages/server/src/services/llm/providers/anthropic.provider.ts (+11 -4)
📝 packages/server/src/services/llm/providers/google.provider.ts (+1 -0)
📝 packages/server/src/services/llm/providers/local-sidecar.provider.ts (+3 -3)
📝 packages/server/src/services/llm/providers/openai.provider.ts (+211 -139)
📝 packages/server/src/services/storage/characters.storage.ts (+53 -8)
📝 packages/server/src/services/storage/connections.storage.ts (+37 -23)
📝 packages/shared/src/schemas/character.schema.ts (+1 -0)
📝 packages/shared/src/types/character.ts (+1 -0)

📄 Description

Linked issue

Addresses #3033
Addresses #3034
Addresses #3035
Addresses #3036
Addresses #3037
Addresses #3038
Addresses #3039
Addresses #3040
Addresses #3041
Addresses #3042
Addresses #3043
Addresses #3044
Addresses #3045
Addresses #3046
Addresses #3047
Addresses #3048
Addresses #3049
Addresses #3050
Addresses #3051
Addresses #3052

Why this change

  • Preserve provider finish/truncation signals so cut-off or filtered responses are not recorded as clean completions.
  • Close several state-preservation holes in connections, schedules, autonomous conversation state, folders, personas, and impersonation prompts.

What changed

  • Threaded finish reasons through Gemini non-streaming, Anthropic non-streaming/streaming, OpenAI chat/completions, and Responses streaming/non-streaming paths, and propagated streaming usage finish reasons into saved generation info.
  • Allowed Anthropic cache breakpoints to attach to image/document-only turns and allowed valid thinking-only Anthropic terminal streams.
  • Made Local Model sidecar respect per-request temperature, topP, and topK outside structured-output mode.
  • Masked encrypted connection API keys in mutation responses and preserved the one-default-per-provider-category invariant when provider changes move a connection between text/image categories.
  • Kept manual model edits from clearing the visible Max Output Tokens Override field.
  • Cleaned deleted character/persona IDs out of denormalized folder membership arrays.
  • Added a safe 404 path for stale persona activation IDs, allowed character group avatars through the shared schema, and made persona versions capture/restore savedStatusOptions.
  • Preserved object-form personaStats imports from plain JSON persona files.
  • Switched schedule generation saves to queued metadata patches that merge only changed character schedules.
  • Stopped manual conversation replies from consuming autonomous follow-up slots while preserving assistant activity timestamps.
  • Preserved Name Prefix History for in-turn individual group replies and kept inline custom impersonate prompt text when adjacent placeholders are empty.
  • Updated CHANGELOG.md for v2.0.7.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • pnpm --filter @marinara-engine/shared build passed.
  • pnpm --filter @marinara-engine/server lint passed.
  • pnpm --filter @marinara-engine/client lint passed.
  • pnpm regression:prompt passed.
  • pnpm check passed.
  • git diff --check passed.
  • Manual browser verification not performed in this pass.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • Not captured; UI-facing changes are state/import/editor behavior fixes validated through typecheck, lint, and build.

Summary by CodeRabbit

  • New Features

    • Improved persona version history so more settings are included in comparisons and restores.
    • Group and persona avatars can now be left blank or updated more flexibly.
  • Bug Fixes

    • Fixed several edge cases around model settings, imports, scheduling, impersonation text, and chat history handling.
    • Improved saved state tracking when editing connection models.
    • API keys are now masked in connection responses, and activating a persona handles invalid or missing IDs more safely.
    • Generation results now preserve completion details more reliably across providers.

🔄 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/3053 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 6/29/2026 **Status:** ✅ Merged **Merged:** 6/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/issue-sweep-3033-3052` --- ### 📝 Commits (3) - [`c857f26`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c857f26c0a85d5fc3026a8d40c38206b4976e953) Start issue sweep 3033-3052 - [`bfb1bc7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bfb1bc762a16aa06f06c608457685230bab316db) Fix provider and library issue sweep - [`939cb6a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/939cb6ae730749fd524686e49d9050cf4bfcd699) Address CodeRabbit review feedback ### 📊 Changes **17 files changed** (+434 additions, -248 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+0 -1) 📝 `packages/client/src/components/modals/ImportPersonaModal.tsx` (+1 -1) 📝 `packages/client/src/components/personas/PersonaEditor.tsx` (+2 -0) 📝 `packages/server/src/routes/characters.routes.ts` (+25 -31) 📝 `packages/server/src/routes/connections.routes.ts` (+7 -5) 📝 `packages/server/src/routes/conversation.routes.ts` (+47 -23) 📝 `packages/server/src/routes/generate.routes.ts` (+18 -5) 📝 `packages/server/src/services/conversation/impersonate-prompt.ts` (+15 -5) 📝 `packages/server/src/services/llm/providers/anthropic.provider.ts` (+11 -4) 📝 `packages/server/src/services/llm/providers/google.provider.ts` (+1 -0) 📝 `packages/server/src/services/llm/providers/local-sidecar.provider.ts` (+3 -3) 📝 `packages/server/src/services/llm/providers/openai.provider.ts` (+211 -139) 📝 `packages/server/src/services/storage/characters.storage.ts` (+53 -8) 📝 `packages/server/src/services/storage/connections.storage.ts` (+37 -23) 📝 `packages/shared/src/schemas/character.schema.ts` (+1 -0) 📝 `packages/shared/src/types/character.ts` (+1 -0) </details> ### 📄 Description ## Linked issue Addresses #3033 Addresses #3034 Addresses #3035 Addresses #3036 Addresses #3037 Addresses #3038 Addresses #3039 Addresses #3040 Addresses #3041 Addresses #3042 Addresses #3043 Addresses #3044 Addresses #3045 Addresses #3046 Addresses #3047 Addresses #3048 Addresses #3049 Addresses #3050 Addresses #3051 Addresses #3052 ## Why this change - Preserve provider finish/truncation signals so cut-off or filtered responses are not recorded as clean completions. - Close several state-preservation holes in connections, schedules, autonomous conversation state, folders, personas, and impersonation prompts. ## What changed - Threaded finish reasons through Gemini non-streaming, Anthropic non-streaming/streaming, OpenAI chat/completions, and Responses streaming/non-streaming paths, and propagated streaming usage finish reasons into saved generation info. - Allowed Anthropic cache breakpoints to attach to image/document-only turns and allowed valid thinking-only Anthropic terminal streams. - Made Local Model sidecar respect per-request temperature, topP, and topK outside structured-output mode. - Masked encrypted connection API keys in mutation responses and preserved the one-default-per-provider-category invariant when provider changes move a connection between text/image categories. - Kept manual model edits from clearing the visible Max Output Tokens Override field. - Cleaned deleted character/persona IDs out of denormalized folder membership arrays. - Added a safe 404 path for stale persona activation IDs, allowed character group avatars through the shared schema, and made persona versions capture/restore savedStatusOptions. - Preserved object-form personaStats imports from plain JSON persona files. - Switched schedule generation saves to queued metadata patches that merge only changed character schedules. - Stopped manual conversation replies from consuming autonomous follow-up slots while preserving assistant activity timestamps. - Preserved Name Prefix History for in-turn individual group replies and kept inline custom impersonate prompt text when adjacent placeholders are empty. - Updated CHANGELOG.md for v2.0.7. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `pnpm --filter @marinara-engine/shared build` passed. - `pnpm --filter @marinara-engine/server lint` passed. - `pnpm --filter @marinara-engine/client lint` passed. - `pnpm regression:prompt` passed. - `pnpm check` passed. - `git diff --check` passed. - Manual browser verification not performed in this pass. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - Not captured; UI-facing changes are state/import/editor behavior fixes validated through typecheck, lint, and build. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved persona version history so more settings are included in comparisons and restores. * Group and persona avatars can now be left blank or updated more flexibly. * **Bug Fixes** * Fixed several edge cases around model settings, imports, scheduling, impersonation text, and chat history handling. * Improved saved state tracking when editing connection models. * API keys are now masked in connection responses, and activating a persona handles invalid or missing IDs more safely. * Generation results now preserve completion details more reliably across providers. <!-- 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-22 04:19:32 +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#5789
No description provided.