[PR #2022] [MERGED] Accept amend guide source in generate request schema #5394

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2022
Author: @Xelvanis
Created: 6/3/2026
Status: ✅ Merged
Merged: 6/3/2026
Merged by: @Xelvanis

Base: refactor ← Head: fix/generate-request-amend-source


📝 Commits (1)

  • ed30196 generation: accept amend guide source in request schema

📊 Changes

3 files changed (+11 additions, -11 deletions)

View changed files

📝 src/engine/contracts/schemas/chat.schema.ts (+2 -1)
📝 src/engine/generation/generation-replay.ts (+6 -9)
📝 src/engine/shared/text/generation-guide.ts (+3 -1)

📄 Description

Linked issue

Closes #2013

Why this change

/amend is a current refactor generation guide source, but generateRequestSchema rejected it. That left the request contract behind the runtime, slash-command, and replay paths.

What changed

  • Added GENERATION_GUIDE_SOURCES as the shared runtime list for guide-source values.
  • Updated generateRequestSchema to validate against that shared list.
  • Updated generation replay validation to reuse the same guide-source list.

Refactor impact

Primary owner:

Engine generation contracts.

Impact areas reviewed:

  • /amend slash-command request shape.
  • Generation replay persistence and replay application.
  • Legacy guide-source behavior pattern: shared type, request schema, and replay validator stay aligned.
  • Existing legacy-compatible narrator, guide, and game_start values remain accepted.
  • Current game guide sources game_turn and game_retry remain accepted.

Boundary notes:

  • Engine-only contract/helper change.
  • No React UI, shared API wrapper, Rust command, HTTP dispatch, storage, or provider transport boundary changed.

Pressure points touched:

None.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Focused Vite SSR schema probe: narrator, guide, amend, game_start, game_turn, and game_retry accepted; invalid source rejected.
  • Focused Vite SSR replay probe: /amend guide stored as amend, stripped back to the revision instruction, and reapplied during replay.
  • pnpm typecheck passed.
  • pnpm check:architecture passed.
  • pnpm check passed.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

Bugfix for an existing generation contract; no new discoverable feature.

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 needed for this internal contract alignment.

UI evidence

No visible UI change.

Summary by CodeRabbit

  • Refactor
    • Consolidated internal generation guide source definitions into a centralized constant for improved maintainability.

🔄 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/2022 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 6/3/2026 **Status:** ✅ Merged **Merged:** 6/3/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `fix/generate-request-amend-source` --- ### 📝 Commits (1) - [`ed30196`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ed3019651190b48d0261237eb1e766117042c9f0) generation: accept amend guide source in request schema ### 📊 Changes **3 files changed** (+11 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/contracts/schemas/chat.schema.ts` (+2 -1) 📝 `src/engine/generation/generation-replay.ts` (+6 -9) 📝 `src/engine/shared/text/generation-guide.ts` (+3 -1) </details> ### 📄 Description ## Linked issue Closes #2013 ## Why this change `/amend` is a current refactor generation guide source, but `generateRequestSchema` rejected it. That left the request contract behind the runtime, slash-command, and replay paths. ## What changed - Added `GENERATION_GUIDE_SOURCES` as the shared runtime list for guide-source values. - Updated `generateRequestSchema` to validate against that shared list. - Updated generation replay validation to reuse the same guide-source list. ## Refactor impact Primary owner: Engine generation contracts. Impact areas reviewed: - `/amend` slash-command request shape. - Generation replay persistence and replay application. - Legacy guide-source behavior pattern: shared type, request schema, and replay validator stay aligned. - Existing legacy-compatible `narrator`, `guide`, and `game_start` values remain accepted. - Current game guide sources `game_turn` and `game_retry` remain accepted. Boundary notes: - Engine-only contract/helper change. - No React UI, shared API wrapper, Rust command, HTTP dispatch, storage, or provider transport boundary changed. Pressure points touched: None. ## Validation - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Focused Vite SSR schema probe: `narrator`, `guide`, `amend`, `game_start`, `game_turn`, and `game_retry` accepted; invalid source rejected. - Focused Vite SSR replay probe: `/amend` guide stored as `amend`, stripped back to the revision instruction, and reapplied during replay. - `pnpm typecheck` passed. - `pnpm check:architecture` passed. - `pnpm check` passed. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: Bugfix for an existing generation contract; no new discoverable feature. ## 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 needed for this internal contract alignment. ## UI evidence No visible UI change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Consolidated internal generation guide source definitions into a centralized constant for improved maintainability. <!-- 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:15:55 +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#5394
No description provided.