fix(rust): a zone resource carries its deadline as until (W1) #56

Merged
whitlocktech merged 1 commits from fix/last-fixes-zone-until into edge 2026-10-22 01:26:59 -05:00
Member

What & why

Stage 4 of docs/modules/rust/PLAN_LAST_FIXES.md (docs#366): the module's half of W1. The core half is website#219.

A placed zone now reports until, computed as now plus holdMs when the placement is answered. It therefore lands a round trip after the game's own deadline, never before it. Core's reconcile then files a zone that is gone past that deadline as expired. Before, after a restart, the run log read resource.orphaned five seconds before the game's world.expired arrived. Crates and NPCs send no holdMs, so they carry no until. The run console now also shows the zone's deadline ("until 12:38:57 AM").

No core pin change, and no MODULE_API bump (org lead, 2026-10-22). until has been in the resource contract all along, and a core without the reconcile half only shows it on the console.

How it was tested

  • npm test: server 705 pass, client 99 pass. A new zones test checks that until is the deadline and that a crate has none. world.test.js expects the field.
  • Walked on the walk site (:3270, website fix/last-fixes-core) with the Oxide rig (Rust 25902425):
    • Run 83, core's restart (the original W1 race): a one-minute zone opened. The walk core was stopped until the zone had expired in the game, then started again. Core's boot reconcile filed it expired at 05:57:24 with the line the game ended it at its deadline. There was no resource.orphaned line and no second resource.expired line. The core log has no "event resource expired" from the module's expired() path, which shows the reconcile did it.
    • Run 82, the rig's restart: a one-minute zone opened and the rig was restarted at once. The game's world.expired reached core before the module's reconcile, which waits for the world to load. The log shows resource.expired only.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a Co-Authored-By / Assisted-By trailer.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why Stage 4 of [`docs/modules/rust/PLAN_LAST_FIXES.md`](https://gitea.whitlocktech.com/RunicGateway/docs/src/branch/main/modules/rust/PLAN_LAST_FIXES.md) (docs#366): the module's half of **W1**. The core half is website#219. A placed zone now reports `until`, computed as now plus `holdMs` when the placement is answered. It therefore lands a round trip after the game's own deadline, never before it. Core's reconcile then files a zone that is gone past that deadline as `expired`. Before, after a restart, the run log read `resource.orphaned` five seconds before the game's `world.expired` arrived. Crates and NPCs send no `holdMs`, so they carry no `until`. The run console now also shows the zone's deadline ("until 12:38:57 AM"). **No core pin change, and no MODULE_API bump** (org lead, 2026-10-22). `until` has been in the resource contract all along, and a core without the reconcile half only shows it on the console. ## How it was tested - `npm test`: server 705 pass, client 99 pass. A new zones test checks that `until` is the deadline and that a crate has none. `world.test.js` expects the field. - **Walked** on the walk site (`:3270`, website fix/last-fixes-core) with the Oxide rig (Rust 25902425): - **Run 83, core's restart (the original W1 race):** a one-minute zone opened. The walk core was stopped until the zone had expired in the game, then started again. Core's boot reconcile filed it `expired` at 05:57:24 with the line *the game ended it at its deadline*. There was no `resource.orphaned` line and no second `resource.expired` line. The core log has no "event resource expired" from the module's `expired()` path, which shows the reconcile did it. - **Run 82, the rig's restart:** a one-minute zone opened and the rig was restarted at once. The game's `world.expired` reached core before the module's reconcile, which waits for the world to load. The log shows `resource.expired` only. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-22 00:58:29 -05:00
fix(rust): a zone resource carries its deadline as until (W1)
All checks were successful
PR Checks / client-build (pull_request) Successful in 31s
PR Checks / frozen-manifest (pull_request) Successful in 1m1s
PR Checks / server-tests (pull_request) Successful in 7m20s
9c35906d0e
Stage 4 of docs/modules/rust/PLAN_LAST_FIXES.md, the module's half of W1.
A placed zone now reports `until`, reckoned from the answer as now plus
holdMs, so it lands a round trip after the game's own deadline and never
before it. Core's reconcile then files a zone gone past that deadline as
expired, where a reconnect used to log resource.orphaned five seconds
before the game's world.expired arrived. Crates and NPCs send no
holdMs, so they carry no until.

No core pin change: `until` has been in the resource contract all along,
and a core without the reconcile half only shows it on the console.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 72726838b5 into edge 2026-10-22 01:26:59 -05:00
whitlocktech deleted branch fix/last-fixes-zone-until 2026-10-22 01:26:59 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Module-Rust#56
No description provided.