[PR #1738] [MERGED] Clean up stale test-only exports #5249

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1738
Author: @Xelvanis
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @Xelvanis

Base: refactor ← Head: chore/clean-test-only-exports


📝 Commits (1)

  • 7001427 Wire game segment edits into generation

📊 Changes

5 files changed (+578 additions, -6 deletions)

View changed files

📝 src/engine/generation/agent-runner.ts (+12 -2)
📝 src/engine/generation/prompt-assembly.ts (+9 -3)
➕ src/engine/modes/game/state/segment-edits.ts (+540 -0)
📝 src/engine/shared/scoring/skill-check-format.ts (+14 -0)
📝 src/features/modes/shared/chat-ui/components/ChatMessage.tsx (+3 -1)

📄 Description

Linked issue

None.

Why this change

  • Clean up stale public/test-only exports flagged by unused-code checks without deleting behavior that legacy still expects.
  • Legacy audit showed game VN segment edits/deletes are real model-context behavior, so this keeps that path and wires it into refactor generation instead of treating the file as dead.

What changed

  • Privatized same-module helpers and removed stale wrappers or test-only exports across engine, catalog, runtime, and shared helpers.
  • Updated the existing character/agent tests to use the supported public API surface.
  • Applied game segmentEdit:* / segmentDelete:* metadata before game history reaches prompt assembly and game agent context.
  • Preserved resolved skill-check summaries when stripped GM command tags are turned into model-visible history text.

Refactor impact

Primary owner:

Engine generation, game mode state helpers, catalog/runtime/shared export cleanup.

Impact areas reviewed:

  • Game prompt history assembly.
  • Game pre-generation agent activation and recent-message context.
  • Character catalog query tests and agent editor mock shape.
  • Knip unused export report.

Boundary notes:

  • Segment-edit behavior stays in src/engine/modes/game; chat and roleplay history are unchanged because the overlay only runs for chat.mode === "game".
  • No shared API, Tauri command, Rust storage, or remote-runtime boundary changes.

Pressure points touched:

  • src/engine/generation/prompt-assembly.ts
  • src/engine/generation/agent-runner.ts
  • No GameSurface, ModeSurface, shared API, or Rust command registration changes.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Browser screenshot/recording evidence added when UI/browser state is the claim
  • Remote runtime smoke checked when relevant

Manual verification notes

Commands run locally after the final diff and after deleting the extra new test file:

  • pnpm check
  • pnpm test
  • pnpm build
  • pnpm lint
  • pnpm perf:size
  • git diff --check

pnpm build still reports the existing CSS file property warning and chunk-size warnings. pnpm lint passes with the existing three warnings in ChatSettingsDrawer.tsx and sprite-display-modes.ts.

No browser/Tauri manual QA was run; this is engine prompt/context shaping plus export cleanup, with no visible UI change.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs changes made; this does not alter contributor workflow, public commands, or visible UI copy.

UI evidence

None. No visible UI change.


🔄 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/1738 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/31/2026 **Status:** ✅ Merged **Merged:** 5/31/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `chore/clean-test-only-exports` --- ### 📝 Commits (1) - [`7001427`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7001427672e3e901fdbfc44921417ad838f4c887) Wire game segment edits into generation ### 📊 Changes **5 files changed** (+578 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/generation/agent-runner.ts` (+12 -2) 📝 `src/engine/generation/prompt-assembly.ts` (+9 -3) ➕ `src/engine/modes/game/state/segment-edits.ts` (+540 -0) 📝 `src/engine/shared/scoring/skill-check-format.ts` (+14 -0) 📝 `src/features/modes/shared/chat-ui/components/ChatMessage.tsx` (+3 -1) </details> ### 📄 Description ## Linked issue None. ## Why this change - Clean up stale public/test-only exports flagged by unused-code checks without deleting behavior that legacy still expects. - Legacy audit showed game VN segment edits/deletes are real model-context behavior, so this keeps that path and wires it into refactor generation instead of treating the file as dead. ## What changed - Privatized same-module helpers and removed stale wrappers or test-only exports across engine, catalog, runtime, and shared helpers. - Updated the existing character/agent tests to use the supported public API surface. - Applied game `segmentEdit:*` / `segmentDelete:*` metadata before game history reaches prompt assembly and game agent context. - Preserved resolved skill-check summaries when stripped GM command tags are turned into model-visible history text. ## Refactor impact Primary owner: Engine generation, game mode state helpers, catalog/runtime/shared export cleanup. Impact areas reviewed: - Game prompt history assembly. - Game pre-generation agent activation and recent-message context. - Character catalog query tests and agent editor mock shape. - Knip unused export report. Boundary notes: - Segment-edit behavior stays in `src/engine/modes/game`; chat and roleplay history are unchanged because the overlay only runs for `chat.mode === "game"`. - No shared API, Tauri command, Rust storage, or remote-runtime boundary changes. Pressure points touched: - `src/engine/generation/prompt-assembly.ts` - `src/engine/generation/agent-runner.ts` - No `GameSurface`, `ModeSurface`, shared API, or Rust command registration changes. ## Validation - [x] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Browser screenshot/recording evidence added when UI/browser state is the claim - [ ] Remote runtime smoke checked when relevant ### Manual verification notes Commands run locally after the final diff and after deleting the extra new test file: - `pnpm check` - `pnpm test` - `pnpm build` - `pnpm lint` - `pnpm perf:size` - `git diff --check` `pnpm build` still reports the existing CSS `file` property warning and chunk-size warnings. `pnpm lint` passes with the existing three warnings in `ChatSettingsDrawer.tsx` and `sprite-display-modes.ts`. No browser/Tauri manual QA was run; this is engine prompt/context shaping plus export cleanup, with no visible UI change. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims No docs changes made; this does not alter contributor workflow, public commands, or visible UI copy. ## UI evidence None. No visible UI change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:14:35 +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#5249
No description provided.