[PR #1321] [MERGED] Fix import rollback test fixtures #5039

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/refactor-rust-import-rollback-ci


📝 Commits (1)

  • 713d2fd Fix import rollback test fixtures

📊 Changes

2 files changed (+16 additions, -16 deletions)

View changed files

📝 src-tauri/src/commands/storage/imports/bulk_imports.rs (+10 -10)
📝 src-tauri/src/commands/storage/imports/service_tests.rs (+6 -6)

📄 Description

Linked issue

No linked issue. This unblocks the current refactor Rust CI failure.

Why this change

  • Rust import rollback tests were using malformed collection JSON as a write-failure fixture.
  • Storage now intentionally recovers corrupt collection files, so those tests no longer triggered rollback and instead imported successfully.

What changed

  • Updated rollback tests to block writes by placing a directory at the target collection file path.
  • Updated expected error codes from JSON parse errors to io_error, matching the actual write-blocked failure being tested.
  • Left production storage/import behavior unchanged.

Refactor impact

Primary owner:

Rust storage/import tests

Impact areas reviewed:

  • SillyTavern chat import rollback tests
  • Persona avatar import rollback tests
  • Embedded lorebook rollback tests
  • Storage corrupt collection recovery tests

Boundary notes:

  • Test-only change under src-tauri/src/commands/storage/imports.
  • No production storage, import, UI, API, schema, dependency, or release metadata changes.

Pressure points touched:

  • Import rollback coverage in bulk_imports.rs and service_tests.rs

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

Codex-run machine proof:

  • cargo test --manifest-path src-tauri/Cargo.toml --workspace storage_commands::imports::service::bulk_imports::tests -- --nocapture passed.
  • cargo test --manifest-path src-tauri/Cargo.toml --workspace storage_commands::imports::service::tests -- --nocapture passed.
  • cargo test --manifest-path src-tauri/Cargo.toml --workspace passed.
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passed.
  • cargo clippy --manifest-path src-tauri/Cargo.toml --workspace --all-targets -- -D warnings passed.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\rust-ci-verification.json passed.
  • Bunny review passed before opening: test-only diff, production behavior untouched, direct coverage for the failing CI rows.

Manual verification notes

  • No manual verification required; this is a Rust test-fixture/CI unblocker with no user-facing runtime 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 or release metadata changes needed.

UI evidence

N/A - no UI changed.


🔄 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/1321 **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-rust-import-rollback-ci` --- ### 📝 Commits (1) - [`713d2fd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/713d2fd5ae565cc0d6c81ec560127dca8a8ab21b) Fix import rollback test fixtures ### 📊 Changes **2 files changed** (+16 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/imports/bulk_imports.rs` (+10 -10) 📝 `src-tauri/src/commands/storage/imports/service_tests.rs` (+6 -6) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue No linked issue. This unblocks the current `refactor` Rust CI failure. ## Why this change - Rust import rollback tests were using malformed collection JSON as a write-failure fixture. - Storage now intentionally recovers corrupt collection files, so those tests no longer triggered rollback and instead imported successfully. ## What changed - Updated rollback tests to block writes by placing a directory at the target collection file path. - Updated expected error codes from JSON parse errors to `io_error`, matching the actual write-blocked failure being tested. - Left production storage/import behavior unchanged. ## Refactor impact Primary owner: Rust storage/import tests Impact areas reviewed: - SillyTavern chat import rollback tests - Persona avatar import rollback tests - Embedded lorebook rollback tests - Storage corrupt collection recovery tests Boundary notes: - Test-only change under `src-tauri/src/commands/storage/imports`. - No production storage, import, UI, API, schema, dependency, or release metadata changes. Pressure points touched: - Import rollback coverage in `bulk_imports.rs` and `service_tests.rs` ## 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 Codex-run machine proof: - `cargo test --manifest-path src-tauri/Cargo.toml --workspace storage_commands::imports::service::bulk_imports::tests -- --nocapture` passed. - `cargo test --manifest-path src-tauri/Cargo.toml --workspace storage_commands::imports::service::tests -- --nocapture` passed. - `cargo test --manifest-path src-tauri/Cargo.toml --workspace` passed. - `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passed. - `cargo clippy --manifest-path src-tauri/Cargo.toml --workspace --all-targets -- -D warnings` passed. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\rust-ci-verification.json` passed. - Bunny review passed before opening: test-only diff, production behavior untouched, direct coverage for the failing CI rows. ### Manual verification notes - No manual verification required; this is a Rust test-fixture/CI unblocker with no user-facing runtime 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 or release metadata changes needed. ## UI evidence N/A - no UI changed. --- <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:41 +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#5039
No description provided.