[PR #1708] [MERGED] feat(gacha-forge): save and unlock witnessed Home artwork #1699

Closed
opened 2026-10-27 06:05:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: feat/gacha-home-background-downloads


📝 Commits (5)

  • 62e9c86 feat(gacha-forge): add shared gallery download controller (WIP)
  • 4df20ed Unlock experienced artwork and download Home backgrounds
  • e776a18 Merge branch 'staging' into feat/gacha-home-background-downloads
  • 71cde76 Merge staging into Home artwork downloads
  • a8d5ddf ci(gacha-forge): run artwork authority regressions

📊 Changes

25 files changed (+2211 additions, -59 deletions)

View changed files

📝 .github/workflows/gacha-forge-browser.yml (+2 -1)
📝 .github/workflows/pull-request-checks.yml (+3 -0)
➕ artifacts/gacha-forge-1.21.0.zip (+0 -0)
📝 catalog/catalog.json (+24 -9)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+24 -9)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+24 -9)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/gacha-forge/CHANGELOG.md (+6 -0)
📝 packages/gacha-forge/README.md (+6 -0)
📝 packages/gacha-forge/bundle-patches.json (+86 -0)
📝 packages/gacha-forge/client.js (+303 -3)
📝 packages/gacha-forge/manifest.json (+21 -6)
📝 packages/gacha-forge/server.mjs (+244 -4)
➕ packages/gacha-forge/src/background-download-client.mjs (+148 -0)
➕ packages/gacha-forge/src/background-unlocks-client.mjs (+139 -0)
➕ packages/gacha-forge/src/background-unlocks-server.mjs (+238 -0)
📝 packages/gacha-forge/src/player-choices-client.mjs (+9 -0)
➕ tests/gacha-forge-background-package.regression.mjs (+205 -0)

...and 5 more files

📄 Description

Linked issue

Closes #1705. Uses the merged Pasta-Devs/Marinara-Engine#8334 host capability (API 1.385).

Why this change

Future generated scenes appeared in Home’s background picker before the player reached them, spoiling upcoming scenes. Players also had no direct way to save images from this picker to their device.

What changed

Story backgrounds and key images now unlock only after their image has loaded in a visible scene, including Character Stories and Seasonal events. A brief “New background unlocked” notice confirms a new image. The server protects both the picker list and direct selection, respects saved choices, and permits selected alternate branches during completed-story replay without changing canon.

Every image thumbnail in Home → Background → Change → Story / Story CG / Banners / Bond now has a small download button. Downloading leaves the picker open and does not select the image. The package reuses Engine’s existing gallery helpers, including prepared iPhone native sharing, Android saving and silent cancellation.

Completed canonical scenes and existing background selections migrate safely. Earned snapshots retain their original image and authoritative Gallery reference when later generation replaces the same location. Canon, progression, wallet and unrelated saved records remain intact.

Validation

  • pnpm check, catalog/localization validation, reversible source rebuild and reproducible official package build passed.
  • All 58 current-source Gacha Forge regression suites passed, including 11 unlock authority cases, four client visibility/lifecycle contracts and seven actual activated-package SDK cases.
  • Actual Engine public file-backed persistence passed three fresh-process phases using the unchanged current unlock-server module: a second-CAS failure rolls back migration and unlock writes; reopening preserves the old records; a successful unlock persists once with legacy selection and six other records unchanged.
  • The installed package passed all 16 browser cases across dark/light desktop and mobile Chromium/WebKit, including all four download categories, normal thumbnail selection, prepared sharing/cancel, hidden-before-load visibility recovery, the brief notice and reopened picker history. Eight positive picker captures were retained. Hosted browser evidence is also available for the final CI-only head.
  • The official 1.21.0 archive’s 265 payloads match its manifest, all three catalogs and both installed browser fixtures. No real generation providers were used.
  • The final staging-integration CodeRabbit review completed with one finding dismissed after tracing repository policy: a stable Engine release is not a prerequisite for this authorized staging PR. CONTRIBUTING requires the capability API gate; Engine API 1.385 is already merged on Engine staging, with all post-merge CI passed. No compatibility requirement was relaxed. The subsequent three-command CI-only review completed with zero findings. No billing or review configuration was changed. Independent source review and unchanged browser assertions also verified Gallery references, replay/visibility guards, metadata request classification and download hit-target placement.
  • The three new background unlock, witness-client and activated-package regression suites are now explicitly run by Catalog validation. The CI-only follow-up re-ran all 11 + 4 + 7 focused contracts successfully, passes YAML formatting and diff checks, and leaves package, manifest, archive and catalog bytes unchanged.
  • Final head a8d5ddf5f44e8b460eb730107b3480841efc3a1a passes all seven required GitHub checks and the additional hosted browser proof (39 passed, one intentional skip). Dottore reviewed the full package-identical integration at 71cde760 and then the exact final CI delta: both Viable With Notes, zero defects and zero notes, with zero inline threads. The final delta review records two packet/proof-visibility unknowns and one least-privilege pass; the actual hosted log confirms all three added regression commands executed successfully.

Manual verification

  • Manually verify native image sharing and Save Image on a physical iPhone; emulation and synthetic native bridges do not establish device proof.
  • Manually inspect generated artwork from an existing long-running playthrough after the update.

Coordination

Merged actual staging at 7d92f5183c6c9d339a9a04c2f2c0c31acaee37ae, preserving the maintainer’s e776a18 web merge. This PR’s diff against that base contains only artwork/download changes; Gacha Forge 1.20’s proactive messages, context floor, pacing, and cleanup remain baseline behavior. The 25 client and 16 server source-patch groups from staging are unchanged, with only the 1.21 artwork groups appended.

Engine API 1.385 is on Engine staging; the browser workflow keeps that canonical checkout. Unit-card and banner fixes remain in separate PRs. Merged to staging as 9d5efd802bb5f6d722b1dc6654b5e3330fca06e9 from reviewed head a8d5ddf5f44e8b460eb730107b3480841efc3a1a. Final-head checks and Dottore Review passed. The public raw staging and immutable merge catalogs, manifest, client and 1.21.0 ZIP match: 8,682,849 bytes, SHA-256 ac99b0f2e877467d6c2cccb71b4b2cb18f08eeb5d56b5092a2c283f8d52c1622, 265 verified payloads plus the manifest. No CDN mismatch was observed. Separately, post-merge CodeQL passed for that exact merge. No stable release or main promotion is claimed.


🔄 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/1708 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/gacha-home-background-downloads` --- ### 📝 Commits (5) - [`62e9c86`](https://github.com/Pasta-Devs/Marinara-Agents/commit/62e9c86ba54d6f7ee66d9b4d56b01dec32307239) feat(gacha-forge): add shared gallery download controller (WIP) - [`4df20ed`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4df20ed550255de7cfac2328688d2094c48d33b0) Unlock experienced artwork and download Home backgrounds - [`e776a18`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e776a18fd47f44e6352e417687eb68332625b717) Merge branch 'staging' into feat/gacha-home-background-downloads - [`71cde76`](https://github.com/Pasta-Devs/Marinara-Agents/commit/71cde7604375e04ed521f7109a311b0909948b6f) Merge staging into Home artwork downloads - [`a8d5ddf`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a8d5ddf5f44e8b460eb730107b3480841efc3a1a) ci(gacha-forge): run artwork authority regressions ### 📊 Changes **25 files changed** (+2211 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/gacha-forge-browser.yml` (+2 -1) 📝 `.github/workflows/pull-request-checks.yml` (+3 -0) ➕ `artifacts/gacha-forge-1.21.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+24 -9) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+24 -9) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+24 -9) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/gacha-forge/CHANGELOG.md` (+6 -0) 📝 `packages/gacha-forge/README.md` (+6 -0) 📝 `packages/gacha-forge/bundle-patches.json` (+86 -0) 📝 `packages/gacha-forge/client.js` (+303 -3) 📝 `packages/gacha-forge/manifest.json` (+21 -6) 📝 `packages/gacha-forge/server.mjs` (+244 -4) ➕ `packages/gacha-forge/src/background-download-client.mjs` (+148 -0) ➕ `packages/gacha-forge/src/background-unlocks-client.mjs` (+139 -0) ➕ `packages/gacha-forge/src/background-unlocks-server.mjs` (+238 -0) 📝 `packages/gacha-forge/src/player-choices-client.mjs` (+9 -0) ➕ `tests/gacha-forge-background-package.regression.mjs` (+205 -0) _...and 5 more files_ </details> ### 📄 Description ## Linked issue Closes #1705. Uses the merged Pasta-Devs/Marinara-Engine#8334 host capability (API 1.385). ## Why this change Future generated scenes appeared in Home’s background picker before the player reached them, spoiling upcoming scenes. Players also had no direct way to save images from this picker to their device. ## What changed Story backgrounds and key images now unlock only after their image has loaded in a visible scene, including Character Stories and Seasonal events. A brief “New background unlocked” notice confirms a new image. The server protects both the picker list and direct selection, respects saved choices, and permits selected alternate branches during completed-story replay without changing canon. Every image thumbnail in **Home → Background → Change → Story / Story CG / Banners / Bond** now has a small download button. Downloading leaves the picker open and does not select the image. The package reuses Engine’s existing gallery helpers, including prepared iPhone native sharing, Android saving and silent cancellation. Completed canonical scenes and existing background selections migrate safely. Earned snapshots retain their original image and authoritative Gallery reference when later generation replaces the same location. Canon, progression, wallet and unrelated saved records remain intact. ## Validation - `pnpm check`, catalog/localization validation, reversible source rebuild and reproducible official package build passed. - All 58 current-source Gacha Forge regression suites passed, including 11 unlock authority cases, four client visibility/lifecycle contracts and seven actual activated-package SDK cases. - Actual Engine public file-backed persistence passed three fresh-process phases using the unchanged current unlock-server module: a second-CAS failure rolls back migration and unlock writes; reopening preserves the old records; a successful unlock persists once with legacy selection and six other records unchanged. - The installed package passed all 16 browser cases across dark/light desktop and mobile Chromium/WebKit, including all four download categories, normal thumbnail selection, prepared sharing/cancel, hidden-before-load visibility recovery, the brief notice and reopened picker history. Eight positive picker captures were retained. [Hosted browser evidence](https://github.com/Pasta-Devs/Marinara-Agents/actions/runs/40248458742/artifacts/12619553767) is also available for the final CI-only head. - The official 1.21.0 archive’s 265 payloads match its manifest, all three catalogs and both installed browser fixtures. No real generation providers were used. - The final staging-integration CodeRabbit review completed with one finding dismissed after tracing repository policy: a stable Engine release is not a prerequisite for this authorized staging PR. CONTRIBUTING requires the capability API gate; Engine API 1.385 is already merged on Engine staging, with all post-merge CI passed. No compatibility requirement was relaxed. The subsequent three-command CI-only review completed with zero findings. No billing or review configuration was changed. Independent source review and unchanged browser assertions also verified Gallery references, replay/visibility guards, metadata request classification and download hit-target placement. - The three new background unlock, witness-client and activated-package regression suites are now explicitly run by Catalog validation. The CI-only follow-up re-ran all 11 + 4 + 7 focused contracts successfully, passes YAML formatting and diff checks, and leaves package, manifest, archive and catalog bytes unchanged. - Final head `a8d5ddf5f44e8b460eb730107b3480841efc3a1a` passes all seven required GitHub checks and the additional hosted browser proof (39 passed, one intentional skip). Dottore reviewed the full package-identical integration at `71cde760` and then the exact final CI delta: both Viable With Notes, zero defects and zero notes, with zero inline threads. The final delta review records two packet/proof-visibility unknowns and one least-privilege pass; the actual hosted log confirms all three added regression commands executed successfully. ## Manual verification - [ ] Manually verify native image sharing and Save Image on a physical iPhone; emulation and synthetic native bridges do not establish device proof. - [ ] Manually inspect generated artwork from an existing long-running playthrough after the update. ## Coordination Merged actual `staging` at `7d92f5183c6c9d339a9a04c2f2c0c31acaee37ae`, preserving the maintainer’s `e776a18` web merge. This PR’s diff against that base contains only artwork/download changes; Gacha Forge 1.20’s proactive messages, context floor, pacing, and cleanup remain baseline behavior. The 25 client and 16 server source-patch groups from staging are unchanged, with only the 1.21 artwork groups appended. Engine API 1.385 is on Engine `staging`; the browser workflow keeps that canonical checkout. Unit-card and banner fixes remain in separate PRs. Merged to `staging` as `9d5efd802bb5f6d722b1dc6654b5e3330fca06e9` from reviewed head `a8d5ddf5f44e8b460eb730107b3480841efc3a1a`. Final-head checks and Dottore Review passed. The public raw `staging` and immutable merge catalogs, manifest, client and 1.21.0 ZIP match: 8,682,849 bytes, SHA-256 `ac99b0f2e877467d6c2cccb71b4b2cb18f08eeb5d56b5092a2c283f8d52c1622`, 265 verified payloads plus the manifest. No CDN mismatch was observed. Separately, [post-merge CodeQL](https://github.com/Pasta-Devs/Marinara-Agents/actions/runs/40249246190) passed for that exact merge. No stable release or main promotion is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 06:05:57 +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#1699
No description provided.