[PR #5962] [MERGED] Issue Sweep: assigned runtime, agents, and setup fixes #7002

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5962
Author: @SpicyMarinara
Created: 9/8/2026
Status: ✅ Merged
Merged: 9/8/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/issue-sweep-sep8


📝 Commits (5)

  • 796d31a chore: start assigned issue sweep
  • 3ff924a fix: sweep assigned runtime, custom agent, and wizard issues
  • 15e5a97 Merge remote-tracking branch 'origin/staging' into codex/issue-sweep-sep8
  • 3635a7b fix(agents): anchor continuation context to generated assistant turns
  • aabfbf5 fix: handle late wizard settings and graceful launcher signals

📊 Changes

56 files changed (+1586 additions, -171 deletions)

View changed files

📝 CHANGELOG.md (+7 -0)
📝 CONTRIBUTING.md (+1 -0)
📝 docs/CONFIGURATION.md (+2 -0)
📝 docs/TROUBLESHOOTING.md (+6 -0)
➕ e2e/issue-sweep-defaults.e2e.ts (+255 -0)
📝 package.json (+1 -1)
📝 packages/client/src/components/agents/AgentEditor.tsx (+46 -1)
➕ packages/client/src/components/agents/AgentOutputSpoiler.tsx (+13 -0)
📝 packages/client/src/components/chat/AgentSuiteModal.tsx (+25 -22)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+162 -40)
📝 packages/client/src/components/chat/RoleplayHUDActionsMenu.tsx (+9 -0)
📝 packages/client/src/components/game/NewGameExperienceChooser.tsx (+1 -1)
📝 packages/client/src/hooks/use-agents.ts (+1 -0)
📝 packages/client/src/hooks/use-settings-sync.ts (+4 -1)
➕ packages/client/src/lib/chat-wizard-defaults.ts (+48 -0)
📝 packages/client/src/lib/game-tag-parser.ts (+4 -4)
📝 packages/client/src/localization/locales/en.json (+11 -0)
📝 packages/client/src/stores/ui.store.ts (+16 -0)
📝 packages/server/package.json (+1 -1)
📝 packages/server/src/db/schema/agents.ts (+2 -0)

...and 36 more files

📄 Description

Linked issue

Closes #5934
Closes #5937
Closes #5938
Closes #5945
Closes #5946
Closes #5948

Why this change

This sweep covers the six assigned Engine issues without an existing implementation PR. It fixes unsafe restarts, malformed combat-tag stalls, lost Experience setup data, custom-agent continuation context, escaped lorebook names, and repetitive chat setup. Existing contributor PRs and drafts are left alone.

What changed

  • Restart ownership moves to the existing platform launch flow and pnpm start: the replacement starts only after the old process exits, stays in the same console, and uses the existing bounded shutdown helper. Docker retains its container restart policy. Unsupervised/dev starts get an explicit explanation instead of an orphan replacement.
  • Reuse the shared linear Game-tag attribute scanner in the client.
  • Preserve explicit Experience configuration without double nesting; increase the bounded setup payload limit to 262,144 characters.
  • Custom agents can opt into their own previous visible-turn output, including private agent-context JSON. JSON context injection exposes only text; private context is excluded from main-prompt markers and cross-agent results. Existing saved runs supply history, with the active swipe recorded; deletion and regeneration rewind context. Optional spoilers reuse native disclosures, and activated lorebook entries include names.
  • Decode model-generated XML entity escapes in lorebook names once, preserving locks, authored content, and human-approved names.
  • Reuse wizard controls and UI preferences for mode-specific Save as default / Reset defaults. Profiles stay separate; footer controls wrap on mobile. Initial defaults wait for cross-device settings sync, including a loading state. New UI copy uses English localization keys and existing theme tokens.
  • Keep regression source assertions aligned with the changed launcher/preview paths rather than weakening their behavioral checks.

Validation

Automated evidence (not a claim of manual device testing):

  • pnpm check passed, including localization, TypeScript, ESLint, E2E type checking, and production builds. Repeated after staging integration.

  • pnpm version:check passed; no release version bump.

  • Targeted browser suite: 24/24 passed, desktop Chromium, mobile Chromium, and mobile WebKit, both light and dark themes. Saves, reloads, resets, delayed cross-device settings sync, profile independence, persisted custom-agent switches, and viewport containment exercised. Screenshots inspected.

  • Parser red/green: a malformed 24k-character combat attribute took about 1.34 seconds before the fix and passes the 300ms regression budget afterward.

  • Real Fastify restart under the launcher: one live server, different PID after restart, old PID gone, same owning parent, no writer-lease overlap. Bounded forced restart preserves exit code 75; graceful held-request shutdown and unmanaged-start rejection also exercised.

  • Production server signal red/green: with the TTY flag emulated, a PID-targeted SIGINT now reaches the child, and a second signal during a held HTTP request still completes graceful shutdown without a forced exit. Native Windows behavior remains a manual verification item.

  • Real Experience create-route tests cover explicit and legacy long configurations, opaque payload preservation, and oversize rejection.

  • Custom-agent tests exercise two isolated mock-provider calls, own-output macros, private/public separation (including rewrite-agent summaries), source-off behavior, active swipes, historical regeneration, deletion, and cross-chat isolation. An additional real generation-route red/green proof ensures successful pre-generation output belongs to the generated assistant turn; the next iteration after regenerate/delete cannot inherit the discarded turn's context. Existing cached pre-generation behavior on regeneration is preserved.

  • Lorebook tests cover escaped-name matching, locked entries, verbatim content, approvals, and avoiding a second decode of approved names.

  • After staging integration, the full local Node run passed 230/231 files with canonical TMPDIR=/private/tmp. The remaining storage-writer-lock fixture also fails on unchanged staging on this macOS host; that guard was not weakened. All Linux CI gates passed on final head aabfbf59e, including complete Node and desktop Chromium/mobile Chromium/mobile WebKit matrices, container validation, audit, and CodeQL. CodeRabbit completed with all review threads resolved. The follow-ups passed pnpm check, all 6 prompt suites, all 12 agent suites, and the new signal/sync proofs locally.

  • Manually verify a Windows launcher restart while a phone holds an active stream; confirm one visible console and no orphan or occupied port.

  • Manually verify Restart Server with the supported Docker restart policy.

  • Manually verify defaults with a populated personal library, selected backgrounds, personas, agents, and parameters on desktop and a physical phone.

  • Manually verify custom-agent private context and revealable saved output with your chosen provider.

  • Read and followed CONTRIBUTING.md.

Manual verification notes

No claim of native Windows, physical iPhone, or paid-provider validation. Browser proof used real app controls with an isolated local server; mock providers avoided billable calls. Impeccable guided reuse of existing controls, theme tokens, responsive wrapping, and light/dark browser proof, not a redesign.

Docs and release impact

Updated CHANGELOG.md, CONTRIBUTING.md, docs/CONFIGURATION.md, and docs/TROUBLESHOOTING.md. Reviewed install/update references in README, Android README, and FAQ; no change needed there. Translation follow-up: #5964 (docs-i18n only).

  • Review translated-documentation follow-up #5964.
  • No version bump or main promotion in this PR.

Scope exclusions

  • PR-covered contributor work: #5950, #5868, #5869, #5836, #5833, #5834, #5856.
  • Already implemented by merged PRs: #5947 (toast position) and #5916 (UX sweep; remaining physical-iPhone calibration is not duplicated here).
  • Documentation-only work explicitly routed to docs-i18n, including #5867, #5941, #5951, is not mixed into a staging implementation sweep.

UI evidence

e2e/issue-sweep-defaults.e2e.ts writes wizard/agent screenshots and attaches them to the browser run for every viewport/theme combination.


🔄 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/5962 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/8/2026 **Status:** ✅ Merged **Merged:** 9/8/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/issue-sweep-sep8` --- ### 📝 Commits (5) - [`796d31a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/796d31a082b0a253cac442aea0fad28474315677) chore: start assigned issue sweep - [`3ff924a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3ff924a0aeb2c15d274b26c72921b80b5be850eb) fix: sweep assigned runtime, custom agent, and wizard issues - [`15e5a97`](https://github.com/Pasta-Devs/Marinara-Engine/commit/15e5a97a838c97aa8506d79023a0b727dfb156b5) Merge remote-tracking branch 'origin/staging' into codex/issue-sweep-sep8 - [`3635a7b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3635a7b2ea2bba65678cb6118e562869c44b8d16) fix(agents): anchor continuation context to generated assistant turns - [`aabfbf5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/aabfbf59e830677a2f580592b06d782481cc5aad) fix: handle late wizard settings and graceful launcher signals ### 📊 Changes **56 files changed** (+1586 additions, -171 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+7 -0) 📝 `CONTRIBUTING.md` (+1 -0) 📝 `docs/CONFIGURATION.md` (+2 -0) 📝 `docs/TROUBLESHOOTING.md` (+6 -0) ➕ `e2e/issue-sweep-defaults.e2e.ts` (+255 -0) 📝 `package.json` (+1 -1) 📝 `packages/client/src/components/agents/AgentEditor.tsx` (+46 -1) ➕ `packages/client/src/components/agents/AgentOutputSpoiler.tsx` (+13 -0) 📝 `packages/client/src/components/chat/AgentSuiteModal.tsx` (+25 -22) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+162 -40) 📝 `packages/client/src/components/chat/RoleplayHUDActionsMenu.tsx` (+9 -0) 📝 `packages/client/src/components/game/NewGameExperienceChooser.tsx` (+1 -1) 📝 `packages/client/src/hooks/use-agents.ts` (+1 -0) 📝 `packages/client/src/hooks/use-settings-sync.ts` (+4 -1) ➕ `packages/client/src/lib/chat-wizard-defaults.ts` (+48 -0) 📝 `packages/client/src/lib/game-tag-parser.ts` (+4 -4) 📝 `packages/client/src/localization/locales/en.json` (+11 -0) 📝 `packages/client/src/stores/ui.store.ts` (+16 -0) 📝 `packages/server/package.json` (+1 -1) 📝 `packages/server/src/db/schema/agents.ts` (+2 -0) _...and 36 more files_ </details> ### 📄 Description ## Linked issue Closes #5934 Closes #5937 Closes #5938 Closes #5945 Closes #5946 Closes #5948 ## Why this change This sweep covers the six assigned Engine issues without an existing implementation PR. It fixes unsafe restarts, malformed combat-tag stalls, lost Experience setup data, custom-agent continuation context, escaped lorebook names, and repetitive chat setup. Existing contributor PRs and drafts are left alone. ## What changed - Restart ownership moves to the existing platform launch flow and `pnpm start`: the replacement starts only after the old process exits, stays in the same console, and uses the existing bounded shutdown helper. Docker retains its container restart policy. Unsupervised/dev starts get an explicit explanation instead of an orphan replacement. - Reuse the shared linear Game-tag attribute scanner in the client. - Preserve explicit Experience configuration without double nesting; increase the bounded setup payload limit to 262,144 characters. - Custom agents can opt into their own previous visible-turn output, including private `agent-context` JSON. JSON context injection exposes only `text`; private context is excluded from main-prompt markers and cross-agent results. Existing saved runs supply history, with the active swipe recorded; deletion and regeneration rewind context. Optional spoilers reuse native disclosures, and activated lorebook entries include names. - Decode model-generated XML entity escapes in lorebook names once, preserving locks, authored content, and human-approved names. - Reuse wizard controls and UI preferences for mode-specific Save as default / Reset defaults. Profiles stay separate; footer controls wrap on mobile. Initial defaults wait for cross-device settings sync, including a loading state. New UI copy uses English localization keys and existing theme tokens. - Keep regression source assertions aligned with the changed launcher/preview paths rather than weakening their behavioral checks. ## Validation Automated evidence (not a claim of manual device testing): - `pnpm check` passed, including localization, TypeScript, ESLint, E2E type checking, and production builds. Repeated after staging integration. - `pnpm version:check` passed; no release version bump. - Targeted browser suite: **24/24 passed**, desktop Chromium, mobile Chromium, and mobile WebKit, both light and dark themes. Saves, reloads, resets, delayed cross-device settings sync, profile independence, persisted custom-agent switches, and viewport containment exercised. Screenshots inspected. - Parser red/green: a malformed 24k-character combat attribute took about 1.34 seconds before the fix and passes the 300ms regression budget afterward. - Real Fastify restart under the launcher: one live server, different PID after restart, old PID gone, same owning parent, no writer-lease overlap. Bounded forced restart preserves exit code 75; graceful held-request shutdown and unmanaged-start rejection also exercised. - Production server signal red/green: with the TTY flag emulated, a PID-targeted SIGINT now reaches the child, and a second signal during a held HTTP request still completes graceful shutdown without a forced exit. Native Windows behavior remains a manual verification item. - Real Experience create-route tests cover explicit and legacy long configurations, opaque payload preservation, and oversize rejection. - Custom-agent tests exercise two isolated mock-provider calls, own-output macros, private/public separation (including rewrite-agent summaries), source-off behavior, active swipes, historical regeneration, deletion, and cross-chat isolation. An additional real generation-route red/green proof ensures successful pre-generation output belongs to the generated assistant turn; the next iteration after regenerate/delete cannot inherit the discarded turn's context. Existing cached pre-generation behavior on regeneration is preserved. - Lorebook tests cover escaped-name matching, locked entries, verbatim content, approvals, and avoiding a second decode of approved names. - After staging integration, the full local Node run passed 230/231 files with canonical `TMPDIR=/private/tmp`. The remaining storage-writer-lock fixture also fails on unchanged staging on this macOS host; that guard was not weakened. All Linux CI gates passed on final head `aabfbf59e`, including complete Node and desktop Chromium/mobile Chromium/mobile WebKit matrices, container validation, audit, and CodeQL. CodeRabbit completed with all review threads resolved. The follow-ups passed `pnpm check`, all 6 prompt suites, all 12 agent suites, and the new signal/sync proofs locally. - [ ] Manually verify a Windows launcher restart while a phone holds an active stream; confirm one visible console and no orphan or occupied port. - [ ] Manually verify Restart Server with the supported Docker restart policy. - [ ] Manually verify defaults with a populated personal library, selected backgrounds, personas, agents, and parameters on desktop and a physical phone. - [ ] Manually verify custom-agent private context and revealable saved output with your chosen provider. - [ ] Read and followed `CONTRIBUTING.md`. ### Manual verification notes No claim of native Windows, physical iPhone, or paid-provider validation. Browser proof used real app controls with an isolated local server; mock providers avoided billable calls. Impeccable guided reuse of existing controls, theme tokens, responsive wrapping, and light/dark browser proof, not a redesign. ## Docs and release impact Updated `CHANGELOG.md`, `CONTRIBUTING.md`, `docs/CONFIGURATION.md`, and `docs/TROUBLESHOOTING.md`. Reviewed install/update references in README, Android README, and FAQ; no change needed there. Translation follow-up: #5964 (`docs-i18n` only). - [ ] Review translated-documentation follow-up #5964. - [ ] No version bump or `main` promotion in this PR. ## Scope exclusions - PR-covered contributor work: #5950, #5868, #5869, #5836, #5833, #5834, #5856. - Already implemented by merged PRs: #5947 (toast position) and #5916 (UX sweep; remaining physical-iPhone calibration is not duplicated here). - Documentation-only work explicitly routed to `docs-i18n`, including #5867, #5941, #5951, is not mixed into a staging implementation sweep. ## UI evidence `e2e/issue-sweep-defaults.e2e.ts` writes wizard/agent screenshots and attaches them to the browser run for every viewport/theme combination. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:15:38 +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#7002
No description provided.