mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #387] [MERGED] World Maps 1.4.0: additive location write API for Experience packages #945
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#945
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/387
Author: @kolacheee
Created: 8/16/2026
Status: ✅ Merged
Merged: 8/16/2026
Merged by: @kolacheee
Base:
staging← Head:feat/maps-location-add📝 Commits (3)
ee6c563feat(hierarchical-maps): 1.4.0 — additive location write API for Experiencesd445060fix(hierarchical-maps): pre-ready review round for the location-add API5f3d608fix(hierarchical-maps): CodeRabbit round — error-state fidelity + build portability📊 Changes
10 files changed (+365 additions, -101 deletions)
View changed files
➕
artifacts/hierarchical-maps-1.4.0.zip(+0 -0)📝
catalog/catalog.json(+8 -8)📝
catalog/v2/catalog.json(+8 -8)📝
catalog/v3/catalog.json(+8 -8)📝
packages/hierarchical-maps/engine-boundary.json(+2 -2)📝
packages/hierarchical-maps/manifest.json(+5 -5)📝
packages/hierarchical-maps/server.mjs(+31 -31)📝
packages/hierarchical-maps/src/engine/packages/server/src/routes/spatial-context.routes.ts(+48 -0)📝
packages/hierarchical-maps/src/engine/packages/server/src/services/spatial-context/definition.service.ts(+173 -3)📝
scripts/build-feature-packages.mjs(+82 -36)📄 Description
Linked issue
Closes #386
Why this change
[spatial_discover:]directive and the editor's full-replace PUT. Pixelforge's World Maps export has been explicitly deferred since 0.4.0 for exactly this reason (Marinara-Engine #5144 is the tracking issue).What changed
POST /api/chats/:chatId/spatial-context/locations(src/engine/.../spatial-context.routes.ts,definition.service.ts): appends 1–50 locations under revision CAS. Ids may be caller-supplied (deterministic references, duplicate-checked → 409spatial_location_conflict) or allocatedloc_<id>like discover's; a batch may build its own subtree (parents may reference sibling additions, validated against the full merged id set → 400 on a missing parent);sortOrdercontinues each parent's sibling sequence. The write delegates to the editor-PUT service method, inheriting its complete guard set: corrupt-map and shared-world checks,spatial_definition_stale409 CAS, whole-definition schema validation, and the repair-snapshot tail. A chat with no map yet gets 409spatial_definition_missing. The response is the full refreshed spatial context plusaddedLocationIds— no follow-up GET needed. Pure adds remove nothing, so the location-deletion protections are untouched.scripts/build-feature-packages.mjs): esbuild and vite invoke as JS entrypoints under the current Node (barepnpmis a.cmdWindows cannot spawn; shell mode mangles the esbuild banner argument), NODE_PATH explicitly lists the engine workspace module dirspnpm execused to provide, and the artifact zip switches to the deterministic store-only writer the Pixelforge build already uses — removing the systemzipdependency. No POSIX CI behavior change; other features' artifact bytes change only at their next rebuild.builtAgainstmoves to engine stagingbb551bf92. Generated outputs:server.mjs(311,375 bytes — +2.8KB of route code over 1.3.6),client.js(byte-identical to 1.3.6; the route is server-only),manifest.json,artifacts/hierarchical-maps-1.4.0.zip(1,240,157 bytes — store-only zip is larger than 1.3.6's deflated 321KB; disclosed below), catalog lanes (1.3.6 artifact retained per convention).Package and security impact
hierarchical-maps(1.3.6 → 1.4.0)/api/chatsplugin; no new manifest vocabulary, no capability API change.minEngineVersionunchanged.restartRequiredunchanged (server entrypoint, as before). No storage-shape changes: writes go through the existing definition persistence + snapshot tail.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-feature-packages.mjs hierarchical-maps(on Windows, exercising the new build path),validate-catalog,test-catalog-lanes,validate-package-locales,git diff --check— all green.operations+ an auto-id child referencing it as parent) returned 200 with bothaddedLocationIds, bumped revision 1→2, and the follow-up GET showed all locations; a staleexpectedRevision409'dspatial_definition_stale; a duplicate id 409'dspatial_location_conflict; a missing parent 400'd — and none of the failed writes bumped the revision.builtAgainstprovenance (2.4.3 @ bb551bf92 in the boundary file, not just the PR text), a POSIX fix for the esbuild invocation (native-binary bins must not run under node), and de-duplicating zod in the bundles (two full copies had bloated server.mjs +20% and client.js +6.5%). Layers-add and archived-parent paths re-verified live after the fixes.deterministic-zip.mjs(fixed level, no timestamps — same per-Node-build caveat the art PNGs already carry) can restore compression; happy to file and implement that as a follow-up.hierarchical-mapsto confirm byte-reproducibility of the deterministic artifact on CI's platform, and a look at the editor UI after an Experience-driven add (locations appear on next refetch; no live push exists yet, deliberately — see the issue's scope note).Documentation impact
The route is creator-facing API surface; it will be documented in the Engine's Experiences docs page (#5140, parked by maintainer decision until the creator surface stabilizes — this PR is part of that stabilization).
Summary by CodeRabbit
New Features
Updates
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.