[PR #2232] [MERGED] Fix scene-forced weather generation #5494

Closed
opened 2026-10-22 04:16:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2232
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2153-scene-weather


📝 Commits (2)

  • aac94cb Fix scene-forced weather generation
  • 4046c82 Fix unused visual reference type export

📊 Changes

3 files changed (+67 additions, -15 deletions)

View changed files

📝 src/engine/capabilities/visual-assets.ts (+1 -1)
📝 src/features/modes/game/api/game-api.ts (+15 -13)
📝 src/features/modes/game/api/game-time-api.test.ts (+51 -1)

📄 Description

Linked issue

Closes #2153

Why this change

  • Scene-forced weather in game mode was bypassing biome/season generation and stamping a hardcoded 20C, empty description, calm wind, and clear visibility.
  • That made forced cold weather like a blizzard appear warm and clear in player-visible game state and LLM context.

What changed

  • gameApi.updateWeather now derives the biome/season weather baseline before applying a forced scene weather type.
  • Forced weather now preserves generated temperature, wind, and visibility while overriding the type and description.
  • Added a focused regression row for an arctic winter forced blizzard.
  • Made an internal visual-assets parameter type file-local so check:unused no longer fails on an exported type that is only used by its owning interface.

Refactor impact

Primary owner:

  • Game mode.

Impact areas reviewed:

  • src/features/modes/game/api/game-api.ts
  • src/features/modes/game/api/game-time-api.test.ts
  • src/engine/capabilities/visual-assets.ts for the CI-only unused-export cleanup.

Boundary notes:

  • The weather behavior change stays in the React feature API wrapper and uses the existing React-free weather service.
  • The visual-assets change is type-export hygiene only; it does not change the VisualAssetGateway runtime shape.
  • No storage schema, import/export, prompt pipeline, dependency, Rust, or shared API contract changes.

Pressure points touched:

  • Game weather update API used by scene analysis and game-state weather metadata.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Focused repro before fix: pnpm exec vitest run src/features/modes/game/api/game-time-api.test.ts failed because forced blizzard returned 20C, empty description, calm, and clear.
  • Focused verification after fix: pnpm exec vitest run src/features/modes/game/api/game-time-api.test.ts --reporter=json --outputFile=scratch/issue-2153-vitest-after.json passed with 4 tests, including the forced arctic winter blizzard row.
  • CI failure repro: GitHub Actions failed Frontend, Architecture, and Organization at pnpm check:unused because VisualReferenceImageSource was exported but only used inside src/engine/capabilities/visual-assets.ts.
  • CI fix verification: pnpm check:unused passed after making VisualReferenceImageSource file-local.
  • Focused verification after CI fix: pnpm exec vitest run src/features/modes/game/api/game-time-api.test.ts --reporter=json --outputFile=scratch/issue-2153-vitest-after-ci-fix.json passed.
  • git diff --check passed.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\issue-2153-bugfix-verification.json passed.
  • Full pnpm check passed after the CI fix.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • N/A: bugfix to existing game weather behavior.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

N/A: non-UI game API logic fix. Verification is via focused local command proof.


🔄 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-Engine/pull/2232 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2153-scene-weather` --- ### 📝 Commits (2) - [`aac94cb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/aac94cb858def3851ea5de94471613dcf0ea3c67) Fix scene-forced weather generation - [`4046c82`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4046c829e6daea7eaed21e631af8c6fe2d7171c2) Fix unused visual reference type export ### 📊 Changes **3 files changed** (+67 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/capabilities/visual-assets.ts` (+1 -1) 📝 `src/features/modes/game/api/game-api.ts` (+15 -13) 📝 `src/features/modes/game/api/game-time-api.test.ts` (+51 -1) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #2153 ## Why this change - Scene-forced weather in game mode was bypassing biome/season generation and stamping a hardcoded `20C`, empty description, `calm` wind, and `clear` visibility. - That made forced cold weather like a blizzard appear warm and clear in player-visible game state and LLM context. ## What changed - `gameApi.updateWeather` now derives the biome/season weather baseline before applying a forced scene weather type. - Forced weather now preserves generated temperature, wind, and visibility while overriding the type and description. - Added a focused regression row for an arctic winter forced blizzard. - Made an internal visual-assets parameter type file-local so `check:unused` no longer fails on an exported type that is only used by its owning interface. ## Refactor impact Primary owner: - Game mode. Impact areas reviewed: - `src/features/modes/game/api/game-api.ts` - `src/features/modes/game/api/game-time-api.test.ts` - `src/engine/capabilities/visual-assets.ts` for the CI-only unused-export cleanup. Boundary notes: - The weather behavior change stays in the React feature API wrapper and uses the existing React-free weather service. - The visual-assets change is type-export hygiene only; it does not change the `VisualAssetGateway` runtime shape. - No storage schema, import/export, prompt pipeline, dependency, Rust, or shared API contract changes. Pressure points touched: - Game weather update API used by scene analysis and game-state weather metadata. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Focused repro before fix: `pnpm exec vitest run src/features/modes/game/api/game-time-api.test.ts` failed because forced blizzard returned `20C`, empty description, `calm`, and `clear`. - Focused verification after fix: `pnpm exec vitest run src/features/modes/game/api/game-time-api.test.ts --reporter=json --outputFile=scratch/issue-2153-vitest-after.json` passed with 4 tests, including the forced arctic winter blizzard row. - CI failure repro: GitHub Actions failed `Frontend, Architecture, and Organization` at `pnpm check:unused` because `VisualReferenceImageSource` was exported but only used inside `src/engine/capabilities/visual-assets.ts`. - CI fix verification: `pnpm check:unused` passed after making `VisualReferenceImageSource` file-local. - Focused verification after CI fix: `pnpm exec vitest run src/features/modes/game/api/game-time-api.test.ts --reporter=json --outputFile=scratch/issue-2153-vitest-after-ci-fix.json` passed. - `git diff --check` passed. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\issue-2153-bugfix-verification.json` passed. - Full `pnpm check` passed after the CI fix. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - N/A: bugfix to existing game weather behavior. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence N/A: non-UI game API logic fix. Verification is via focused local command proof. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:48 +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-Engine#5494
No description provided.