[GH-ISSUE #3457] [Issue]: env-watcher does not warn that SPRITE_GENERATION_TIMEOUT_MS requires a restart #1869

Closed
opened 2026-10-21 05:43:24 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @kolacheee on GitHub (Jul 10, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3457

Originally assigned to: @SpicyMarinara, @kolacheee on GitHub.

Summary

SPRITE_GENERATION_TIMEOUT_MS is missing from RESTART_REQUIRED_KEYS in packages/server/src/config/env-watcher.ts, so changing it in a live .env produces no [env-watcher] restart warning — even though the value is bound at module load and does not take effect until the server restarts.

Expected behavior

Editing SPRITE_GENERATION_TIMEOUT_MS in the runtime .env while the server is running should log the same warning as its siblings (IMAGE_GEN_TIMEOUT_MS, VIDEO_GEN_TIMEOUT_MS, COMFYUI_GEN_TIMEOUT, the poll intervals):

[env-watcher] These variables changed but require a server restart to take effect: SPRITE_GENERATION_TIMEOUT_MS

Actual behavior

Only the normal [env-watcher] Updated: SPRITE_GENERATION_TIMEOUT_MS=... line is logged. Sprite generation keeps using the boot-time timeout with no hint that the new value is inert: the value is read once into a module-level constant in packages/server/src/routes/sprites.routes.ts (const SPRITE_GENERATION_TIMEOUT_MS = Number(process.env.SPRITE_GENERATION_TIMEOUT_MS ?? ...)), so the propagated process.env update is never re-read.

docs/CONFIGURATION.md currently documents this gap as an explicit exception ("It still needs a restart, but the log does not warn you"), which is a workaround for the missing key rather than intended behavior.

Steps to reproduce

  1. Start the server with a .env that sets SPRITE_GENERATION_TIMEOUT_MS.
  2. While it runs, change the value in .env and save.
  3. Watch the server log: an Updated: line appears, but no restart-required warning, and sprite generation jobs still use the old timeout.

Environment

  • Marinara Engine version: staging @ 2766a1790
  • Install type: source
  • OS + version: Windows 11 Pro
  • Browser or app shell: n/a (server log behavior)

Logs, screenshots, or video

Key list as of staging (packages/server/src/config/env-watcher.ts): contains IMAGE_GEN_TIMEOUT_MS, VIDEO_GEN_TIMEOUT_MS, VIDEO_GEN_MAX_RESPONSE_BYTES, the four *_VIDEO_POLL_INTERVAL_MS keys, and COMFYUI_GEN_TIMEOUT — but not SPRITE_GENERATION_TIMEOUT_MS.

Additional context

Found while auditing the RESTART_REQUIRED_KEYS list against the restart behavior documented in docs/CONFIGURATION.md during the docs overhaul. Fix is a one-line addition to the key list plus dropping the now-obsolete exception sentence from the doc. I'm taking this — PR incoming (kolacheee).

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Jul 10, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3457 Originally assigned to: @SpicyMarinara, @kolacheee on GitHub. ## Summary `SPRITE_GENERATION_TIMEOUT_MS` is missing from `RESTART_REQUIRED_KEYS` in `packages/server/src/config/env-watcher.ts`, so changing it in a live `.env` produces no `[env-watcher]` restart warning — even though the value is bound at module load and does not take effect until the server restarts. ## Expected behavior Editing `SPRITE_GENERATION_TIMEOUT_MS` in the runtime `.env` while the server is running should log the same warning as its siblings (`IMAGE_GEN_TIMEOUT_MS`, `VIDEO_GEN_TIMEOUT_MS`, `COMFYUI_GEN_TIMEOUT`, the poll intervals): ``` [env-watcher] These variables changed but require a server restart to take effect: SPRITE_GENERATION_TIMEOUT_MS ``` ## Actual behavior Only the normal `[env-watcher] Updated: SPRITE_GENERATION_TIMEOUT_MS=...` line is logged. Sprite generation keeps using the boot-time timeout with no hint that the new value is inert: the value is read once into a module-level constant in `packages/server/src/routes/sprites.routes.ts` (`const SPRITE_GENERATION_TIMEOUT_MS = Number(process.env.SPRITE_GENERATION_TIMEOUT_MS ?? ...)`), so the propagated `process.env` update is never re-read. `docs/CONFIGURATION.md` currently documents this gap as an explicit exception ("It still needs a restart, but the log does not warn you"), which is a workaround for the missing key rather than intended behavior. ## Steps to reproduce 1. Start the server with a `.env` that sets `SPRITE_GENERATION_TIMEOUT_MS`. 2. While it runs, change the value in `.env` and save. 3. Watch the server log: an `Updated:` line appears, but no restart-required warning, and sprite generation jobs still use the old timeout. ## Environment - Marinara Engine version: `staging` @ 2766a1790 - Install type: source - OS + version: Windows 11 Pro - Browser or app shell: n/a (server log behavior) ## Logs, screenshots, or video Key list as of `staging` (`packages/server/src/config/env-watcher.ts`): contains `IMAGE_GEN_TIMEOUT_MS`, `VIDEO_GEN_TIMEOUT_MS`, `VIDEO_GEN_MAX_RESPONSE_BYTES`, the four `*_VIDEO_POLL_INTERVAL_MS` keys, and `COMFYUI_GEN_TIMEOUT` — but not `SPRITE_GENERATION_TIMEOUT_MS`. ## Additional context Found while auditing the `RESTART_REQUIRED_KEYS` list against the restart behavior documented in `docs/CONFIGURATION.md` during the docs overhaul. Fix is a one-line addition to the key list plus dropping the now-obsolete exception sentence from the doc. I'm taking this — PR incoming (kolacheee). ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:43:24 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 10, 2026):

Fixed by #3458 and merged into staging. now participates in restart-required env-watcher warnings, and the obsolete documentation exception is removed.

<!-- gh-comment-id:4940470008 --> @SpicyMarinara commented on GitHub (Jul 10, 2026): Fixed by #3458 and merged into staging. now participates in restart-required env-watcher warnings, and the obsolete documentation exception is removed.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 10, 2026):

Correction: fixed by #3458 and merged into staging. SPRITE_GENERATION_TIMEOUT_MS now participates in restart-required env-watcher warnings, and the obsolete documentation exception is removed.

<!-- gh-comment-id:4940471177 --> @SpicyMarinara commented on GitHub (Jul 10, 2026): Correction: fixed by #3458 and merged into staging. SPRITE_GENERATION_TIMEOUT_MS now participates in restart-required env-watcher warnings, and the obsolete documentation exception is removed.
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#1869
No description provided.