mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2437] [Issue]: 11-PROV-ASSET-image-output-normalization drops normalized image extension #1192
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#1192
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?
Originally created by @Promansis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2437
Originally assigned to: @SpicyMarinara on GitHub.
Summary
11-PROV-ASSET-image-output-normalizationhas a parity gap: refactor image provider transport returnsbase64andmimeType, but no normalized file extension, and some data URL / JSON base64 paths pass through provider data without the legacy decode, validation, and re-encode normalization before storage callers save assets.Links back to #2410.
Expected behavior
Legacy
mainnormalizes image provider outputs into{ base64, mimeType, ext }. Data URLs are decoded, validated, re-encoded, and mapped to an extension before callers save files.Actual behavior
Refactor Rust provider transport returns
(base64, mime)and the publicimage_generatecommand emitsbase64,mimeType, andimage, but noext. Several JSON/data URL base64 extraction paths validate size only and preserve provider-declared MIME/base64 text without the same legacy decode/re-encode normalization.Steps to reproduce
11-PROV-ASSET-image-output-normalizationfrom #2410.packages/server/src/services/image/image-generation.tsresult normalization with refactorsrc-tauri/src/commands/storage/images/providers.rsandsrc-tauri/src/commands/storage/images.rs.mimeTypeafterimage_generate.Impact area
Environment
Logs, screenshots, or video
Proof used: static trace only.
Files inspected:
packages/server/src/services/image/image-generation.ts:99,:390,:519,:565,:977,:1187,:1412,:1774,:1916packages/server/src/services/game/game-asset-generation.ts:92src-tauri/src/commands/storage/images/providers.rs:58,:543,:1462,:2768src-tauri/src/commands/storage/images.rs:186src/features/catalog/gallery/hooks/use-gallery.ts:157Regression notes
Legacy
ImageGenResultcarriedbase64,mimeType, andext; game asset saving could also fall back through byte detection andext/MIME normalization. Refactor loses theextpart of the normalized transport result before some callers save assets.Additional context
Acceptance criteria:
11-PROV-ASSET-image-output-normalizationprovider outputs normalizebase64,mimeType, and file extension before storage callers save assets.11-PROV-ASSET-image-reference-transportbehavior is preserved.11-PROV-ASSET-image-reference-transportwas scanned in the same batch and did not have a confirmed parity gap.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jun 6, 2026):
Fixed on refactor in commit
3ac37e0a.What changed:
Verification: