[PR #1156] [MERGED] fix(gacha-forge): 1.8.9 — the story is told with each character's sex, with art or without #1319

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1156
Author: @SonaGat3
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @SonaGat3

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


📝 Commits (4)

  • 9594465 fix(gacha-forge): 1.8.9 — the story is told with each character's sex, with art or without
  • 649a2c7 fix(gacha-forge): 1.8.9 — a sex that could not be saved waits before it is asked again
  • 191b90f Merge branch 'staging' into feature/gacha-forge-1.8.9
  • b75b0f1 fix(gacha-forge): 1.8.9 — one rule for every way a character can be left without a saved sex

📊 Changes

12 files changed (+150 additions, -122 deletions)

View changed files

➕ artifacts/gacha-forge-1.8.9.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 (+4 -0)
📝 packages/gacha-forge/README.md (+2 -0)
📝 packages/gacha-forge/client.js (+2 -2)
📝 packages/gacha-forge/manifest.json (+5 -5)
📝 packages/gacha-forge/server.mjs (+95 -91)

📄 Description

Linked issue

Closes #1155

Why this change

staging carries Gacha Forge 1.8.8. A player reported a unit drawn as a woman and narrated as a
man. Its description did not settle the question, and the two sides read different sources:

  • The picture is painted from the unit's appearance, and a field derived from it
    (identitySex) tells a group scene how to count its subjects.
  • The narrator received neither. formatCastPool — the one cast formatter, used by the chapter
    planner, every scene and the Character Story — sent name, rarity, role, affinity, description,
    personality and clothes. So it guessed.

That same formatter already solved this for clothes: it sends the derived outfit line the picture
paints from, with the comment "so the prose and the picture cannot disagree". The sex was left out.

Two gaps sat behind the report:

  • The field had a third value, other, which a group picture counted as a woman and the story
    could not read at all.
  • It only ever came from the call that prepares a portrait, so a world with images turned off
    never had it for anyone.

What changed

  • The narrator reads the field the picture reads. The cast sheet and the planner's index line
    carry (she/her) or (he/him):
    - Ilsa Verge (she/her) — 4★ · Normally wears: …. The index line matters as much as the sheet —
    the planner writes every node's guide from it, and a wrong pronoun there reaches the scenes.
    Nothing is added when the field is absent.
  • The sex is binary. The derivation asks male or female only. One reader (unitSex) serves
    the picture and the story, and reads a stored other as female — which is how every group picture
    already counted it, so no drawing changes and the story follows the picture.
  • A unit is born with it. Both prompts that mint a character — the founding cast's records and
    the featured banner's JSON — ask for it in the call that already writes the sheet, so it costs no
    extra call and cannot disagree with the appearance written beside it. It is optional in the
    validator, like every field that is not the fight: a sheet without it is still a unit, and the
    field stays absent rather than empty.
  • Units created before that are filled in once. fillCastSexes asks about every character of
    the world that has none, in one call, the first time the story is told (the planner and the scene
    ask); once every character has one, the call is never made again. /lore-status reads the same
    cast to count tokens and never pays for it.
    • The answer is keyed by character number. A bare list is only trusted at its exact length: one
      that comes back short would hand a character somebody else's sex.
    • It cannot stop a plan or a scene, whatever goes wrong inside it: the job catches everything.
    • One rule covers every way a character can be left without a saved answer — the call failing,
      the model leaving them out, a write losing its revision, a document gone, an error: the fill
      counts the units whose sex is on disk when it ends, and anything short of all of them waits ten
      minutes before it is tried again. The same answer is never paid for on every scene.

Not touched, on purpose: the chat (the unit already receives its whole appearance and speaks in
the first person) and the protagonist (the narrator already gets the persona's description).

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.
  • One new model call, once per world: the fill for characters that have no sex yet. It goes
    through the Engine profile's own main connection like every other structured call, sends each
    character's name, description, personality and appearance (clipped), and asks for male or
    female per character number. No new external service. Worlds whose cast already has the field never make it.
  • One new stored value per unit: identitySex, male or female. It already existed for units
    in worlds with art; it is now written for every unit. Nothing else is stored.
  • Payload: client.js 1,434,802 → 1,435,025 bytes (the player changelog line), server.mjs
    492,537 → 495,733, artifact 7,827,496 → 7,830,915. All art is byte-identical (245 of 247 payload
    files unchanged).

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.9 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. The build before this PR's review round was
played there: the Engine pinged 1.8.9 and the fill ran for real (see below); the review round
changed server.mjs only, and client.js is byte-identical.

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 compared run to run, plus the phone
    probe — all green (738 s).
  • Every new check was verified failing against the previous code. End to end: a scene's cast
    sheet read Ilsa Verge — 4★ · Normally wears… while her derived sex was female, and now reads
    Ilsa Verge (she/her); in a world with images off, the planner's sheet read
    Aki Vale — 4★ Tank, Water with no call to fill it, and now one call fills the two characters
    that lacked it (and only them), the same plan already carries their pronouns, the value is saved
    on each unit, and the next scene makes no extra call. Then each way of failing, in its own world:
    the call failing, a write that cannot land, a model that leaves a character out, a short list (no
    one is given a sex by position), a keyed answer arriving out of order, and a storage error thrown
    inside the fill — in every one the plan and the scene still come out and the following scene makes
    no second call.
  • The bench's fake model answers the fill apart from its queue, as it already did for another
    slow-lane call: otherwise it eats another check's queued answer and shifts six unrelated call
    counts.
  • Measured on a real save (three worlds with art, 28 characters): every cast unit already had
    the field, so those worlds never make the new call.
  • And the fill, run for real. The field was removed from one unit of that save — the only man in
    a cast of eleven — and a chapter was forged: the ledger shows one cast-sexes 1 call, ok on its
    first attempt, 13 tokens received, 6.5 s, before the chapter-plan call; the unit came back
    male; and the scenes that followed made no further call.

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.9 paragraph; packages/gacha-forge/CHANGELOG.md
gains 1.8.9. The repository README is unchanged.

UI evidence (if applicable)

Summary by CodeRabbit

  • Bug Fixes
    • Story narration now uses the correct gendered terms for characters, including when descriptions are vague.
  • New Features
    • Characters are assigned a sex whether or not the world has artwork. Existing characters receive this information the first time a story is told.
  • Release
    • Gacha Forge updated to version 1.8.9.

🔄 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/1156 **Author:** [@SonaGat3](https://github.com/SonaGat3) **Created:** 9/30/2026 **Status:** ✅ Merged **Merged:** 9/30/2026 **Merged by:** [@SonaGat3](https://github.com/SonaGat3) **Base:** `staging` ← **Head:** `feature/gacha-forge-1.8.9` --- ### 📝 Commits (4) - [`9594465`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9594465f9279dca9770076808c90580aa46a05cc) fix(gacha-forge): 1.8.9 — the story is told with each character's sex, with art or without - [`649a2c7`](https://github.com/Pasta-Devs/Marinara-Agents/commit/649a2c70e4dbfd54ac9a20a3ce878336e7749d50) fix(gacha-forge): 1.8.9 — a sex that could not be saved waits before it is asked again - [`191b90f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/191b90f060a063edae10ab98873c9146c6be7de9) Merge branch 'staging' into feature/gacha-forge-1.8.9 - [`b75b0f1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b75b0f1d27d08286ee844ebafe085213f02f78c0) fix(gacha-forge): 1.8.9 — one rule for every way a character can be left without a saved sex ### 📊 Changes **12 files changed** (+150 additions, -122 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/gacha-forge-1.8.9.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` (+4 -0) 📝 `packages/gacha-forge/README.md` (+2 -0) 📝 `packages/gacha-forge/client.js` (+2 -2) 📝 `packages/gacha-forge/manifest.json` (+5 -5) 📝 `packages/gacha-forge/server.mjs` (+95 -91) </details> ### 📄 Description ## Linked issue Closes #1155 ## Why this change `staging` carries Gacha Forge **1.8.8**. A player reported a unit drawn as a woman and narrated as a man. Its description did not settle the question, and the two sides read different sources: - **The picture** is painted from the unit's `appearance`, and a field derived from it (`identitySex`) tells a group scene how to count its subjects. - **The narrator** received neither. `formatCastPool` — the one cast formatter, used by the chapter planner, every scene and the Character Story — sent name, rarity, role, affinity, description, personality and clothes. So it guessed. That same formatter already solved this for clothes: it sends the derived outfit line the picture paints from, with the comment *"so the prose and the picture cannot disagree"*. The sex was left out. Two gaps sat behind the report: - **The field had a third value, `other`**, which a group picture counted as a woman and the story could not read at all. - **It only ever came from the call that prepares a portrait**, so a world with images turned off never had it for anyone. ## What changed - **The narrator reads the field the picture reads.** The cast sheet and the planner's index line carry `(she/her)` or `(he/him)`: `- Ilsa Verge (she/her) — 4★ · Normally wears: …`. The index line matters as much as the sheet — the planner writes every node's guide from it, and a wrong pronoun there reaches the scenes. Nothing is added when the field is absent. - **The sex is binary.** The derivation asks `male` or `female` only. One reader (`unitSex`) serves the picture and the story, and reads a stored `other` as female — which is how every group picture already counted it, so no drawing changes and the story follows the picture. - **A unit is born with it.** Both prompts that mint a character — the founding cast's records and the featured banner's JSON — ask for it in the call that already writes the sheet, so it costs no extra call and cannot disagree with the `appearance` written beside it. It is optional in the validator, like every field that is not the fight: a sheet without it is still a unit, and the field stays absent rather than empty. - **Units created before that are filled in once.** `fillCastSexes` asks about every character of the world that has none, in one call, the first time the story is told (the planner and the scene ask); once every character has one, the call is never made again. `/lore-status` reads the same cast to count tokens and never pays for it. - **The answer is keyed by character number.** A bare list is only trusted at its exact length: one that comes back short would hand a character somebody else's sex. - **It cannot stop a plan or a scene**, whatever goes wrong inside it: the job catches everything. - **One rule covers every way a character can be left without a saved answer** — the call failing, the model leaving them out, a write losing its revision, a document gone, an error: the fill counts the units whose sex is on disk when it ends, and anything short of all of them waits ten minutes before it is tried again. The same answer is never paid for on every scene. Not touched, on purpose: the chat (the unit already receives its whole `appearance` and speaks in the first person) and the protagonist (the narrator already gets the persona's description). ### 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. - **One new model call, once per world**: the fill for characters that have no sex yet. It goes through the Engine profile's own main connection like every other structured call, sends each character's name, description, personality and appearance (clipped), and asks for `male` or `female` per character number. No new external service. Worlds whose cast already has the field never make it. - **One new stored value per unit**: `identitySex`, `male` or `female`. It already existed for units in worlds with art; it is now written for every unit. Nothing else is stored. - **Payload:** `client.js` 1,434,802 → 1,435,025 bytes (the player changelog line), `server.mjs` 492,537 → 495,733, artifact 7,827,496 → 7,830,915. All art is byte-identical (245 of 247 payload files unchanged). ## 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.9 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. The build before this PR's review round was > played there: the Engine pinged 1.8.9 and the fill ran for real (see below); the review round > changed `server.mjs` only, and `client.js` is byte-identical. ### 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 compared run to run, plus the phone probe — all green (738 s). - **Every new check was verified failing against the previous code.** End to end: a scene's cast sheet read `Ilsa Verge — 4★ · Normally wears…` while her derived sex was female, and now reads `Ilsa Verge (she/her)`; in a world with images off, the planner's sheet read `Aki Vale — 4★ Tank, Water` with no call to fill it, and now one call fills the two characters that lacked it (and only them), the same plan already carries their pronouns, the value is saved on each unit, and the next scene makes no extra call. Then each way of failing, in its own world: the call failing, a write that cannot land, a model that leaves a character out, a short list (no one is given a sex by position), a keyed answer arriving out of order, and a storage error thrown inside the fill — in every one the plan and the scene still come out and the following scene makes no second call. - **The bench's fake model answers the fill apart from its queue**, as it already did for another slow-lane call: otherwise it eats another check's queued answer and shifts six unrelated call counts. - **Measured on a real save** (three worlds with art, 28 characters): every cast unit already had the field, so those worlds never make the new call. - **And the fill, run for real.** The field was removed from one unit of that save — the only man in a cast of eleven — and a chapter was forged: the ledger shows one `cast-sexes 1` call, `ok` on its first attempt, 13 tokens received, 6.5 s, *before* the `chapter-plan` call; the unit came back `male`; and the scenes that followed made no further call. ## 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.9 paragraph; `packages/gacha-forge/CHANGELOG.md` gains 1.8.9. The repository README is unchanged. ## UI evidence (if applicable) <!-- not applicable: no screen changes; the change is in what the narrator is told --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Story narration now uses the correct gendered terms for characters, including when descriptions are vague. * **New Features** * Characters are assigned a sex whether or not the world has artwork. Existing characters receive this information the first time a story is told. * **Release** * Gacha Forge updated to version 1.8.9. <!-- 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:08: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-Agents#1319
No description provided.