[PR #1882] [MERGED] feat(otome-forge): show only the current named speaker sprite #2011

Closed
opened 2026-11-07 16:38:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1882
Author: @SpicyMarinara
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/otome-speaker-sprites


📝 Commits (10+)

  • 5076918 feat(otome-forge): resolve exact full-body speaker sprites safely
  • f4330a8 feat(otome-forge): isolate and clean named speaker sprites
  • 29c36e3 fix(otome-forge): align speaker identity with literal card search
  • 97ee995 fix(otome-forge): reject stale speaker catalog snapshots
  • 7fe9e3f Merge commit 'a9ea5198f4' into feat/otome-speaker-sprites
  • 7ee2fa1 feat(otome-forge): package current named speaker sprites in 0.1.11
  • 206201c test(otome-forge): normalize disabled audio in reader fixtures
  • 902c3b6 fix(otome-forge): verify actual character storage rows for speakers
  • 527ce57 fix(otome-forge): prove speaker uniqueness across catalog locales
  • d3ab355 Merge corrected expression repaint release into speaker candidate

📊 Changes

18 files changed (+1081 additions, -143 deletions)

View changed files

➕ artifacts/otome-forge-0.1.11.zip (+0 -0)
📝 catalog/preview/catalog.json (+6 -6)
📝 catalog/preview/notes.json (+6 -6)
📝 catalog/preview/v2/catalog.json (+6 -6)
📝 catalog/preview/v2/notes.json (+6 -6)
📝 catalog/preview/v3/catalog.json (+6 -6)
📝 catalog/preview/v3/notes.json (+6 -6)
📝 packages/otome-forge/CHANGELOG.md (+4 -0)
📝 packages/otome-forge/README.md (+1 -0)
📝 packages/otome-forge/client.js (+102 -102)
📝 packages/otome-forge/manifest.json (+3 -3)
➕ packages/otome-forge/src/engine/packages/client/src/features/otome-forge/lib/speaker-sprites.ts (+116 -0)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/FacePlate.tsx (+1 -1)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/Reader.tsx (+4 -0)
➕ packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/SpeakerPlate.tsx (+116 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
➕ tests/otome-forge-speaker-sprites.regression.ts (+263 -0)
📝 tests/package-otome-forge-reader.e2e.ts (+434 -0)

📄 Description

Linked issue

Closes #1876. Owner: @SpicyMarinara.

Why this change

A named speaker outside the love-interest cast could inherit the previous character's portrait. Existing card sprites also need background checks before display. The reader should show the current speaker's existing sprite only when identity and asset checks succeed, with an empty stage during unresolved or failed work.

What changed

  • Named non-LI dialogue clears the prior character immediately. One exact, unique full-name match to an existing card can supply a saved full-body raster, preferring Full Body Neutral. Native card rows are parsed and revalidated by ID/name; metadata URLs never become fetch targets. LI, persona, narration and thought routing retain their existing renderers.
  • Identity uses trim plus locale-independent lower-case comparison. An unfiltered, generation-consistent catalog scan avoids server-locale search omissions, stops at 2,000 rows, and fails closed if uniqueness cannot be established. Internal-space and Unicode-normalization aliases are not introduced.
  • A shared alpha heuristic gates both the source image and cleanup result. Subject bounds use half the raster's maximum alpha, preserving intentionally translucent sprites while ignoring faint padding noise. At least 5% of those bounds must be fully clear. This rejects isolated corner pixels and transparent outer margins. It classifies without changing any supplied pixel. Alpha alone cannot distinguish a silhouette-shaped opaque mask from a genuine cut-out with the same transparency pattern; this is documented rather than presented as perfect background detection.
  • Images that need cleanup wait for the existing free service. Revision 2 hosts use builtin cleanup at strength 35; older hosts use the compatible policy. Failed cleanup leaves the stage empty. Display caching is bounded and version-aware. No card originals are rewritten, and no permanent LI links, paid art generation, providers, host APIs, stored fields or permissions are added.
  • Ships the supported Otome Hearth 0.1.11 rebuild. The inherited server and all Gacha 1.27.5 payload/manifest/archive bytes remain identical to reviewed 47586a6e1. Actual staging merge 8696a3456 is an ancestor.

Regression evidence

  • Native host boundary: reproduced the old lookup failure against real { id, data: JSON.stringify(card) } rows, then repaired guarded legacy/v2/v3 parsing and live-ID revalidation. Positive fixtures now use native storage-row shapes. Final proof includes an actual Engine-created card and sprite, actual catalog/detail/list/file responses, exact PNG bytes, and removal of only that synthetic card/sprite in finally. Model/scene responses remain controlled.
  • Locale and ambiguity: reproduced a Turkish-host filtered search omitting a client-equivalent duplicate. The unfiltered bounded scan passes that regression, literal duplicate and catalog-generation guards; doubled-space and fullwidth variants remain distinct.
  • Dottore alpha LOW: reproduced both defects on the old artifact: corner-only source transparency skipped cleanup, and corner-only cleanup output was displayed. Added meaningful full-body and tight-bust PNG fixtures; corner, margin and faint-margin sources now stay hidden until cleanup succeeds, while corner-only cleanup replies remain blank. The tight bust has only 60/1,024 clear pixels and alpha 64; it displays directly. Pure alpha 64/127 silhouettes remain accepted, alpha-1 padding noise is rejected, empty images fail closed, and input pixels are unchanged. The intermediate absolute-128 regression was reproduced and corrected before publication. Original RED logs and intact traces remain preserved.
  • Fixture accuracy: the shared reader stub supplies the normalized disabled audio shape guaranteed by production (chapterThemes: false, tracks: []), a test-only follow-up to #1874. Held WebKit routes await actual handler/response completion and assert the current LI before and after release. Missing-file probes use a new ?v=2 metadata version and await the actual 404; unchanged v=1 bytes can legitimately remain cached. Existing stage, identity, late-response and missing-image assertions remain intact. No timeout increases, weaker semantic assertions or skips.

Validation

  • Required formatting/lint, strict package types, catalog lanes/locales/integrity/release notes and diff checks passed. Full check: zero errors and 815 existing warnings. Strict checks: 78 server/shared and 127 client files.
  • 415 Otome regressions passed (410 TypeScript plus five bundle cases), zero failures or skips. Inherited repaint ownership and blank-positive 400/zero-paid guards remain green. Forge kit options plus Gacha location, canonical rebuild/replay and seasonal replay passed.
  • 45 exact-artifact browser cases passed with one worker: 40 speaker cases across desktop/mobile Chromium and WebKit, one actual Engine card/catalog/sprite positive, and four original reader positives. No paid-provider or physical-device claim.
  • Genuine incremental CodeRabbit review of exact 04f9e1c9a4ac997fb512ddefd21a528fb8f0c5dd against 47586a6e1d44b1bea2b32e56ec81338891237a09 completed with zero findings across ten text files, including client and catalogs. Only the ZIP was excluded; its exact seven safe members, CRCs and all six payload hashes/sizes were independently audited and match both installed profiles. Earlier valid findings were repaired, not dismissed.
  • Root independently reviewed the final source, scope and package bytes. Hosted required checks and Dottore re-review remain merge gates after this update.
Final payload Bytes SHA-256
Client 1,105,710 839980a17adf47e36484f9111bad5a10be8500212b6858bdc635eca3c23898b3
Server, unchanged 395,576 f1f9011938ab7fbfbf0490ba1aa306ef218de9d893c53cbc05b7a73b6ebe361f
ZIP 1,652,938 50785bc8d9dbb3cbd0d26f81c359c8d3e99b748081f989b5d5f68ce22785e698

Receipts: /tmp/otome-0111-final-artifact-proof.json, /tmp/otome-0111-final-proof.md, /tmp/otome-0111-host-boundary-proof.md; final browser logs/results /tmp/otome-0111-alpha-relative-{real-host,speaker,original-reader}*; final review /tmp/otome-0111-alpha-relative-coderabbit.log. Earlier 47586 and absolute-128 proofs are historical.

Manual verification

  • Manually verify on a physical phone that an unmatched named speaker clears the previous portrait immediately.
  • Manually verify a unique existing card uses Full Body Neutral while duplicate names remain empty.
  • Manually verify cut-out and intentionally translucent sprite framing with representative saved character art.

🔄 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-Agents/pull/1882 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/otome-speaker-sprites` --- ### 📝 Commits (10+) - [`5076918`](https://github.com/Pasta-Devs/Marinara-Agents/commit/50769180c9ee99ec74bb035bafd28e3beb27dcee) feat(otome-forge): resolve exact full-body speaker sprites safely - [`f4330a8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f4330a8a71891ebff27be2f149f503fb45ae2520) feat(otome-forge): isolate and clean named speaker sprites - [`29c36e3`](https://github.com/Pasta-Devs/Marinara-Agents/commit/29c36e3f6ad77efc3eb39d0f18ff17dc2ca9e106) fix(otome-forge): align speaker identity with literal card search - [`97ee995`](https://github.com/Pasta-Devs/Marinara-Agents/commit/97ee99556d6b2b275a70026b43409dfed24d7f0c) fix(otome-forge): reject stale speaker catalog snapshots - [`7fe9e3f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7fe9e3fb6d7278c5b6517d28a2c87ac7ef518163) Merge commit 'a9ea5198f40f70ae0ebcd883e15c57f9cbe34814' into feat/otome-speaker-sprites - [`7ee2fa1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7ee2fa1acf4d5fde1a1f0a3deb33c9c1c24fa52b) feat(otome-forge): package current named speaker sprites in 0.1.11 - [`206201c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/206201c6ba87acbf1413893ad095600f14ebef96) test(otome-forge): normalize disabled audio in reader fixtures - [`902c3b6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/902c3b6095dea6ce4d3da640f1202aeb6d460c03) fix(otome-forge): verify actual character storage rows for speakers - [`527ce57`](https://github.com/Pasta-Devs/Marinara-Agents/commit/527ce571878d597a359bba016352807b68b07d89) fix(otome-forge): prove speaker uniqueness across catalog locales - [`d3ab355`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d3ab3555fa2a60c60aee4b70488a496928286648) Merge corrected expression repaint release into speaker candidate ### 📊 Changes **18 files changed** (+1081 additions, -143 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/otome-forge-0.1.11.zip` (+0 -0) 📝 `catalog/preview/catalog.json` (+6 -6) 📝 `catalog/preview/notes.json` (+6 -6) 📝 `catalog/preview/v2/catalog.json` (+6 -6) 📝 `catalog/preview/v2/notes.json` (+6 -6) 📝 `catalog/preview/v3/catalog.json` (+6 -6) 📝 `catalog/preview/v3/notes.json` (+6 -6) 📝 `packages/otome-forge/CHANGELOG.md` (+4 -0) 📝 `packages/otome-forge/README.md` (+1 -0) 📝 `packages/otome-forge/client.js` (+102 -102) 📝 `packages/otome-forge/manifest.json` (+3 -3) ➕ `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/lib/speaker-sprites.ts` (+116 -0) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/FacePlate.tsx` (+1 -1) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/Reader.tsx` (+4 -0) ➕ `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/reader/SpeakerPlate.tsx` (+116 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) ➕ `tests/otome-forge-speaker-sprites.regression.ts` (+263 -0) 📝 `tests/package-otome-forge-reader.e2e.ts` (+434 -0) </details> ### 📄 Description ## Linked issue Closes #1876. Owner: @SpicyMarinara. ## Why this change A named speaker outside the love-interest cast could inherit the previous character's portrait. Existing card sprites also need background checks before display. The reader should show the current speaker's existing sprite only when identity and asset checks succeed, with an empty stage during unresolved or failed work. ## What changed - Named non-LI dialogue clears the prior character immediately. One exact, unique full-name match to an existing card can supply a saved full-body raster, preferring Full Body Neutral. Native card rows are parsed and revalidated by ID/name; metadata URLs never become fetch targets. LI, persona, narration and thought routing retain their existing renderers. - Identity uses trim plus locale-independent lower-case comparison. An unfiltered, generation-consistent catalog scan avoids server-locale search omissions, stops at 2,000 rows, and fails closed if uniqueness cannot be established. Internal-space and Unicode-normalization aliases are not introduced. - A shared alpha heuristic gates both the source image and cleanup result. Subject bounds use half the raster's maximum alpha, preserving intentionally translucent sprites while ignoring faint padding noise. At least 5% of those bounds must be fully clear. This rejects isolated corner pixels and transparent outer margins. It classifies without changing any supplied pixel. Alpha alone cannot distinguish a silhouette-shaped opaque mask from a genuine cut-out with the same transparency pattern; this is documented rather than presented as perfect background detection. - Images that need cleanup wait for the existing free service. Revision 2 hosts use builtin cleanup at strength 35; older hosts use the compatible policy. Failed cleanup leaves the stage empty. Display caching is bounded and version-aware. No card originals are rewritten, and no permanent LI links, paid art generation, providers, host APIs, stored fields or permissions are added. - Ships the supported Otome Hearth 0.1.11 rebuild. The inherited server and all Gacha 1.27.5 payload/manifest/archive bytes remain identical to reviewed `47586a6e1`. Actual staging merge `8696a3456` is an ancestor. ## Regression evidence - **Native host boundary:** reproduced the old lookup failure against real `{ id, data: JSON.stringify(card) }` rows, then repaired guarded legacy/v2/v3 parsing and live-ID revalidation. Positive fixtures now use native storage-row shapes. Final proof includes an actual Engine-created card and sprite, actual catalog/detail/list/file responses, exact PNG bytes, and removal of only that synthetic card/sprite in `finally`. Model/scene responses remain controlled. - **Locale and ambiguity:** reproduced a Turkish-host filtered search omitting a client-equivalent duplicate. The unfiltered bounded scan passes that regression, literal duplicate and catalog-generation guards; doubled-space and fullwidth variants remain distinct. - **Dottore alpha LOW:** reproduced both defects on the old artifact: corner-only source transparency skipped cleanup, and corner-only cleanup output was displayed. Added meaningful full-body and tight-bust PNG fixtures; corner, margin and faint-margin sources now stay hidden until cleanup succeeds, while corner-only cleanup replies remain blank. The tight bust has only 60/1,024 clear pixels and alpha 64; it displays directly. Pure alpha 64/127 silhouettes remain accepted, alpha-1 padding noise is rejected, empty images fail closed, and input pixels are unchanged. The intermediate absolute-128 regression was reproduced and corrected before publication. Original RED logs and intact traces remain preserved. - **Fixture accuracy:** the shared reader stub supplies the normalized disabled audio shape guaranteed by production (`chapterThemes: false`, `tracks: []`), a test-only follow-up to #1874. Held WebKit routes await actual handler/response completion and assert the current LI before and after release. Missing-file probes use a new `?v=2` metadata version and await the actual 404; unchanged `v=1` bytes can legitimately remain cached. Existing stage, identity, late-response and missing-image assertions remain intact. No timeout increases, weaker semantic assertions or skips. ## Validation - Required formatting/lint, strict package types, catalog lanes/locales/integrity/release notes and diff checks passed. Full check: zero errors and 815 existing warnings. Strict checks: 78 server/shared and 127 client files. - **415 Otome regressions passed** (410 TypeScript plus five bundle cases), zero failures or skips. Inherited repaint ownership and blank-positive 400/zero-paid guards remain green. Forge kit options plus Gacha location, canonical rebuild/replay and seasonal replay passed. - **45 exact-artifact browser cases passed** with one worker: 40 speaker cases across desktop/mobile Chromium and WebKit, one actual Engine card/catalog/sprite positive, and four original reader positives. No paid-provider or physical-device claim. - Genuine incremental CodeRabbit review of exact `04f9e1c9a4ac997fb512ddefd21a528fb8f0c5dd` against `47586a6e1d44b1bea2b32e56ec81338891237a09` completed with zero findings across ten text files, including client and catalogs. Only the ZIP was excluded; its exact seven safe members, CRCs and all six payload hashes/sizes were independently audited and match both installed profiles. Earlier valid findings were repaired, not dismissed. - Root independently reviewed the final source, scope and package bytes. Hosted required checks and Dottore re-review remain merge gates after this update. | Final payload | Bytes | SHA-256 | | --- | ---: | --- | | Client | 1,105,710 | `839980a17adf47e36484f9111bad5a10be8500212b6858bdc635eca3c23898b3` | | Server, unchanged | 395,576 | `f1f9011938ab7fbfbf0490ba1aa306ef218de9d893c53cbc05b7a73b6ebe361f` | | ZIP | 1,652,938 | `50785bc8d9dbb3cbd0d26f81c359c8d3e99b748081f989b5d5f68ce22785e698` | Receipts: `/tmp/otome-0111-final-artifact-proof.json`, `/tmp/otome-0111-final-proof.md`, `/tmp/otome-0111-host-boundary-proof.md`; final browser logs/results `/tmp/otome-0111-alpha-relative-{real-host,speaker,original-reader}*`; final review `/tmp/otome-0111-alpha-relative-coderabbit.log`. Earlier `47586` and absolute-128 proofs are historical. ## Manual verification - [ ] Manually verify on a physical phone that an unmatched named speaker clears the previous portrait immediately. - [ ] Manually verify a unique existing card uses Full Body Neutral while duplicate names remain empty. - [ ] Manually verify cut-out and intentionally translucent sprite framing with representative saved character art. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:38:44 +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-Agents#2011
No description provided.