mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #569] [MERGED] Pixelforge: prototype-key reads end at a shared own() — theme resolution, resident names, brief defaults #1029
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#1029
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/569
Author: @kolacheee
Created: 8/25/2026
Status: ✅ Merged
Merged: 8/25/2026
Merged by: @kolacheee
Base:
staging← Head:fix/515-prototype-keys📝 Commits (5)
4bca8fafix(pixelforge): three theme lookups whose fallback could not fire10b0a05build(pixelforge): the shipped artifact carries the three guardsd6b113dfix(pixelforge): a mount and a bindings table that took the prototype's word134ce89build(pixelforge): the shipped artifact carries the mount and table guardse32ebfddocs(pixelforge): the teleport comment now names the save the bare guard was corrupting📊 Changes
9 files changed (+377 additions, -14 deletions)
View changed files
📝
artifacts/pixelforge-0.12.0.zip(+0 -0)📝
packages/pixelforge/client.js(+75 -6)📝
packages/pixelforge/manifest.json(+2 -2)📝
packages/pixelforge/src/00-prelude.js(+20 -0)📝
packages/pixelforge/src/10-art.js(+6 -1)📝
packages/pixelforge/src/18-brief.js(+8 -1)📝
packages/pixelforge/src/20-world.js(+30 -3)📝
packages/pixelforge/src/30-sim.js(+11 -1)📝
packages/pixelforge/test-brief.mjs(+225 -0)📄 Description
Pull request
Linked issue
Closes #515
Closes #567
Why this change
setTheme's truthiness read lets"constructor"pin itself as the active theme and reachworld.themein a save row, andRESIDENT_NAMES'??-fallback can never fire for prototype-named keys, socompile()throws and the world silently degrades to the 3-zone legacy layout with only a console warning. Probe-verified on staging: a save row themed"constructor"round-trips the hostile theme, renders every legacy zone nameless, and feeds it back into the next flush.What changed
pixelforge(catalog-excluded; the uncatalogued-manifest sweep validates it).src/00-prelude.js:PF.own(map, key)— an own-property read returning the value orundefined, null-safe, immune to shadowedhasOwnProperty. Its comment records the bug class and the three prior gate catches so call sites stop re-arguing it.10-art.jssetTheme(unknown/prototype ids now resolve to the fixed default, per its own docstring),20-world.jsRESIDENT_NAMES(the documented fallback is now reachable), and a third found by survey —18-brief.jsdefaults(), wheredefaults("__proto__")previously passed shape-validation and returned an empty brief (0 features, floored population) instead of the worked example.client.js(772,417 B; the diff vs staging is exactly the helper + three call sites, 40 insertions / 3 deletions),manifest.json, the artifact zip. Rebuild-after-commit produces zero delta (parity).PF.own(the save layer'shasZoneprecedent — pre-fix, a prototype-named teleport id corrupted the save AND killed the frame loop), andworld.bindingsbecomes a null-prototype map at creation. That second fix corrected #567's predicted mechanism: pre-fix the"__proto__"write was never even reached — the adoption read gotObject.prototypeback, the export refused its own adoption on the FIRST sync and posted a permanent twin location onto the player's real map (additive route, no delete), while the churn lived at the first-sight seeding write, which also suppressed the export entirely. A site guard would have fixed neither symptom; null-proto at creation fixes both plus the predicted one. Old saves are covered by construction (restore copies into the built table, never assigns), and the frozen envelope literal is untouched (an empty null-proto map stringifies identically).Package and security impact
pixelforgeonlyValidation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
Boxes are the human contributor's list. Agent-verified, independently replayed by a second adversarial agent:
TypeError … reading 'length'out of the resident-names read).PF.ownsurvived a 25-case hostile battery (null/undefined maps, prototype keys, shadowedhasOwnProperty, throwing Proxy, null-prototype maps, inherited-vs-shadowed) with correct semantics throughout.format:check/lintexit 0 (prettier 3.9.6, eslint 10.8.1); catalog lanes + locale validation exit 0.Documentation impact
Summary by CodeRabbit
Bug Fixes
constructorand__proto__across theme selection, world generation, saved games, and teleportation.Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.