[GH-ISSUE #5903] The weather override's day-window arguments cannot be written correctly by a GM, and the verbs blocked behind them #3259

Closed
opened 2026-10-21 06:01:24 +07:00 by bsakaguchi · 3 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

The pixelforgeWeather override is scoped by a day window: sinceDay and untilDay. Both arguments
are broken from a GM's point of view, in opposite directions. An absent sinceDay defaults to day 1,
so a storm the GM summons on day 40 becomes retroactively true for the entire history of the world —
rewind to day 3 and it is already blowing, which is exactly what the package's own comment says must
not happen. And untilDay is an absolute day number that the model has no reliable way to know,
because the only place the day is ever shown to it rides on turns the package composes; across a run
of turns typed into the host composer, the newest day the model has seen goes stale. A model that
reads "Day 12" from four turns ago and writes untilDay: 14 on what is now day 16 produces a row that
is already expired. The untilDay half fails silently in the worst way: an expired row folds to "no
override", so the write lands, the event fires, the props re-deliver, and the sky simply does not
change — indistinguishable from the model never emitting the tag at all.

This is filed against the engine because it is the engine that would declare and validate these
arguments in the write-back channel (#5798); the semantics live in the Pixelforge package, so the fix
may well be one change on each side, and the point of the issue is that neither side should ship the
day window until the question below has an answer.

Where it is (Pixelforge package repo). The predicate is packages/pixelforge/src/17-weather.js:391-395
— overrideLive returns (override.sinceDay ?? 1) <= day && day <= (override.untilDay ?? Infinity),
and the comment directly above it (:386-390) states the rule the default breaks: rewinding into an
override's range must re-arm it, "while rewinding to before it was ever set must not". foldOverride
(:470-483) copies sinceDay and untilDay through if the row carries them (:478-481) and derives
neither, so nothing stamps the write day for a writer that omits it. The day reaches the model only through
clockLabel() (packages/pixelforge/src/30-sim.js:803-807, rendering Day N), which is spliced into
the turn header at :845 and reaches a turn only via composePrefix (:854), called from
packages/pixelforge/src/50-spatial.js:206 and packages/pixelforge/src/90-element.js:559 — the
package's own travel and interact senders, not the host composer.

Two further verbs are stuck behind the same class of problem and are named here so the deferral is a
record rather than a silence:

  • advanceDays:<n> is relative arithmetic on persisted state — the saved snapshot carries
    clockMin and day (packages/pixelforge/src/60-save.js:665-666) — so a double-apply cannot be
    undone; you cannot un-advance a day. Regeneration makes it worse rather than better: a new swipe
    starts from a fresh message-extra allowlist that does not carry any prior claim
    (packages/server/src/services/storage/chats.storage.ts:558-582, applied by addSwipe at
    :2128-2133), and the claim itself is keyed per swipe
    (claimMessageExtraForSwipe, :1919-1941), so every regenerate of the same turn would advance the
    clock again. Each advance also re-resolves NPC schedules and re-parks the weather
    (packages/pixelforge/src/30-sim.js:516-517 and :597-598), so the drift is not cosmetic.
  • fishBite:<word>:<multiplier> carries a real validation trap: the weather word enum has five
    entries and the bite-rate table has four — biteRate: { overcast: 2, rain: 2, snow: 2, storm: 2 }
    (packages/pixelforge/src/59-economy.js:436), with fair deliberately absent and the read falling
    back to ?? 1 (:1373). A write validated against the five-word enum must be refused for fair
    rather than allowed to mint a key the fallback would then start reading. The package also argues
    against the verb in its own comment (:429-435): the weather override already summons the bite
    multiplier implicitly, so a GM who wants faster bites already has a verb, and this row exists only to
    tune the multiplier itself.
    All three halves share one root: nothing can be written against a day the model does not reliably know,
    and nothing relative can be written at all until a repeated apply is answered for. That is why this is
    one issue rather than three.

Why it matters. The first live test of GM-written weather is the thing that proves the whole write-back
channel works, and with the day arguments in it that test can fail in a way nobody can read — no error,
no log line, just a storm that does not arrive. For a player, a GM narrating a storm while the sky
stays clear is worse than no weather control at all, because the prose and the world now openly
disagree. The deferred verbs matter less immediately but sit on the same missing foundation, and
without this written down they will be re-proposed as if they were small.

The smallest honest fix for the immediate half is to ship the weather verb with the word and intensity
only, leaving both day arguments out — those two are enum-validated, neither needs a day anchor, and
the sky visibly changes on the next props delivery, which is the whole proof the first cut is buying.
The day window then becomes its own question, and the real decision inside it is where the day comes
from: a relative "for N days" argument the engine still cannot resolve on its own, an engine-stamped
write ordinal, a package-side derive at fold time, or making the day header ride every turn rather than
only package-composed ones. advanceDays and fishBite should stay out until that question has an
answer and, for advanceDays specifically, until relative writes have a regeneration story — a verb
that advances the clock once per swipe generated is not a verb, it is a leak.

Originally created by @kolacheee on GitHub (Sep 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5903 Originally assigned to: @SpicyMarinara on GitHub. The `pixelforgeWeather` override is scoped by a day window: `sinceDay` and `untilDay`. Both arguments are broken from a GM's point of view, in opposite directions. An absent `sinceDay` defaults to day 1, so a storm the GM summons on day 40 becomes retroactively true for the entire history of the world — rewind to day 3 and it is already blowing, which is exactly what the package's own comment says must not happen. And `untilDay` is an absolute day number that the model has no reliable way to know, because the only place the day is ever shown to it rides on turns the package composes; across a run of turns typed into the host composer, the newest day the model has seen goes stale. A model that reads "Day 12" from four turns ago and writes `untilDay: 14` on what is now day 16 produces a row that is already expired. The `untilDay` half fails silently in the worst way: an expired row folds to "no override", so the write lands, the event fires, the props re-deliver, and the sky simply does not change — indistinguishable from the model never emitting the tag at all. This is filed against the engine because it is the engine that would declare and validate these arguments in the write-back channel (#5798); the semantics live in the Pixelforge package, so the fix may well be one change on each side, and the point of the issue is that neither side should ship the day window until the question below has an answer. Where it is (Pixelforge package repo). The predicate is `packages/pixelforge/src/17-weather.js:391-395` — `overrideLive` returns `(override.sinceDay ?? 1) <= day && day <= (override.untilDay ?? Infinity)`, and the comment directly above it (`:386-390`) states the rule the default breaks: rewinding into an override's range must re-arm it, "while rewinding to before it was ever set must not". `foldOverride` (`:470-483`) copies `sinceDay` and `untilDay` through if the row carries them (`:478-481`) and derives neither, so nothing stamps the write day for a writer that omits it. The day reaches the model only through `clockLabel()` (`packages/pixelforge/src/30-sim.js:803-807`, rendering `Day N`), which is spliced into the turn header at `:845` and reaches a turn only via `composePrefix` (`:854`), called from `packages/pixelforge/src/50-spatial.js:206` and `packages/pixelforge/src/90-element.js:559` — the package's own travel and interact senders, not the host composer. Two further verbs are stuck behind the same class of problem and are named here so the deferral is a record rather than a silence: - **`advanceDays:<n>`** is relative arithmetic on persisted state — the saved snapshot carries `clockMin` and `day` (`packages/pixelforge/src/60-save.js:665-666`) — so a double-apply cannot be undone; you cannot un-advance a day. Regeneration makes it worse rather than better: a new swipe starts from a fresh message-extra allowlist that does not carry any prior claim (`packages/server/src/services/storage/chats.storage.ts:558-582`, applied by `addSwipe` at `:2128-2133`), and the claim itself is keyed per swipe (`claimMessageExtraForSwipe`, `:1919-1941`), so every regenerate of the same turn would advance the clock again. Each advance also re-resolves NPC schedules and re-parks the weather (`packages/pixelforge/src/30-sim.js:516-517` and `:597-598`), so the drift is not cosmetic. - **`fishBite:<word>:<multiplier>`** carries a real validation trap: the weather word enum has five entries and the bite-rate table has four — `biteRate: { overcast: 2, rain: 2, snow: 2, storm: 2 }` (`packages/pixelforge/src/59-economy.js:436`), with `fair` deliberately absent and the read falling back to `?? 1` (`:1373`). A write validated against the five-word enum must be *refused* for `fair` rather than allowed to mint a key the fallback would then start reading. The package also argues against the verb in its own comment (`:429-435`): the weather override already summons the bite multiplier implicitly, so a GM who wants faster bites already has a verb, and this row exists only to tune the multiplier itself. All three halves share one root: nothing can be written against a day the model does not reliably know, and nothing relative can be written at all until a repeated apply is answered for. That is why this is one issue rather than three. Why it matters. The first live test of GM-written weather is the thing that proves the whole write-back channel works, and with the day arguments in it that test can fail in a way nobody can read — no error, no log line, just a storm that does not arrive. For a player, a GM narrating a storm while the sky stays clear is worse than no weather control at all, because the prose and the world now openly disagree. The deferred verbs matter less immediately but sit on the same missing foundation, and without this written down they will be re-proposed as if they were small. The smallest honest fix for the immediate half is to ship the weather verb with the word and intensity only, leaving both day arguments out — those two are enum-validated, neither needs a day anchor, and the sky visibly changes on the next props delivery, which is the whole proof the first cut is buying. The day window then becomes its own question, and the real decision inside it is where the day comes from: a relative "for N days" argument the engine still cannot resolve on its own, an engine-stamped write ordinal, a package-side derive at fold time, or making the day header ride every turn rather than only package-composed ones. `advanceDays` and `fishBite` should stay out until that question has an answer and, for `advanceDays` specifically, until relative writes have a regeneration story — a verb that advances the clock once per swipe generated is not a verb, it is a leak.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 9, 2026):

SpicyMarinara (Codex) owns this work in draft Pasta-Devs/Marinara-Agents#776, with Engine integration in #6007. Memory-nag range extraction is implemented in the package repository. Pixelforge staging already ships only word/intensity; the companion PR verifies and documents that contract without adding day or relative verbs.

<!-- gh-comment-id:5607019773 --> @SpicyMarinara commented on GitHub (Sep 9, 2026): SpicyMarinara (Codex) owns this work in draft Pasta-Devs/Marinara-Agents#776, with Engine integration in #6007. Memory-nag range extraction is implemented in the package repository. Pixelforge staging already ships only word/intensity; the companion PR verifies and documents that contract without adding day or relative verbs.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 9, 2026):

Resolved at the package boundary in Pasta-Devs/Marinara-Agents#776, merged into Agents staging as cac8815239b4. Staging already shipped the requested word/intensity-only GM weather verb; the PR verifies and protects that contract and documents its global-until-changed behavior. sinceDay/untilDay are not exposed to the GM. advanceDays, fishBite, and weather-history rewind guarantees remain withheld, as this report requests for the initial contract.

<!-- gh-comment-id:5607736276 --> @SpicyMarinara commented on GitHub (Sep 9, 2026): Resolved at the package boundary in Pasta-Devs/Marinara-Agents#776, merged into Agents staging as cac8815239b4. Staging already shipped the requested word/intensity-only GM weather verb; the PR verifies and protects that contract and documents its global-until-changed behavior. sinceDay/untilDay are not exposed to the GM. advanceDays, fishBite, and weather-history rewind guarantees remain withheld, as this report requests for the initial contract.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 13, 2026):

The completed word/intensity-only contract remains unchanged. Future weather day attribution and rewind semantics now have one open, searchable design tracker: #6136.

<!-- gh-comment-id:5652008095 --> @SpicyMarinara commented on GitHub (Sep 13, 2026): The completed word/intensity-only contract remains unchanged. Future weather day attribution and rewind semantics now have one open, searchable design tracker: #6136.
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#3259
No description provided.