[PR #6911] [MERGED] fix(maps): raise the World Map location limit to 5,000 #7379

Closed
opened 2026-10-23 04:19:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6911
Author: @SpicyMarinara
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/world-map-location-limit


📝 Commits (3)

  • f043ebe fix(maps): raise the World Map location limit to 5,000
  • 8f20e32 fix(maps): bound the depth check at maxDepth steps per location
  • 90449d4 Merge branch 'staging' into fix/world-map-location-limit

📊 Changes

4 files changed (+23 additions, -3 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/agents/hierarchical-maps.md (+1 -1)
📝 packages/shared/src/utils/spatial-context.ts (+3 -2)
📝 scripts/regressions/spatial-context.regression.ts (+18 -0)

📄 Description

Refs Pasta-Devs/Marinara-Agents#1132 (the issue lives in Marinara-Agents; the shared map contract is Engine-owned)

Why

A user recreating Skyrim hit "A spatial map can contain at most 500 locations." before they finished the basic places and named houses, let alone floors and rooms. The cap is SPATIAL_CONTEXT_LIMITS.maxLocations in @marinara-engine/shared. The Engine also re-validates the World Maps package's map with this schema when a Game starts (world-map-mode.ts), so the Engine limit has to move with the package.

What changed

  • SPATIAL_CONTEXT_LIMITS.maxLocations: 500 → 5,000.
    • Map validation is linear in the location count (the depth walk is capped at 20 levels).
    • Prompts project only the current place and at most 50 destinations, so prompt size doesn't grow with the map.
    • A fixed higher ceiling keeps a trust-boundary bound without adding a setting.
  • spatial-context regression: a map of exactly 5,000 locations passes the schema, and 5,001 reports too_many_locations.
  • docs/agents/hierarchical-maps.md now says 5,000. The ten translated copies on docs-i18n each contain the same single number; I'll update them after this merges, so their manifests can cite the merged source commit.

The World Maps package in Marinara-Agents builds from a frozen vendored snapshot of shared, so it needs its own companion change with the same limit. That PR links back here.

Manual verification

  • With the updated World Maps package, add more than 500 locations to a map and save it.
  • Start a Game whose hierarchical World Map has more than 500 locations, and confirm the World Map is used, not dropped at game start.
  • Browse a large map in the editor and check that selecting and moving locations near the root still feels responsive.

Summary by CodeRabbit

  • New Features
    • World Maps can now include up to 5,000 locations, increased from 500. This provides room for larger maps, including maps with floors and rooms.
    • Game Mode now accepts larger maps when a game starts, including maps that use the increased location limit. The existing 20-level hierarchy limit remains unchanged.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/6911 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/30/2026 **Status:** ✅ Merged **Merged:** 9/30/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/world-map-location-limit` --- ### 📝 Commits (3) - [`f043ebe`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f043ebe59c23863b7ee24b4a5d5c8a97a612dd38) fix(maps): raise the World Map location limit to 5,000 - [`8f20e32`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8f20e327e614780d239ca14e082353d6fa6841dc) fix(maps): bound the depth check at maxDepth steps per location - [`90449d4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/90449d497bef1263c906de0d847e333dd5e9c36f) Merge branch 'staging' into fix/world-map-location-limit ### 📊 Changes **4 files changed** (+23 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/agents/hierarchical-maps.md` (+1 -1) 📝 `packages/shared/src/utils/spatial-context.ts` (+3 -2) 📝 `scripts/regressions/spatial-context.regression.ts` (+18 -0) </details> ### 📄 Description Refs Pasta-Devs/Marinara-Agents#1132 (the issue lives in Marinara-Agents; the shared map contract is Engine-owned) ## Why A user recreating Skyrim hit "A spatial map can contain at most 500 locations." before they finished the basic places and named houses, let alone floors and rooms. The cap is `SPATIAL_CONTEXT_LIMITS.maxLocations` in `@marinara-engine/shared`. The Engine also re-validates the World Maps package's map with this schema when a Game starts (`world-map-mode.ts`), so the Engine limit has to move with the package. ## What changed - `SPATIAL_CONTEXT_LIMITS.maxLocations`: 500 → 5,000. - Map validation is linear in the location count (the depth walk is capped at 20 levels). - Prompts project only the current place and at most 50 destinations, so prompt size doesn't grow with the map. - A fixed higher ceiling keeps a trust-boundary bound without adding a setting. - `spatial-context` regression: a map of exactly 5,000 locations passes the schema, and 5,001 reports `too_many_locations`. - `docs/agents/hierarchical-maps.md` now says 5,000. The ten translated copies on `docs-i18n` each contain the same single number; I'll update them after this merges, so their manifests can cite the merged source commit. The World Maps package in Marinara-Agents builds from a frozen vendored snapshot of shared, so it needs its own companion change with the same limit. That PR links back here. ## Manual verification - [ ] With the updated World Maps package, add more than 500 locations to a map and save it. - [ ] Start a Game whose hierarchical World Map has more than 500 locations, and confirm the World Map is used, not dropped at game start. - [ ] Browse a large map in the editor and check that selecting and moving locations near the root still feels responsive. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * World Maps can now include up to 5,000 locations, increased from 500. This provides room for larger maps, including maps with floors and rooms. * Game Mode now accepts larger maps when a game starts, including maps that use the increased location limit. The existing 20-level hierarchy limit remains unchanged. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:19:11 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7379
No description provided.