mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #515] Pixelforge: two remaining prototype-key reads (theme resolution, resident names) #261
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#261
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?
Originally created by @kolacheee on GitHub (Aug 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/515
Originally assigned to: @kolacheee on GitHub.
Two sibling sites of the prototype-key bug class fixed in
59-economy.js(S5 slices 5-6 gate) survive elsewhere in the Pixelforge package, and one of them is the upstream half of how a prototype-named theme reaches saved state at all:packages/pixelforge/src/10-art.js(~:468) —THEMES[id]is a truthiness read, sosetTheme("constructor")resolvesObject's constructor function as truthy, returns"constructor", and pins the module-levelactiveThemeto it — directly contradicting the function's own docstring ("Unknown ids resolve to the fixed default"). This is how a prototype-named theme can end up inworld.themeand a save row in the first place.packages/pixelforge/src/20-world.js(~:2003) —RESIDENT_NAMES[activeTheme] ?? RESIDENT_NAMES["cozy-village"]is the exact??-never-reaches-fallback shape:RESIDENT_NAMES["__proto__"]isObject.prototype(non-nullish), so the fallback never fires andcompile()throws; the throw is caught and the world silently degrades to the legacy three-zone layout.Both are contained today (the economy layer now guards its own reads with
Object.prototype.hasOwnProperty.call, and the degradation path doesn't corrupt saves), but the class keeps resurfacing — the S5 gates have now caught it in zone lookups (slices 1-2), player-block maps (slices 3-4), and the economy tables (slices 5-6). Suggested fix shape, same as the shipped ones: an own-property test before trusting any read off a caller-influenced key, with the documented fallback actually reachable. A sharedown(map, key)helper in the prelude would end the per-site whack-a-mole.Found by the slices 5-6 verification pass (probe-verified at both sites); scoped out of that round because neither file was touched by it.