[PR #544] [MERGED] feat(pixelforge): 0.11 — the S5 player state block #1019

Closed
opened 2026-10-20 17:33:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/544
Author: @kolacheee
Created: 8/24/2026
Status: ✅ Merged
Merged: 8/24/2026
Merged by: @kolacheee

Base: staging ← Head: feat/pixelforge-s5-player-state


📝 Commits (10+)

  • 589389e chore(pixelforge): open the 0.11 cycle before anything else does
  • ee67327 feat(pixelforge): the envelope stops eating what it cannot read
  • 22c9b06 feat(pixelforge): a save that fails now behaves like it noticed
  • 27e2cfd feat(pixelforge): the save path stops trusting the happy path twice over
  • 30a7791 feat(pixelforge): the player gets a block of their own, and the row gets a ladder
  • 8709b0d fix(pixelforge): the quarantine stops eating what it was asked to hold
  • 4f11d92 fix(pixelforge): the fixes stop taking more than they gave, and the budget goes
  • 0e82192 feat(pixelforge): the world is finished before anybody is asked to live in it
  • 9c93895 feat(pixelforge): money finds something to be for, and the player finds a bed
  • 56dbf58 fix(pixelforge): a park stops being lost to a trip through another chat

📊 Changes

20 files changed (+17006 additions, -699 deletions)

View changed files

➕ artifacts/pixelforge-0.11.0.zip (+0 -0)
📝 packages/pixelforge/README.md (+44 -3)
📝 packages/pixelforge/client.js (+5061 -393)
📝 packages/pixelforge/docs/ROADMAP.md (+87 -3)
📝 packages/pixelforge/docs/brief-schema.md (+62 -32)
➕ packages/pixelforge/docs/player-state.md (+1067 -0)
📝 packages/pixelforge/manifest.json (+3 -3)
📝 packages/pixelforge/src/00-prelude.js (+47 -6)
📝 packages/pixelforge/src/18-brief.js (+93 -24)
📝 packages/pixelforge/src/20-world.js (+171 -16)
📝 packages/pixelforge/src/30-sim.js (+12 -0)
📝 packages/pixelforge/src/50-spatial.js (+4 -1)
➕ packages/pixelforge/src/58-player.js (+1891 -0)
➕ packages/pixelforge/src/59-economy.js (+287 -0)
📝 packages/pixelforge/src/60-save.js (+2017 -141)
📝 packages/pixelforge/src/70-hud.js (+187 -17)
📝 packages/pixelforge/src/80-setup.js (+50 -25)
📝 packages/pixelforge/src/90-element.js (+143 -8)
📝 packages/pixelforge/test-brief.mjs (+5779 -26)
📝 scripts/build-pixelforge-package.mjs (+1 -1)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #510

Why this change

  • Pixelforge had no durable player: nothing a player did — money earned, people met, quests taken, a room rented — survived in a principled way, and the save machinery underneath trusted the happy path. 0.11 (the S5 arc) gives the player a real state block and hardens every seam it rides on, so the growth planned for 0.12+ (fishing, quests, ledger prose) lands on ground that holds.

What changed

  • The player block (src/58-player.js, new): pouch/money, skills with equipment, settlement-scoped relationships with remembered lines, quest boards, a compacting day ledger, discoveries, and a home anchor — versioned via a derived migration table, byte-stable canonical serialization, unknown-key retention at both envelope and block level, and a quarantine bag (pixelforgeQuarantine metadata key) with per-slot lifecycles so no severed or unreadable state is ever silently destroyed.
  • World stamps and severance: saves carry {seed, briefHash, mintStamp}; a save meeting a world it does not match has its world-bound fields set aside (and restored when the world comes back) instead of being reinterpreted against strangers.
  • The GET decision ladder (src/60-save.js): one ordered classifier governs boot-adopt, flush pre-check, rewind checks, and teardown — including tolerant readers for Engine #5406 (writeOrdinal) and #5407 (rawState), which activate off field presence when a tagged Engine release ships them and are byte-identical fallbacks today.
  • The loading gate: a generation-configured chat holds at a gate until its brief seals — no throwaway interim world, no failure ever seals a themed default on the player's behalf, and the failure screen says why (kind-specific copy) with a working retry. A setup checkbox declines generation for an instant themed default world.
  • The first economy vertical (src/59-economy.js, new): themed item vocabulary and price tables, a starting purse granted only when a sealed world begins, and inn berth rental — offer follows the keeper or the room, purse debits, receipt, home anchor, ledger line, keeper relationship bump.
  • Playtest fix rounds (two live maintainer playtests): repair-floor briefs now always seal a gathering for their host (with themed naming); keepers stand behind their own counters and altars rather than on the door apron; the berth offer is reachable with a bystander nearer than the keeper; Talk asks before spending unread narration (per-person and per-turn); location toasts moved clear of the narration panel; stale setup labels fixed.
  • Docs: docs/player-state.md (authoritative wire/machinery reference, claim-by-claim traceable to code), docs/brief-schema.md and docs/ROADMAP.md updated (S6/S7, L6, W7, E7, P7 entries from maintainer playtest rulings).
  • Engine issues filed from the arc, not blockers: #5466 (bare 500 on game-create with unreachable GM), #5474 (narration choices don't repopulate after mid-log rewind — engine-side, line-cited).

Package and security impact

  • Affected package IDs: pixelforge (0.11.0)
  • Engine compatibility impact: engine.min stays 2.4.3; the #5406/#5407 readers are presence-gated and inert on current Engines (pinned byte-identical fallback).
  • New or changed permissions/entrypoints: none — same entrypoints, same capability API {1,10}; one host route already in use (experience-state) gains an optional schemaVersion field on PUT (route-schema-valid since 2.4.3).
  • Restart, storage, update, or uninstall impact: no restart required; storage is additive (a player key inside the existing experience-state envelope + the pixelforgeQuarantine chat-metadata key); legacy saves load byte-stably (pinned against a frozen wire literal) and are upgraded in place; uninstall unchanged.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Boxes left for the human contributor per the template. What was actually performed, and by whom:

  • Agent-run: node scripts/validate-catalog.mjs exit 0 and git diff --check clean on the branch head; node packages/pixelforge/test-brief.mjs (validator + compiler + save machinery + economy harness) green at every commit; package rebuilt via node scripts/build-pixelforge-package.mjs with byte-reproducible output (manifest sha verified against committed artifacts); prettier/eslint clean on touched files under the repo's pinned eslint 10.8.1 (a stale local 9.39.4 had been masking three no-useless-assignment errors — fixed in-branch).
  • Adversarial review: four multi-lens gate workflows plus per-round independent verification across the arc; verification caught real regressions in four of five fix rounds before they shipped (details in the commit messages; every behavior change carries a fail-first harness red).
  • Maintainer-run (two live playtest rounds, isolated instance): world generation end-to-end incl. the failure/retry screen with kind-specific copy; declined-generation instant default world with no purse; starting purse granted at seal (both themes); the full berth vertical — button visible with a bystander nearer than the keeper, 40→28 debit, key carried, "already keep a berth" refusal on re-press; save reload lands in place; rewind to start re-presents choices. Remaining known Engine-side gaps are filed as #5466 and #5474 rather than papered over.
  • Not performed: uninstall-cleanup pass on this specific build.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance — in-repo package docs (player-state.md, brief-schema.md, ROADMAP.md); the README catalog row needs no change (still "In development", unlisted via INCOMPLETE_PACKAGE_IDS)
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

  • Maintainer playtest screenshots exist for the loading gate/retry screen, the purse chip, and the berth rental ("A berth is yours — 12 coins the night." / "You already keep a berth here.") — attachable on request; no packaged UI chrome changed outside the game surface itself.

Summary by CodeRabbit

  • New Features
    • Added persistent player progression for currency, inventory, transactions, discoveries, quests, and lodging.
    • Added theme-specific currencies, items, prices, starting funds, and berth rentals.
    • Added optional unique-world generation during setup.
    • Added purse and lodging controls to the game interface.
  • Bug Fixes
    • World generation now uses a loading and retry screen instead of opening an incomplete fallback world.
    • Improved save handling, location notifications, and story-skip confirmations.
  • Documentation
    • Added player-state documentation and updated Pixelforge guidance for version 0.11.0.

🔄 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-Agents/pull/544 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 8/24/2026 **Status:** ✅ Merged **Merged:** 8/24/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `feat/pixelforge-s5-player-state` --- ### 📝 Commits (10+) - [`589389e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/589389e26be77a916aed68cc2622d3e5c5ec735a) chore(pixelforge): open the 0.11 cycle before anything else does - [`ee67327`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ee67327dc27302cb9d2474546f60f9582697fbc4) feat(pixelforge): the envelope stops eating what it cannot read - [`22c9b06`](https://github.com/Pasta-Devs/Marinara-Agents/commit/22c9b069356ad6a0879d73140556b19250dd8b60) feat(pixelforge): a save that fails now behaves like it noticed - [`27e2cfd`](https://github.com/Pasta-Devs/Marinara-Agents/commit/27e2cfd0f36d5ef20f0e194ba4cf09f65082bea9) feat(pixelforge): the save path stops trusting the happy path twice over - [`30a7791`](https://github.com/Pasta-Devs/Marinara-Agents/commit/30a779195ddbb5e53888cb4e33a6e56c0cac6b06) feat(pixelforge): the player gets a block of their own, and the row gets a ladder - [`8709b0d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8709b0dbb49b3cda67c17af385ae1e1cb61ea50e) fix(pixelforge): the quarantine stops eating what it was asked to hold - [`4f11d92`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4f11d92e0bf9605175afe60d25ece41d8e2dff73) fix(pixelforge): the fixes stop taking more than they gave, and the budget goes - [`0e82192`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0e821928d5f63977f2df513d9fc38896ffeb4c01) feat(pixelforge): the world is finished before anybody is asked to live in it - [`9c93895`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9c938954c2619a4536682e19400ec33d34e28c48) feat(pixelforge): money finds something to be for, and the player finds a bed - [`56dbf58`](https://github.com/Pasta-Devs/Marinara-Agents/commit/56dbf58fbf1bfc82abecc181be8a325c41e6f3b5) fix(pixelforge): a park stops being lost to a trip through another chat ### 📊 Changes **20 files changed** (+17006 additions, -699 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/pixelforge-0.11.0.zip` (+0 -0) 📝 `packages/pixelforge/README.md` (+44 -3) 📝 `packages/pixelforge/client.js` (+5061 -393) 📝 `packages/pixelforge/docs/ROADMAP.md` (+87 -3) 📝 `packages/pixelforge/docs/brief-schema.md` (+62 -32) ➕ `packages/pixelforge/docs/player-state.md` (+1067 -0) 📝 `packages/pixelforge/manifest.json` (+3 -3) 📝 `packages/pixelforge/src/00-prelude.js` (+47 -6) 📝 `packages/pixelforge/src/18-brief.js` (+93 -24) 📝 `packages/pixelforge/src/20-world.js` (+171 -16) 📝 `packages/pixelforge/src/30-sim.js` (+12 -0) 📝 `packages/pixelforge/src/50-spatial.js` (+4 -1) ➕ `packages/pixelforge/src/58-player.js` (+1891 -0) ➕ `packages/pixelforge/src/59-economy.js` (+287 -0) 📝 `packages/pixelforge/src/60-save.js` (+2017 -141) 📝 `packages/pixelforge/src/70-hud.js` (+187 -17) 📝 `packages/pixelforge/src/80-setup.js` (+50 -25) 📝 `packages/pixelforge/src/90-element.js` (+143 -8) 📝 `packages/pixelforge/test-brief.mjs` (+5779 -26) 📝 `scripts/build-pixelforge-package.mjs` (+1 -1) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #510 ## Why this change - Pixelforge had no durable player: nothing a player did — money earned, people met, quests taken, a room rented — survived in a principled way, and the save machinery underneath trusted the happy path. 0.11 (the S5 arc) gives the player a real state block and hardens every seam it rides on, so the growth planned for 0.12+ (fishing, quests, ledger prose) lands on ground that holds. ## What changed - **The `player` block** (`src/58-player.js`, new): pouch/money, skills with equipment, settlement-scoped relationships with remembered lines, quest boards, a compacting day ledger, discoveries, and a home anchor — versioned via a derived migration table, byte-stable canonical serialization, unknown-key retention at both envelope and block level, and a quarantine bag (`pixelforgeQuarantine` metadata key) with per-slot lifecycles so no severed or unreadable state is ever silently destroyed. - **World stamps and severance**: saves carry `{seed, briefHash, mintStamp}`; a save meeting a world it does not match has its world-bound fields set aside (and restored when the world comes back) instead of being reinterpreted against strangers. - **The GET decision ladder** (`src/60-save.js`): one ordered classifier governs boot-adopt, flush pre-check, rewind checks, and teardown — including tolerant readers for Engine #5406 (`writeOrdinal`) and #5407 (`rawState`), which activate off field presence when a tagged Engine release ships them and are byte-identical fallbacks today. - **The loading gate**: a generation-configured chat holds at a gate until its brief seals — no throwaway interim world, no failure ever seals a themed default on the player's behalf, and the failure screen says *why* (kind-specific copy) with a working retry. A setup checkbox declines generation for an instant themed default world. - **The first economy vertical** (`src/59-economy.js`, new): themed item vocabulary and price tables, a starting purse granted only when a sealed world begins, and inn berth rental — offer follows the keeper *or* the room, purse debits, receipt, home anchor, ledger line, keeper relationship bump. - **Playtest fix rounds** (two live maintainer playtests): repair-floor briefs now always seal a gathering for their host (with themed naming); keepers stand behind their own counters and altars rather than on the door apron; the berth offer is reachable with a bystander nearer than the keeper; Talk asks before spending unread narration (per-person *and* per-turn); location toasts moved clear of the narration panel; stale setup labels fixed. - **Docs**: `docs/player-state.md` (authoritative wire/machinery reference, claim-by-claim traceable to code), `docs/brief-schema.md` and `docs/ROADMAP.md` updated (S6/S7, L6, W7, E7, P7 entries from maintainer playtest rulings). - Engine issues filed from the arc, not blockers: #5466 (bare 500 on game-create with unreachable GM), #5474 (narration choices don't repopulate after mid-log rewind — engine-side, line-cited). ## Package and security impact - Affected package IDs: `pixelforge` (0.11.0) - Engine compatibility impact: `engine.min` stays 2.4.3; the #5406/#5407 readers are presence-gated and inert on current Engines (pinned byte-identical fallback). - New or changed permissions/entrypoints: none — same entrypoints, same capability API {1,10}; one host route already in use (`experience-state`) gains an optional `schemaVersion` field on PUT (route-schema-valid since 2.4.3). - Restart, storage, update, or uninstall impact: no restart required; storage is additive (a `player` key inside the existing experience-state envelope + the `pixelforgeQuarantine` chat-metadata key); legacy saves load byte-stably (pinned against a frozen wire literal) and are upgraded in place; uninstall unchanged. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Boxes left for the human contributor per the template. What was actually performed, and by whom: - **Agent-run:** `node scripts/validate-catalog.mjs` exit 0 and `git diff --check` clean on the branch head; `node packages/pixelforge/test-brief.mjs` (validator + compiler + save machinery + economy harness) green at every commit; package rebuilt via `node scripts/build-pixelforge-package.mjs` with byte-reproducible output (manifest sha verified against committed artifacts); prettier/eslint clean on touched files **under the repo's pinned eslint 10.8.1** (a stale local 9.39.4 had been masking three `no-useless-assignment` errors — fixed in-branch). - **Adversarial review:** four multi-lens gate workflows plus per-round independent verification across the arc; verification caught real regressions in four of five fix rounds before they shipped (details in the commit messages; every behavior change carries a fail-first harness red). - **Maintainer-run (two live playtest rounds, isolated instance):** world generation end-to-end incl. the failure/retry screen with kind-specific copy; declined-generation instant default world with no purse; starting purse granted at seal (both themes); the full berth vertical — button visible with a bystander nearer than the keeper, 40→28 debit, key carried, "already keep a berth" refusal on re-press; save reload lands in place; rewind to start re-presents choices. Remaining known Engine-side gaps are filed as #5466 and #5474 rather than papered over. - **Not performed:** uninstall-cleanup pass on this specific build. ## Documentation impact - [ ] No documentation changes needed - [x] Updated this README catalog and package guidance — in-repo package docs (`player-state.md`, `brief-schema.md`, `ROADMAP.md`); the README catalog row needs no change (still "In development", unlisted via `INCOMPLETE_PACKAGE_IDS`) - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - Maintainer playtest screenshots exist for the loading gate/retry screen, the purse chip, and the berth rental ("A berth is yours — 12 coins the night." / "You already keep a berth here.") — attachable on request; no packaged UI chrome changed outside the game surface itself. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added persistent player progression for currency, inventory, transactions, discoveries, quests, and lodging. * Added theme-specific currencies, items, prices, starting funds, and berth rentals. * Added optional unique-world generation during setup. * Added purse and lodging controls to the game interface. * **Bug Fixes** * World generation now uses a loading and retry screen instead of opening an incomplete fallback world. * Improved save handling, location notifications, and story-skip confirmations. * **Documentation** * Added player-state documentation and updated Pixelforge guidance for version 0.11.0. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:33:16 +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-Agents#1019
No description provided.