[PR #1186] [MERGED] fix(gacha-forge): 1.8.11 — art is painted once on a slow connection, and a Tower boss heals like one of its escorts #1335

Closed
opened 2026-10-21 05:09:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1186
Author: @SonaGat3
Created: 10/1/2026
Status: ✅ Merged
Merged: 10/1/2026
Merged by: @SonaGat3

Base: staging ← Head: feature/gacha-forge-1.8.11


📝 Commits (1)

  • ddeeafd fix(gacha-forge): 1.8.11 — art is painted once on a slow connection, and a Tower boss heals like one of its escorts

📊 Changes

12 files changed (+311 additions, -286 deletions)

View changed files

➕ artifacts/gacha-forge-1.8.11.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/gacha-forge/CHANGELOG.md (+5 -0)
📝 packages/gacha-forge/README.md (+2 -0)
📝 packages/gacha-forge/client.js (+157 -157)
📝 packages/gacha-forge/manifest.json (+5 -5)
📝 packages/gacha-forge/server.mjs (+100 -100)

📄 Description

Linked issue

Closes #1184
Closes #1185

Why this change

staging carries Gacha Forge 1.8.9. Two player reports, two families of bug (1.8.10 was installed for testing only and ships here, inside 1.8.11):

  • Art paid for twice. "generated all the backgrounds and enemies for a chapter and then decided to generate them all a second time." Every painter asked "is this already painted?" when it was queued, then waited for the image connection's turn. On a slow connection the queue outlived the 20-minute dedupe ceiling: the next request found the lock expired and nothing filed yet, and painted again.
  • A boss that healed off its whole bar. "a boss on the tower that can heal itself for 25% of its hp per ultimate." Every heal scales off the healer's max HP, and a Tower boss's bar is inflated by its boss shape and its floor weight: the floor 40 Mender healed its side for 22.5% of that bar with every Ultimate. The card's CP counted the same inflated heal, which is how its weight had grown to 1.54 — and floor 40 had become harder than floors 45 and 50.

What changed

Painters (server.mjs)

  • One shape for every painter: paintOnce(connection, { force, have, paint }). With the image connection's queue slot held, have() re-reads what is filed and answers it; only if nothing is there does paint() paint, upload and file. A copy queued behind finds the first one's picture. Covered: a chapter's backgrounds and enemies, a mode's backdrop, banner art, portraits, key images, Bond backgrounds, the outfit rotation and the Bond outfit. A redo (force: banner and portrait redo, /bond/repaint) still always paints.
  • Text stays outside the slot. Deriving image tags, a banner's scene line, a key image's English scene or an outfit's subject is another connection; holding the image slot through it would stall every picture of the world. Nothing inside the slot awaits a dedupe'd promise (its owner runs without the slot and would wait for it forever).
  • The outfit rotation files each outfit as it lands, merged by unit into what the document holds now, and checks the rotation's cap under the slot. The old final write of the local list is gone (it erased pieces another pass had filed). One outfit that cannot be saved does not stop the others; it is logged and still counts toward the rotation's existing two-failure breaker, so a store that refuses every write does not repaint on every boot.
  • Writes are checked. Banner art and key images go through the existing checked, retried registry write in a no-create mode (a document deleted while its picture was painting is not reborn as a ghost that pins the art). writePortrait checks and retries; on a retry an automatic writer (the card-avatar adoption) yields to a portrait the player set in between. The portrait route refuses to paint from an edit that was not saved.
  • A Bond outfit already in the wardrobe with its rung unsettled is settled and handed over, before the outfit and image switches are read — never painted again. The client adds it to the wardrobe only if it is not there.
  • The chat photo is left as it is: it is requested once, when its message arrives, and nothing asks for it again.

Tower bosses (combat-sim, power, the enemy sheet, server.mjs)

  • A boss heals from one of its escorts' bodies. healPool(kit, hpMax): a kit carrying healAs: { hp, share } heals from HP_BASE + hp × power × share × HP_PER (capped at its bar); without it, from its own bar — every unit that is not a boss fights byte for byte as before. healAs is relative to the kit's power, so a fit or a bench that rescales power rescales the heal with it. All eight heals that read the healer's bar use it (Ultimate heal and cleanse, passive heal and cleanse, the revive's team heal in both, the regen aura, the Water bonus).
  • Effigy bosses (10-70) heal as their own body at the escort's scale and power (share 0.6/1.6); book bosses (71-100) as their book's escorts (0.35/1.6).
  • The CP reads the same helper, so the floor card counts the heal the fight makes, and the enemy sheet scales every heal figure once, so it promises the heal the boss really casts.
  • healAs joins SIM_KIT_FIELDS: the fight /tower/start freezes keeps it, so /tower/claim replays the heal the screen played (mech once had exactly this bug).
  • The Effigy Mender's weight was re-fitted, 1.54 → 1.15, on both Tower benches: the requirement bench (with the card's CP, Auto wins about half) gives ×0.95, and the ladder bench (no floor won less often than one above it, same team) passes — the Lv 50 team now wins floor 40 21/24 (was 14/24). The other six bosses and the book are unchanged. Healer bosses in the book were measured too (a book with its bosses forced to heal, six halves): they were easier than intended (×0.71–0.84, because the card counted a heal they never made) and now sit at ×0.78–0.88; no weight changes.

Generated outputs

packages/gacha-forge/client.js, server.mjs, manifest.json, the artifact zip, the catalog family and the release-notes sidecars were re-derived by node scripts/build-gacha-forge-package.mjs from the committed payload bytes. Nothing was hand-edited; re-running the builder after the commit leaves the tree clean.

Package and security impact

  • capabilityApi, the engine range, permissions, contribution slots, assets, builtAgainst and restartRequired are unchanged. The only manifest field that moved is version, verified by diffing against the staging manifest with the hash lines filtered out.
  • Routes: 121 → 121. None added, none removed.
  • No new model calls and no new stored values. Fewer image calls: a picture is no longer paid twice. The one new field, healAs, lives on a Tower fight's enemy kits, built per fight and frozen with it.
  • Payload: client.js 1,435,025 → 1,436,506 bytes, server.mjs 495,733 → 498,958, artifact 7,830,915 → 7,835,622. All art is byte-identical: 244 of 247 payload files are unchanged (only client.js, server.mjs and manifest.json move).

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

⚠️ Why the fourth box is unticked. 1.8.11 is not published, so it cannot be installed through the Engine's download path. The same bytes were installed by sideload into a staging Engine, and the catalog zip matches that install file by file.

Manual verification notes

  • Branch hygiene. Branched from the current origin/staging; git ls-files --eol | grep -c w/crlf → 0; git diff --check "origin/staging...HEAD" clean; the build is reproducible.
  • The catalog zip matches the sideloaded install, file by file: 247 of 248 entries are byte-identical; only manifest.json differs, which every installer rewrites.
  • Repo checks run locally, in the workflow's own order — the script is generated from pull-request-checks.yml at origin/staging, so its 25 steps cannot go stale: 24 of 25 green. ⚠️ npm run test:security fails on Windows for a reason unrelated to this change (catalog-path-safety.regression.mjs expects a POSIX path and gets D:\tmp\package\assets\icon.png); its log never names gacha-forge, and it failed identically on a clean staging checkout for every earlier Gacha Forge PR.
  • Package's own suite: eleven probes plus a 132-script bench, plus the phone probe — all green (796 s). The Tower ladder bench, red on 1.8.9 with that save, is green.
  • Every new check was verified failing against the previous code, except the one that guards the no-create write (a key image deleted mid-paint is not re-created), which the old code met too. Painters: with the painter held and the clock moved past the ceiling, two requests painted each banner, portrait, key image and Bond background twice and a rotation of 3 outfits 6 times; now once each, and 3. A write losing one race no longer loses the art; an outfit whose save loses twice leaves the other two filed and is the only one repainted on the next boot, and the loss reaches the breaker. Bosses: the sheet's heal figure equals the heal the fight makes for a boss with healAs (Ultimate heal, the Water bonus, Ultimate cleanse, passive heal and cleanse), and is unchanged (22.5% of the bar) without it; healAs survives the freeze.
  • Reviewed before and after building by separate read-only reviewers, against the package's crossing checklist (what happens if the save fails, if the model answers oddly, if a lock expires with work still queued, what a frozen fight replays...). Their findings are in this change: the freeze dropping healAs, two heals missed at first, the CP counting the old heal, the rotation's final write erasing pieces.

Documentation impact

  • Updated this README catalog and package guidance
  • No documentation changes needed
  • Updated linked Marinara Engine documentation

packages/gacha-forge/README.md gains the 1.8.11 paragraph; packages/gacha-forge/CHANGELOG.md gains 1.8.11. The repository README is unchanged.

UI evidence (if applicable)

Summary by CodeRabbit

  • Bug Fixes
    • Fixed Tower boss healing and floor-40 scaling.
    • Reduced duplicate art generation on slow connections and improved outfit rotation recovery when some items fail to save.
    • Fixed cases where an already-owned Bond outfit was not marked as claimed or returned.
  • Updates
    • Released Gacha Forge version 1.8.11.

🔄 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/1186 **Author:** [@SonaGat3](https://github.com/SonaGat3) **Created:** 10/1/2026 **Status:** ✅ Merged **Merged:** 10/1/2026 **Merged by:** [@SonaGat3](https://github.com/SonaGat3) **Base:** `staging` ← **Head:** `feature/gacha-forge-1.8.11` --- ### 📝 Commits (1) - [`ddeeafd`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ddeeafd00e6a9e58dae3989ed03cf9b0126d3c37) fix(gacha-forge): 1.8.11 — art is painted once on a slow connection, and a Tower boss heals like one of its escorts ### 📊 Changes **12 files changed** (+311 additions, -286 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/gacha-forge-1.8.11.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/gacha-forge/CHANGELOG.md` (+5 -0) 📝 `packages/gacha-forge/README.md` (+2 -0) 📝 `packages/gacha-forge/client.js` (+157 -157) 📝 `packages/gacha-forge/manifest.json` (+5 -5) 📝 `packages/gacha-forge/server.mjs` (+100 -100) </details> ### 📄 Description ## Linked issue Closes #1184 Closes #1185 ## Why this change `staging` carries Gacha Forge **1.8.9**. Two player reports, two families of bug (1.8.10 was installed for testing only and ships here, inside 1.8.11): - **Art paid for twice.** *"generated all the backgrounds and enemies for a chapter and then decided to generate them all a second time."* Every painter asked "is this already painted?" when it was queued, then waited for the image connection's turn. On a slow connection the queue outlived the 20-minute `dedupe` ceiling: the next request found the lock expired and nothing filed yet, and painted again. - **A boss that healed off its whole bar.** *"a boss on the tower that can heal itself for 25% of its hp per ultimate."* Every heal scales off the healer's max HP, and a Tower boss's bar is inflated by its boss shape and its floor weight: the floor 40 Mender healed its side for 22.5% of that bar with every Ultimate. The card's CP counted the same inflated heal, which is how its weight had grown to 1.54 — and floor 40 had become harder than floors 45 and 50. ## What changed **Painters (`server.mjs`)** - **One shape for every painter: `paintOnce(connection, { force, have, paint })`.** With the image connection's queue slot held, `have()` re-reads what is filed and answers it; only if nothing is there does `paint()` paint, upload and file. A copy queued behind finds the first one's picture. Covered: a chapter's backgrounds and enemies, a mode's backdrop, banner art, portraits, key images, Bond backgrounds, the outfit rotation and the Bond outfit. A redo (`force`: banner and portrait redo, `/bond/repaint`) still always paints. - **Text stays outside the slot.** Deriving image tags, a banner's scene line, a key image's English scene or an outfit's subject is another connection; holding the image slot through it would stall every picture of the world. Nothing inside the slot awaits a `dedupe`'d promise (its owner runs without the slot and would wait for it forever). - **The outfit rotation files each outfit as it lands**, merged by unit into what the document holds now, and checks the rotation's cap under the slot. The old final write of the local list is gone (it erased pieces another pass had filed). One outfit that cannot be saved does not stop the others; it is logged and still counts toward the rotation's existing two-failure breaker, so a store that refuses every write does not repaint on every boot. - **Writes are checked.** Banner art and key images go through the existing checked, retried registry write in a no-create mode (a document deleted while its picture was painting is not reborn as a ghost that pins the art). `writePortrait` checks and retries; on a retry an automatic writer (the card-avatar adoption) yields to a portrait the player set in between. The portrait route refuses to paint from an edit that was not saved. - **A Bond outfit already in the wardrobe with its rung unsettled** is settled and handed over, before the outfit and image switches are read — never painted again. The client adds it to the wardrobe only if it is not there. - **The chat photo is left as it is**: it is requested once, when its message arrives, and nothing asks for it again. **Tower bosses (`combat-sim`, `power`, the enemy sheet, `server.mjs`)** - **A boss heals from one of its escorts' bodies.** `healPool(kit, hpMax)`: a kit carrying `healAs: { hp, share }` heals from `HP_BASE + hp × power × share × HP_PER` (capped at its bar); without it, from its own bar — every unit that is not a boss fights byte for byte as before. `healAs` is **relative to the kit's power**, so a fit or a bench that rescales `power` rescales the heal with it. All eight heals that read the healer's bar use it (Ultimate heal and cleanse, passive heal and cleanse, the revive's team heal in both, the regen aura, the Water bonus). - **Effigy bosses (10-70)** heal as their own body at the escort's scale and power (`share` 0.6/1.6); **book bosses (71-100)** as their book's escorts (0.35/1.6). - **The CP reads the same helper**, so the floor card counts the heal the fight makes, and **the enemy sheet** scales every heal figure once, so it promises the heal the boss really casts. - **`healAs` joins `SIM_KIT_FIELDS`**: the fight `/tower/start` freezes keeps it, so `/tower/claim` replays the heal the screen played (`mech` once had exactly this bug). - **The Effigy Mender's weight was re-fitted, 1.54 → 1.15**, on both Tower benches: the requirement bench (with the card's CP, Auto wins about half) gives ×0.95, and the ladder bench (no floor won less often than one above it, same team) passes — the Lv 50 team now wins floor 40 21/24 (was 14/24). The other six bosses and the book are unchanged. Healer bosses in the book were measured too (a book with its bosses forced to heal, six halves): they were *easier* than intended (×0.71–0.84, because the card counted a heal they never made) and now sit at ×0.78–0.88; no weight changes. ### Generated outputs `packages/gacha-forge/client.js`, `server.mjs`, `manifest.json`, the artifact zip, the catalog family and the release-notes sidecars were **re-derived** by `node scripts/build-gacha-forge-package.mjs` from the committed payload bytes. Nothing was hand-edited; re-running the builder after the commit leaves the tree clean. ## Package and security impact - **`capabilityApi`, the `engine` range, permissions, contribution slots, assets, `builtAgainst` and `restartRequired` are unchanged.** The only manifest field that moved is `version`, verified by diffing against the `staging` manifest with the hash lines filtered out. - **Routes: 121 → 121.** None added, none removed. - **No new model calls and no new stored values.** Fewer image calls: a picture is no longer paid twice. The one new field, `healAs`, lives on a Tower fight's enemy kits, built per fight and frozen with it. - **Payload:** `client.js` 1,435,025 → 1,436,506 bytes, `server.mjs` 495,733 → 498,958, artifact 7,830,915 → 7,835,622. All art is byte-identical: 244 of 247 payload files are unchanged (only `client.js`, `server.mjs` and `manifest.json` move). ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [x] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [x] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` > ⚠️ **Why the fourth box is unticked.** 1.8.11 is not published, so it cannot be installed *through* the Engine's download path. The same bytes were installed by sideload into a `staging` Engine, and the catalog zip matches that install file by file. ### Manual verification notes - **Branch hygiene.** Branched from the current `origin/staging`; `git ls-files --eol | grep -c w/crlf` → **0**; `git diff --check "origin/staging...HEAD"` clean; the build is reproducible. - **The catalog zip matches the sideloaded install**, file by file: 247 of 248 entries are byte-identical; only `manifest.json` differs, which every installer rewrites. - **Repo checks run locally, in the workflow's own order** — the script is generated from `pull-request-checks.yml` at `origin/staging`, so its 25 steps cannot go stale: **24 of 25 green**. ⚠️ `npm run test:security` fails on Windows for a reason unrelated to this change (`catalog-path-safety.regression.mjs` expects a POSIX path and gets `D:\tmp\package\assets\icon.png`); its log never names gacha-forge, and it failed identically on a clean `staging` checkout for every earlier Gacha Forge PR. - **Package's own suite:** eleven probes plus a 132-script bench, plus the phone probe — all green (796 s). The Tower ladder bench, red on 1.8.9 with that save, is green. - **Every new check was verified failing against the previous code**, except the one that guards the no-create write (a key image deleted mid-paint is not re-created), which the old code met too. Painters: with the painter held and the clock moved past the ceiling, two requests painted each banner, portrait, key image and Bond background twice and a rotation of 3 outfits **6** times; now once each, and 3. A write losing one race no longer loses the art; an outfit whose save loses twice leaves the other two filed and is the only one repainted on the next boot, and the loss reaches the breaker. Bosses: the sheet's heal figure equals the heal the fight makes for a boss with `healAs` (Ultimate heal, the Water bonus, Ultimate cleanse, passive heal and cleanse), and is unchanged (22.5% of the bar) without it; `healAs` survives the freeze. - **Reviewed before and after building** by separate read-only reviewers, against the package's crossing checklist (what happens if the save fails, if the model answers oddly, if a lock expires with work still queued, what a frozen fight replays...). Their findings are in this change: the freeze dropping `healAs`, two heals missed at first, the CP counting the old heal, the rotation's final write erasing pieces. ## Documentation impact - [x] Updated this README catalog and package guidance - [ ] No documentation changes needed - [ ] Updated linked Marinara Engine documentation `packages/gacha-forge/README.md` gains the 1.8.11 paragraph; `packages/gacha-forge/CHANGELOG.md` gains 1.8.11. The repository README is unchanged. ## UI evidence (if applicable) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed Tower boss healing and floor-40 scaling. * Reduced duplicate art generation on slow connections and improved outfit rotation recovery when some items fail to save. * Fixed cases where an already-owned Bond outfit was not marked as claimed or returned. * **Updates** * Released Gacha Forge version 1.8.11. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:09:07 +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#1335
No description provided.