mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #377] [MERGED] Pixelforge 0.4.0: preference-driven world generation, themed Tier-1 atlases #943
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#943
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/377
Author: @kolacheee
Created: 8/16/2026
Status: ✅ Merged
Merged: 8/16/2026
Merged by: @kolacheee
Base:
staging← Head:feat/376-pixelforge-0.4.0📝 Commits (4)
396e53bfeat(pixelforge): 0.4.0 — preference-driven world generation, themed atlases3e5ee0cfix(pixelforge): correct the generation failure ladder + doc accuracy (port review)d614944fix(pixelforge): complete the HTML-tag sanitization (CodeQL high x2)e5e4d0efix(pixelforge): apply the CodeRabbit review round (11 findings, all valid)📊 Changes
27 files changed (+4160 additions, -183 deletions)
View changed files
📝
README.md(+1 -1)➕
artifacts/pixelforge-0.4.0.zip(+0 -0)📝
catalog/catalog.json(+19 -13)📝
catalog/v2/catalog.json(+19 -13)📝
catalog/v3/catalog.json(+19 -13)📝
packages/pixelforge/README.md(+28 -2)📝
packages/pixelforge/agents.json(+1 -1)📝
packages/pixelforge/build/build-art.mjs(+125 -8)📝
packages/pixelforge/client.js(+1562 -60)➕
packages/pixelforge/docs/brief-schema.md(+218 -0)📝
packages/pixelforge/engine-boundary.json(+1 -1)📝
packages/pixelforge/locales/en.json(+2 -2)📝
packages/pixelforge/manifest.json(+15 -9)📝
packages/pixelforge/src/00-prelude.js(+18 -0)📝
packages/pixelforge/src/10-art.js(+155 -8)📝
packages/pixelforge/src/15-assets.js(+72 -17)➕
packages/pixelforge/src/18-brief.js(+674 -0)📝
packages/pixelforge/src/20-world.js(+386 -5)📝
packages/pixelforge/src/30-sim.js(+43 -0)📝
packages/pixelforge/src/50-spatial.js(+14 -8)...and 7 more files
📄 Description
Linked issue
Closes #376
Why this change
What changed
src/18-brief.jsNEW,src/20-world.js,src/60-save.js,src/80-setup.js,src/90-element.js,docs/brief-schema.mdNEW): after launch the surface makes onePOST /api/game/:chatId/experience-generationcall with themed guidance + a strict flat schema; the returned World Brief (settlement, cast with household structure, places, features) is validated through numbered repair passes with quality floors, sealed into chat metadata (top-levelpixelforgeBriefkey, atomic shallow-merge PATCH, one-shot guarded), and compiled deterministically into the tile world — household structure means 30 villagers in 6 households yields ~6 houses, never 30. Non-blocking by design: the chat boots the themed default world instantly, a toast covers the wait, the world rebuilds in place when the brief lands.builtAgainst):userContentclamps to 7,800 chars (the route 400s past 8,000); a 409chat_busyis waited out once per itsRetry-After; a truncated 422 gets one plain re-roll (the route'smaxTokensis min()-only — an override can never raise the budget) with salvage from the longest raw seen across attempts; transient outcomes (409/429/5xx/network error/90s timeout/404 route-absent) leave the chat unsealed so the next visit retries, while only success, salvage, or deterministic/paid failures (400 contract, 422 provider/parse) seal — the sealed themed default plays exactly like 0.3.0.src/30-sim.js): the brief's situation/zone-flavor/NPC personas ride outbound turns once each (persisted one-shot flags, burned only on host-accepted turns), so the generated world reaches GM context through chat history at near-zero recurring token cost.build/build-art.mjs): the sci-fi-colony theme gets its own authored sheet (tiles-sci-fi-colony.png— hab panels, portholes, pressure doors, solar roofs, hydroponics trays) sharing oneatlas.jsonid map with the cozy sheet;contributions.assetsgrows 8 → 9. Note: the cozytiles.pngbinary also changes — atlas RNG seeds are now theme-namespaced (tier1:<theme>:<id>), so its dither noise re-rolls. Same palette, same shapes, deliberately re-rolled pixels; worth one eyeball in play.img.decode()never settles on hidden pages (background-tab restore), which could wedge Tier-1 loading forever; the loader now awaits the load event.test-brief.mjs, 26 cases): repair passes, quality floors, salvage, compiler invariants (portal walkability both ends, household arithmetic), injection metering, the spatial-binding regression, and the failure ladder (stubbed API: transient-unsealed, no-maxTokens re-roll + longest-raw salvage, provider-error seal, busy wait-out + preference clamp). Run:node packages/pixelforge/test-brief.mjs.client.js(163,371 bytes),manifest.json,agents.json,locales/en.json(description now mentions generation),tiles.png(re-rolled, see above),tiles-sci-fi-colony.png,artifacts/pixelforge-0.4.0.zip, all three catalog lanes. Prior artifacts remain per convention.Package and security impact
pixelforge(0.3.0 → 0.4.0)capabilityApi {1,10},engine.min 2.4.3,maxExclusive 4.0.0all unchanged. The generation endpoint is a host route, not a manifest contribution: on engines without it the client stays unsealed on the themed default world (playing exactly like 0.3.0) and quietly retries per visit, upgrading itself the first time the engine has the route. No new catalog vocabulary, so no sequencing constraints beyond #358's existing "promote tomainwith Engine 2.4.3" rule.builtAgainstmoves to Engine staging315c4bc78.["ui"], agents + client entrypoints, no server.restartRequired: false. New chat-metadata keypixelforgeBrief(≤8KB, one per generated chat, deleted with the chat). The generation route is rate-limited engine-side (20/min class + per-chat lock). Update path is the standard catalog artifact flow; 0.2.0/0.3.0 chats have nogenerateflag and never call the route.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
Performed by the submitting agent (boxes above intentionally left for the human reviewer):
node scripts/build-pixelforge-package.mjs→built pixelforge 0.4.0, client.js 163371 bytes, 9 assets, artifact 173653 bytes, builtAgainst 2.4.3 @ 315c4bc78.validate-catalog,test-catalog-lanes,validate-package-locales,git diff --check, and the shipped 26-case harness — all green locally.js/incomplete-multi-character-sanitization, source + bundle) were real and are fixed in the third commit: the sanitizer's markdown pass stripped every>before the tag regex ran, so<scriptprefixes survived and fragment reassembly was possible;sanitize()now tag-strips to a fixpoint and then removes every remaining angle bracket, with harness case 26 pinning the attack.pixelforgeBrief, and issued exactly one generation call per chat across reloads and remounts; a 0.3.0-era chat restored through the legacy config fallback unchanged.Documentation impact
packages/pixelforge/README.mdgains the World-generation section, the harness command, and the themed-atlas note; the rootREADME.mdcatalog row now carries the preference-driven description;docs/brief-schema.md(the sealed schema spec with its amendments) ships in-repo for reviewers. An Engine-side Experiences docs page remains the post-release follow-up noted in #358.Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.