mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1651] [MERGED] [codex] Wire lorebook timing and skill check history #5183
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5183
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1651
Author: @Xelvanis
Created: 5/30/2026
Status: ✅ Merged
Merged: 5/30/2026
Merged by: @Xelvanis
Base:
refactor← Head:fix/lorebook-timing-skill-check-history📝 Commits (3)
ffc62d3Wire lorebook timing and skill check history7d32aecGuard skill check history rewrites by chatf00636eAddress lorebook timing review findings📊 Changes
15 files changed (+788 additions, -12 deletions)
View changed files
📝
src-tauri/crates/storage/src/lib.rs(+38 -0)📝
src-tauri/src/commands/storage/chats.rs(+68 -0)📝
src-tauri/src/commands/storage/commands/chats.rs(+17 -0)📝
src-tauri/src/http_dispatch.rs(+16 -0)📝
src-tauri/src/lib.rs(+1 -0)📝
src/engine/capabilities/storage.ts(+6 -0)📝
src/engine/generation/prompt-assembly.test.ts(+114 -0)📝
src/engine/generation/prompt-assembly.ts(+92 -1)📝
src/engine/generation/start-generation.test.ts(+133 -1)📝
src/engine/generation/start-generation.ts(+21 -0)📝
src/features/modes/game/api/game-api.test.ts(+175 -0)📝
src/features/modes/game/api/game-api.ts(+58 -10)📝
src/shared/api/remote-runtime.ts(+1 -0)📝
src/shared/api/storage-api.test.ts(+35 -0)📝
src/shared/api/storage-api.ts(+13 -0)📄 Description
Linked issue
No linked issue.
Why this change
input.messagesgenerations did not persist lorebook timing after save, and skill-check history rewrites used a blind read-modify-write on message content.What changed
Refactor impact
Primary owner:
Engine generation, game mode API, shared storage API, and Rust storage command routing.
Impact areas reviewed:
Boundary notes:
remote-runtime.ts, andhttp_dispatch.rs.Pressure points touched:
startGenerationpost-save metadata persistence in normal and direct-message branches.GameSurfacewas reviewed as a dependent caller but not modified.Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
origin/refactorbefore initial push.pnpm exec vitest run src/engine/generation/prompt-assembly.test.ts src/engine/generation/start-generation.test.ts src/features/modes/game/api/game-api.test.ts src/shared/api/storage-api.test.tsafter review fixes: 4 files passed, 135 tests passed.cargo test --manifest-path src-tauri/Cargo.toml update_message_content_if_unchanged_updates_only_matching_content: passed.pnpm typecheck: passed.cargo check --manifest-path src-tauri/Cargo.toml --workspace: passed.pnpm check:architecture: passed.pnpm check:unused: passed.pnpm format:check: passed.pnpm build: passed with the existing Vite large-chunk warning.git diff --check: passed.Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo changelog file is present in this repo. No docs updates were made because this wires existing runtime/history behavior and adds a narrow storage command for that path rather than changing setup, architecture guidance, or user-facing documentation.
UI evidence
Not a visual UI change; no screenshots or recordings added.
Summary by CodeRabbit
New Features
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.