142 lines
9.9 KiB
Markdown
Executable File
142 lines
9.9 KiB
Markdown
Executable File
# M4 implementation and verification — The Last Hearth
|
||
|
||
Updated: 2026-11-02. Scope: renewable ecology, food preservation, pottery,
|
||
small-tier metalworking and bounded offline accounting. This record separates
|
||
automated evidence from the required group playtest. It does not claim public
|
||
service readiness or human acceptance.
|
||
|
||
## Offline contract
|
||
|
||
| System | Rule |
|
||
| --- | --- |
|
||
| Player needs | Pause while the player is logged out. |
|
||
| Hearth fuel | Uses absolute UTC epoch deadlines from `os.time()`, not preview/solar time. Sticks add 45 s, logs 180 s; stored reserve is capped at 600 s. Fuel may expire during absence. |
|
||
| Hearth jobs | Cooking 6 s / 20 reserved fuel seconds; boiling 4 s / 10; smelting 60 s / 30; charcoal production 60 s / 30; pottery firing 120 s / 30; drying 300 s / 30. Inputs are consumed only after a valid job and timer are established. A completed result stays queued until an authorized player collects it. Timer and load reconciliation are idempotent. |
|
||
| Charcoal | One log plus clay forms a charcoal charge. The process consumes 60 s plus its 30 s reserved cost and yields charcoal worth 90 s; remaining heat plus output cannot exceed the source log's 180 s. |
|
||
| Crops | Planting time is stored as a decimal epoch string. Growth replays local historical solar temperature in six-hour samples, pauses below 3°C, runs at half rate below 10°C and caps replay at 30 days. Stages are derived from planting time, not timer count. |
|
||
| Berries | Harvested bushes use one absolute 24-hour regrowth deadline; no repeated yield while bare. |
|
||
| Saplings | Planted trees wait three real days, then grow only if a bounded 5×6×5 volume is loaded, clear and allowed by claim/protection rules. No placement beyond map bounds. |
|
||
| Wildlife | Hares are passive, non-dropping, nonpersistent, have a 900-second loaded lifetime, and are limited to two near a player and 24 globally. |
|
||
| Food age | General spoilage is disabled. Dried rations are shelf-stable. No hidden or irreversible item-age simulation exists. |
|
||
|
||
## Automated verification
|
||
|
||
- **Verified technical contract:** Luanti 5.18.0, game 0.5.0-m4, save schema 1.
|
||
The automated technical gates listed below have passed; human M4 acceptance
|
||
remains open.
|
||
- **Engine:** run `scripts/run.mjs test` using the pinned Luanti 5.18.0 runtime. It
|
||
creates fresh disposable worlds; it must never access the persistent play world.
|
||
- **Map seeds:** run `scripts/run.mjs test:seeds` after ecology/mapgen changes.
|
||
- **Node tooling/assets:** run `node --test tests/tooling.test.mjs tests/assets.test.mjs`.
|
||
- **Coverage:** crop historic temperature, catch-up cap, stage derivation, invalid
|
||
timestamps; renewal and inventory conservation; charcoal/smelting/drying/pottery
|
||
jobs; output collection, offline completion and repeated reconciliation; wildlife
|
||
persistence and population bounds; registration and real-engine craft smoke.
|
||
- **Results:** Luanti 5.18.0, game 0.5.0-m4: final `scripts/run.mjs test` passed
|
||
check, native smoke and all 21 isolated suites, including six ecology tests,
|
||
fourteen process tests and three wildlife tests. Eight fixed-seed runs then
|
||
passed safe arrival and required resource checks after tree density was raised
|
||
to address a no-log seed. The final full engine run passed on the updated tree.
|
||
Node tooling/assets tests passed. A server warning reported maximum lag peak
|
||
around 1.23 seconds during the bounded smoke workload; this is not a client-FPS
|
||
or performance certification. No human acceptance is inferred from automated
|
||
tests.
|
||
|
||
## M4 group acceptance remains required
|
||
|
||
Have a small group play several sessions across at least one real week in a
|
||
disposable/staging world. Record returns after absences, crop and regrowth outcomes,
|
||
resource availability near arrival, pantry usefulness, process completion and
|
||
whether the group chooses new goals without daily chores. Compare loaded and
|
||
unloaded outcomes over equal elapsed time. Check harvesting under claim sharing,
|
||
full inventories and ordinary latency. Preserve test world identity, exact release,
|
||
actions, and reproducible defects. Do not enable general spoilage as part of this
|
||
test.
|
||
|
||
M1 voluntary repeat-play/performance, M2 unfamiliar-first-night, M3 two-player
|
||
cabin/permissions, and operator approval of shared climate coordinates remain
|
||
separate open gates. M4 technical completion permits M5 engineering to proceed by
|
||
explicit user direction; it does not mark M4 human-accepted or waive earlier gates.
|
||
|
||
## Botanical journal and ecosystem survey — pending main validation
|
||
|
||
2026-11-02 implementation addendum. The preceding evidence is retained unchanged
|
||
and describes its earlier tested tree. This newer ecosystem/art/UI increment does
|
||
not inherit that full-engine certification and does not bump the game version or
|
||
save schema. See [living ecosystems](ecosystems.md) and [art direction](art-direction.md).
|
||
|
||
Implemented in the owned interface and focused recipe/journal harness:
|
||
|
||
- Shared eom.dev Mocha base/mantle/raised/border and text/muted anchors; restrained
|
||
mauve, teal and yellow accents, pressed-sprig dividers, consistent buttons,
|
||
hover/pressed states, fields, inventory lists and tooltips across guide, recipe,
|
||
inventory, location and survey forms. Seven guide pages stay inside 14×10;
|
||
Living ecosystems replaces the optional Riverward goal without removing fishing
|
||
recipes/process discoverability or changing fishing nodes/mechanics.
|
||
- Read-only `/ecosystem`, guide button and refresh: one call to the actual
|
||
`hearth.succession.habitat(player:get_pos())` Lua API plus one
|
||
`hearth.wildlife.status()` snapshot. Plant counts are a local 5×5×5 natural-origin
|
||
sample, with fern/tree cover combined; incomplete/unloaded cells are disclosed.
|
||
Fauna counts are global active hare/deer/fox totals, explicitly not a local
|
||
census. No scheduler, forage, deposit, metadata write, entity scan/spawn,
|
||
emergence or force-load is invoked by the survey.
|
||
- Current wildlife status reports global cap 32, local cap 6 and per-player cap 6;
|
||
this supersedes the older hare-only contract above for the working ecosystem
|
||
implementation, not for that historic verification run. Wild succession is
|
||
loaded-only without offline replay; crop/berry/planted-sapling clocks remain
|
||
separate. Dynamic Life is inspiration only; implementation and art are original.
|
||
- HUD panel with labeled percentages, color-coded reserve tracks and low-reserve
|
||
warnings; established `title`, `clock`, `needs`, `context`, `help` session keys
|
||
remain. The authored hotbar slot is repeated using `[combine:320x32` at ten
|
||
32-pixel offsets (no leading parenthesis), with `hearth_selected.png`. Image
|
||
setters are optional for older mocks. Standard crosshair texture override is
|
||
part of the main generated-asset integration, outside the owned files here.
|
||
- Inventory craft/result/main actions and listrings are unchanged. Location writes
|
||
remain singleplayer-only with finite-coordinate validation and 16-character
|
||
input bounds. Recipe searches remain literal, escaped and 48-character bounded.
|
||
No credentials, cryptography, certificates or network access are introduced;
|
||
CodeGuard secret avoidance and bounded/escaped input handling were applied.
|
||
|
||
**Focused validation actually run:** the existing Fengari runner under Node
|
||
24.22.0 completed all **13 recipe/journal tests**, including survey read-only
|
||
wiring, escaped/bounded fields, guide bounds, inventory actions, graphical needs
|
||
and exact ten-slot combine syntax. It also completed **27 succession tests**,
|
||
including the real habitat API's read-only/loaded contract. Both emitted their
|
||
expected completion markers, exit 0 and empty stderr. Earlier focused attempts
|
||
exposed two harness issues (a missing heat fixture value and an escaped-comma
|
||
expectation); both were corrected before this successful journal run.
|
||
|
||
A related standalone wildlife-suite invocation was attempted, but the terminal
|
||
did not return a confirmed completion result; it is **not counted as passing**
|
||
here. Editor diagnostics reported no errors in the five owned files. No main
|
||
integrated/full-engine tests or native rendering checks were run by this UI task.
|
||
Generated-asset/native client rendering, UI scaling, contrast and main validation
|
||
remain pending. M1–M4 human gates, long-session ecological balance and operator
|
||
acceptance remain open.
|
||
|
||
## Integrated ecosystem, art and seasons verification
|
||
|
||
2026-11-02 final integration addendum (supersedes the pending automated status
|
||
above, not the historical evidence or human gates):
|
||
|
||
- Pinned Luanti 5.18.0: final disposable-world check/smoke passed; 52 Lua files
|
||
compiled and all **23 isolated suites / 377 checks** completed. Includes nine
|
||
seasonal, 36 succession, 18 wildlife, 31 content and 13 journal/recipe checks.
|
||
- Final eight fixed-seed run completed all eight individual success markers and
|
||
the aggregate seed PASS marker for starting resources and safe arrival.
|
||
- All **48 Node tests** passed, covering tooling, original art, models, seasonal
|
||
atlases, deterministic regeneration and package integrity. Optional full audio
|
||
codec regeneration was not configured; framing/hash/CRC checks still passed.
|
||
- Earlier validation attempts encountered a seed timeout and socket-bind failure;
|
||
these are not counted as passes. Subsequent complete runs exited zero.
|
||
- Generated pixel-art contact sheet inspected. In-game meshes, materials, alpha,
|
||
seasonal transitions and HUD scaling have **not** received native visual or
|
||
human acceptance. Headless checks cannot certify appearance, enjoyment or FPS.
|
||
- Seasonal leaf loss also reduces simulated canopy shade; dormant plants preserve
|
||
ecological age, and seasonal food patches preserve their harvest cooldown.
|
||
- Game contract remains 0.5.0-m4 / save schema 1; user-undone release changes were
|
||
not reinstated. No persistent play world was opened or regenerated for tests.
|
||
|
||
Native visual review, long-session population balance, multiplayer protection and
|
||
the existing human/operator gates remain open.
|