[PR #1305] [MERGED] Fix assistant regenerate replay metadata #5028

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1305
Author: @cha1latte
Created: 5/26/2026
Status: ✅ Merged
Merged: 5/26/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/refactor-issue-1248-replay-metadata


📝 Commits (2)

  • 20428b4 Fix assistant regenerate replay metadata
  • 12e9669 Merge remote-tracking branch 'upstream/refactor' into fix/refactor-issue-1248-replay-metadata

📊 Changes

2 files changed (+173 additions, -4 deletions)

View changed files

📝 src/engine/generation/start-generation.test.ts (+140 -1)
📝 src/engine/generation/start-generation.ts (+33 -3)

📄 Description

Linked issue

Closes #1248

Why this change

  • Assistant regeneration on the refactor branch could lose the replay payload that shaped the original assistant response.
  • The generation path built replay data, but the regenerate path expects to read it from the assistant target, so guided regenerates and direct engine regenerates could drift.

What changed

  • Rehydrates stored assistant replay payloads before engine-level regenerate requests run.
  • Stores replay payloads on newly generated assistant messages.
  • Updates the regenerated assistant target when a new guided replay swipe becomes active.
  • Adds focused regression coverage for positive replay rows and negative controls.

Refactor impact

Primary owner:

engine generation

Impact areas reviewed:

  • runtime generation regenerate wrapper
  • assistant message extra contract
  • direct engine regenerate path
  • refactor branch PR template/base expectations

Boundary notes:

  • Product behavior stays in src/engine.
  • No React, shared API adapter, Rust storage, schema, dependency, version, or release metadata changes.

Pressure points touched:

  • src/engine/generation/start-generation.ts

Validation

  • pnpm check passes locally
  • 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
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Codex ran pnpm exec vitest run src/engine/generation/start-generation.test.ts --reporter=json --outputFile=scratch/issue-1248-vitest-after.json.
  • Codex ran pnpm typecheck.
  • Codex ran pnpm check, covering architecture, frontend/typecheck, Rust cargo check, and docs checks.
  • Codex ran node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json.
  • Bunny review passed before opening the PR.
  • No browser/Tauri manual verification was run because this is an engine replay-contract fix with focused harness coverage.

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 or release files changed.

UI evidence

N/A: no visible UI changes.


🔄 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/1305 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/26/2026 **Status:** ✅ Merged **Merged:** 5/26/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/refactor-issue-1248-replay-metadata` --- ### 📝 Commits (2) - [`20428b4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/20428b4b27f5796327d8ded850c2747d45bb20f7) Fix assistant regenerate replay metadata - [`12e9669`](https://github.com/Pasta-Devs/Marinara-Engine/commit/12e9669c7162746badadfc5cfaa7745326e8123c) Merge remote-tracking branch 'upstream/refactor' into fix/refactor-issue-1248-replay-metadata ### 📊 Changes **2 files changed** (+173 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/generation/start-generation.test.ts` (+140 -1) 📝 `src/engine/generation/start-generation.ts` (+33 -3) </details> ### 📄 Description ## Linked issue Closes #1248 ## Why this change - Assistant regeneration on the `refactor` branch could lose the replay payload that shaped the original assistant response. - The generation path built replay data, but the regenerate path expects to read it from the assistant target, so guided regenerates and direct engine regenerates could drift. ## What changed - Rehydrates stored assistant replay payloads before engine-level regenerate requests run. - Stores replay payloads on newly generated assistant messages. - Updates the regenerated assistant target when a new guided replay swipe becomes active. - Adds focused regression coverage for positive replay rows and negative controls. ## Refactor impact Primary owner: engine generation Impact areas reviewed: - runtime generation regenerate wrapper - assistant message extra contract - direct engine regenerate path - refactor branch PR template/base expectations Boundary notes: - Product behavior stays in `src/engine`. - No React, shared API adapter, Rust storage, schema, dependency, version, or release metadata changes. Pressure points touched: - `src/engine/generation/start-generation.ts` ## Validation - [ ] `pnpm check` passes locally - [ ] `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 - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Codex ran `pnpm exec vitest run src/engine/generation/start-generation.test.ts --reporter=json --outputFile=scratch/issue-1248-vitest-after.json`. - Codex ran `pnpm typecheck`. - Codex ran `pnpm check`, covering architecture, frontend/typecheck, Rust `cargo check`, and docs checks. - Codex ran `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json`. - Bunny review passed before opening the PR. - No browser/Tauri manual verification was run because this is an engine replay-contract fix with focused harness coverage. ## 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 or release files changed. ## UI evidence N/A: no visible UI changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:36 +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#5028
No description provided.