mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #178] [Issue]: World Maps API can permanently delete active locations #90
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#90
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 @thetopham on GitHub (Aug 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/178
Originally assigned to: @thetopham on GitHub.
Summary
World Maps 1.2.5 added permanent deletion for archived locations, but the server update path does not enforce the archived-only precondition. A caller can submit a valid replacement definition that omits an active, otherwise-unreferenced location, and the server permanently deletes it.
The editor UI blocks this path, but the package API is the final data-integrity boundary and currently accepts it. The same omission is still present on current
staging/ World Maps 1.2.6.Affected package
World Maps (
hierarchical-maps) 1.2.5 and current 1.2.6 staging source.Expected behavior
PUT /api/chats/:chatId/spatial-contextrequest that omits any previously active location should return409with a stable deletion-forbidden error.Actual behavior
definition.service.tscomputesremovedLocations, then rejects only locations protected by shared-world linkage, starting/current identity, message history, or Game map bindings. It never rejectsremovedLocations.some(location => location.status !== "archived").That means an active location which is not the starting/current location and has no history or Game binding is accepted as permanently removed. This contradicts the 1.2.5 editor contract and allows irreversible map data loss if another client path, package integration, or crafted request bypasses the UI check.
Steps to reproduce
AandB.Aas the starting and current location; ensureBhas no message-history snapshot or Game map binding.PUT /api/chats/:chatId/spatial-contextwith the expected revision/current location and a definition whoselocationsarray omits active locationB(and removes any links to it).Bis permanently absent.409 spatial_history_location_removal_forbidden(or a dedicated stable code) explaining that locations must be archived before permanent deletion.Environment
Logs, screenshots, or video
No runtime log is required to locate the invariant gap. Source evidence:
definition.service.tslines 409-452 computes removed locations and protection references but has no archived-status check.Additional context
client.js,server.mjs, manifest hashes, the ZIP, and every catalog lane together.Suggested focused regression: start with two active unreferenced locations, omit the non-current/non-starting one through the API, assert
409, then archive it and assert the otherwise-identical removal succeeds.Template check