mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #566] Pixelforge: the stored brief is trusted raw on the load path — seal-time validation does not survive the round-trip #290
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#290
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 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/566
Originally assigned to: @kolacheee on GitHub.
Found while fixing #515 (probe-verified at every site named below): the sealed brief's validation is a seal-time guarantee that does not survive the round-trip through chat metadata — the load path trusts the stored brief raw.
The seam:
PF.brief.validatehas exactly three call sites, all inside18-brief.js(the sealing flow).60-save.js_configBriefreturnsmeta.pixelforgeBriefas stored, and20-world.jsbuild()gates on shape only. So insidecompile(), every one ofbrief.scale,brief.prosperity,brief.surround,feature.tag,place.kind,member.kind,member.tint, and the values of_ids.zonesis an arbitrary stored string the validator's enum folding never touched.Probe-verified consequences (driven through a real
build()with prototype-named values planted in a stored brief):prosperity: "constructor"→ silent zone loss: 23 zones compile down to 7, with no degrade warning of any kind.scale,place.kind, or_ids.zonesvalues → silent legacy degradation: 23 zones become the 3-zone legacy layout (theworld.buildcatch-all swallows the throw; only aconsole.warnmarks it).FURNISH["toString"]gets invoked unbound — the prototype method is called as a furnisher.This is ~14 read sites but one defect: "a stored brief is trusted." Guarding each site individually would be exactly the whack-a-mole
PF.own's comment (from #515's fix) disclaims — and would leave the root open for the next field someone adds to the brief.Proposed fix, at the seam: re-validate on read — either
_configBriefpasses the stored object throughPF.brief.validatebefore returning it (the validator already folds unknown enum values to defaults and records_repairs, so hostile fields heal instead of detonating downstream), orbuild()'s gate folds the enum fields explicitly. One call, every downstream read inherits the seal-time guarantee, and future brief fields are covered automatically.Why it matters beyond hostile saves: the forward-compat path makes this reachable legitimately — a newer build that adds an enum value writes a brief an older build's compiler has never heard of, and today that older build silently loses zones or degrades to legacy rather than folding to a default. Same class as the envelope's version-floor design, unfinished on the brief's side.
Not a regression from #515 or 0.12 — the seam has been open since briefs started round-tripping. Contained today in that the degradation paths don't corrupt saves; the cost is silent world downgrades.