[PR #1159] [MERGED] fix(hierarchical-maps): allow maps up to 5,000 locations (1.5.0) #1320

Closed
opened 2026-10-21 05:08:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix/maps-location-limit


📝 Commits (1)

  • a608f32 fix(hierarchical-maps): allow maps up to 5,000 locations (1.5.0)

📊 Changes

23 files changed (+250 additions, -132 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+4 -2)
➕ artifacts/hierarchical-maps-1.5.0.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/hierarchical-maps/CHANGELOG.md (+3 -0)
📝 packages/hierarchical-maps/client.js (+25 -25)
📝 packages/hierarchical-maps/manifest.json (+5 -5)
📝 packages/hierarchical-maps/server.mjs (+29 -29)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapLibrary.tsx (+3 -6)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx (+3 -3)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/editor-state.ts (+3 -4)
📝 packages/hierarchical-maps/src/engine/packages/maps-shared/src/maps-model.ts (+50 -6)
📝 packages/hierarchical-maps/src/engine/packages/server/src/routes/spatial-context.routes.ts (+8 -8)
📝 packages/hierarchical-maps/src/engine/packages/server/src/services/spatial-context/ai-draft.ts (+7 -9)
📝 packages/hierarchical-maps/src/engine/packages/server/src/services/spatial-context/definition.service.ts (+2 -2)
📝 packages/hierarchical-maps/src/engine/packages/server/src/services/spatial-context/shared-world.service.ts (+4 -4)

...and 3 more files

📄 Description

Pull request

Linked issue

Closes #1132

Engine companion: Pasta-Devs/Marinara-Engine#6911 raises the Engine's shared limit to the same 5,000. Game Mode re-validates the map at game start, so the two limits need to match.

Why this change

A user recreating Skyrim hit "A spatial map can contain at most 500 locations." before finishing the basic places and named houses, with floors and rooms still to come. The cap comes from SPATIAL_CONTEXT_LIMITS in the vendored shared snapshot, sources/engine/packages/shared/dist. The vendored-Engine baseline freezes that snapshot, since an entry can only be removed, never re-fingerprinted. So World Maps can't pick up the Engine change by refreshing the snapshot, and has to own its ceiling.

What changed

  • maps-model.ts, the package-owned module:
    • SPATIAL_MAP_LOCATION_LIMIT = 5_000
    • validateSpatialMapDefinition(): runs the shared validator and replaces only its too_many_locations check with the package ceiling. Every other shared rule still applies.
    • spatialMapDefinitionSchema and updateSpatialMapRequestSchema, derived from the shared shapes.
    • A ponytail: comment records the ceiling and the upgrade path (validate through the host contract, Marinara-Engine#6385).
  • Every Maps call site (editor, library import, workspace, routes, AI drafts, shared worlds, state resolution) now uses the package-owned validator and schemas. AI draft expansion capacity uses the new ceiling too.
  • tests/map-location-limit.regression.ts (added to PR checks):
    • A 5,000-location map passes the validator, the schema and the save-request schema; 5,001 fails.
    • Other shared rules still fire.
    • A tripwire asserts the vendored snapshot is still 500, so a later snapshot refresh flags the override for deletion.
  • Version 1.4.3 → 1.5.0, with a package changelog entry. Rebuilt client.js, server.mjs, manifest.json, artifacts/hierarchical-maps-1.5.0.zip, and the v2/v3/legacy catalog entries and notes. The catalog diffs touch only World Maps.

Package and security impact

  • Affected package IDs: hierarchical-maps
  • Engine compatibility impact: none for Roleplay. On Engine versions without #6911, Game start still validates with 500 and skips a hierarchical map over 500 locations; the changelog says so. minEngineVersion is unchanged, so staging and stable users both get the fix.
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none. Stored maps keep their format; only the location-count ceiling changes. Other per-location limits (name, description, links, depth 20) are unchanged.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Agent-run results (not substitutes for the human checklist above):

  • These passed: npm run check (0 errors; the only warnings in touched files are pre-existing hook warnings), npm run typecheck:packages, scripts/test-catalog-lanes.mjs, validate-package-locales, validate-package-locale-keys, validate-catalog, catalog-release-notes, catalog-generatedat-determinism, world-maps-ui-contract, test:security, and the new map-location-limit regression.
  • A formatting-only rebuild produced byte-identical bundles and ZIP.
  • Local CodeRabbit reviewed all 23 files with 0 findings.
  • tests/hierarchical-maps-lifecycle.regression.ts (not in CI) fails at messages/bulk-delete, expecting 204 but getting 200 {"trashed":false}. Untouched origin/staging fails the same way against current Engine staging, so it's a stale expectation after the Engine's message-trash change, not this PR. Every Maps step before it passed.

To check by hand:

  • Manually update World Maps to 1.5.0 through Download Agents on an Engine staging build.
  • Manually add more than 500 locations to a map (for example with AI "Expand" on a large region) and save.
  • Manually import a map file with more than 500 locations from the Map Library.
  • Manually start a Game with a map over 500 locations on an Engine build that includes #6911, and confirm the World Map is used.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

The World Maps guide's limit changes in Marinara-Engine#6911.

Summary by CodeRabbit

  • New Features
    • World Maps now support up to 5,000 locations per map, up from 500.
    • Game Mode uses larger maps on compatible Marinara Engine versions. Older versions skip maps with more than 500 locations when a game starts.
  • Bug Fixes
    • Improved map validation for imported and generated maps, including checks for location limits and duplicate location IDs.

🔄 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-Agents/pull/1159 **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/maps-location-limit` --- ### 📝 Commits (1) - [`a608f32`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a608f32c514f2d9376d6b4087252499bb4e6af2a) fix(hierarchical-maps): allow maps up to 5,000 locations (1.5.0) ### 📊 Changes **23 files changed** (+250 additions, -132 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+4 -2) ➕ `artifacts/hierarchical-maps-1.5.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/hierarchical-maps/CHANGELOG.md` (+3 -0) 📝 `packages/hierarchical-maps/client.js` (+25 -25) 📝 `packages/hierarchical-maps/manifest.json` (+5 -5) 📝 `packages/hierarchical-maps/server.mjs` (+29 -29) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapLibrary.tsx` (+3 -6) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx` (+3 -3) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/editor-state.ts` (+3 -4) 📝 `packages/hierarchical-maps/src/engine/packages/maps-shared/src/maps-model.ts` (+50 -6) 📝 `packages/hierarchical-maps/src/engine/packages/server/src/routes/spatial-context.routes.ts` (+8 -8) 📝 `packages/hierarchical-maps/src/engine/packages/server/src/services/spatial-context/ai-draft.ts` (+7 -9) 📝 `packages/hierarchical-maps/src/engine/packages/server/src/services/spatial-context/definition.service.ts` (+2 -2) 📝 `packages/hierarchical-maps/src/engine/packages/server/src/services/spatial-context/shared-world.service.ts` (+4 -4) _...and 3 more files_ </details> ### 📄 Description # Pull request ## Linked issue Closes #1132 Engine companion: Pasta-Devs/Marinara-Engine#6911 raises the Engine's shared limit to the same 5,000. Game Mode re-validates the map at game start, so the two limits need to match. ## Why this change A user recreating Skyrim hit "A spatial map can contain at most 500 locations." before finishing the basic places and named houses, with floors and rooms still to come. The cap comes from `SPATIAL_CONTEXT_LIMITS` in the vendored shared snapshot, `sources/engine/packages/shared/dist`. The vendored-Engine baseline freezes that snapshot, since an entry can only be removed, never re-fingerprinted. So World Maps can't pick up the Engine change by refreshing the snapshot, and has to own its ceiling. ## What changed - **`maps-model.ts`**, the package-owned module: - `SPATIAL_MAP_LOCATION_LIMIT = 5_000` - `validateSpatialMapDefinition()`: runs the shared validator and replaces only its `too_many_locations` check with the package ceiling. Every other shared rule still applies. - `spatialMapDefinitionSchema` and `updateSpatialMapRequestSchema`, derived from the shared shapes. - A `ponytail:` comment records the ceiling and the upgrade path (validate through the host contract, Marinara-Engine#6385). - **Every Maps call site** (editor, library import, workspace, routes, AI drafts, shared worlds, state resolution) now uses the package-owned validator and schemas. AI draft expansion capacity uses the new ceiling too. - **`tests/map-location-limit.regression.ts`** (added to PR checks): - A 5,000-location map passes the validator, the schema and the save-request schema; 5,001 fails. - Other shared rules still fire. - A tripwire asserts the vendored snapshot is still 500, so a later snapshot refresh flags the override for deletion. - **Version 1.4.3 → 1.5.0**, with a package changelog entry. Rebuilt `client.js`, `server.mjs`, `manifest.json`, `artifacts/hierarchical-maps-1.5.0.zip`, and the v2/v3/legacy catalog entries and notes. The catalog diffs touch only World Maps. ## Package and security impact - Affected package IDs: `hierarchical-maps` - Engine compatibility impact: none for Roleplay. On Engine versions without #6911, Game start still validates with 500 and skips a hierarchical map over 500 locations; the changelog says so. `minEngineVersion` is unchanged, so staging and stable users both get the fix. - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none. Stored maps keep their format; only the location-count ceiling changes. Other per-location limits (name, description, links, depth 20) are unchanged. ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Agent-run results (not substitutes for the human checklist above): - These passed: `npm run check` (0 errors; the only warnings in touched files are pre-existing hook warnings), `npm run typecheck:packages`, `scripts/test-catalog-lanes.mjs`, `validate-package-locales`, `validate-package-locale-keys`, `validate-catalog`, `catalog-release-notes`, `catalog-generatedat-determinism`, `world-maps-ui-contract`, `test:security`, and the new `map-location-limit` regression. - A formatting-only rebuild produced byte-identical bundles and ZIP. - Local CodeRabbit reviewed all 23 files with 0 findings. - `tests/hierarchical-maps-lifecycle.regression.ts` (not in CI) fails at `messages/bulk-delete`, expecting 204 but getting 200 `{"trashed":false}`. Untouched `origin/staging` fails the same way against current Engine staging, so it's a stale expectation after the Engine's message-trash change, not this PR. Every Maps step before it passed. To check by hand: - Manually update World Maps to 1.5.0 through Download Agents on an Engine staging build. - Manually add more than 500 locations to a map (for example with AI "Expand" on a large region) and save. - Manually import a map file with more than 500 locations from the Map Library. - Manually start a Game with a map over 500 locations on an Engine build that includes #6911, and confirm the World Map is used. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation The World Maps guide's limit changes in Marinara-Engine#6911. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * World Maps now support up to 5,000 locations per map, up from 500. * Game Mode uses larger maps on compatible Marinara Engine versions. Older versions skip maps with more than 500 locations when a game starts. * **Bug Fixes** * Improved map validation for imported and generated maps, including checks for location limits and duplicate location IDs. <!-- 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-21 05:08:41 +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-Agents#1320
No description provided.