Skip to content

Limit bulk relationship builds to stored maps - #90

Merged
RANGROO merged 1 commit into
unstablefrom
codex/limit-relationship-build
Aug 20, 2026
Merged

Limit bulk relationship builds to stored maps#90
RANGROO merged 1 commit into
unstablefrom
codex/limit-relationship-build

Conversation

@RANGROO

@RANGROO RANGROO commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Problem

Stobe's bulk relationship build queued every NPC found in event history. On the local playthrough this meant 643 pending NPCs, causing broad proximity-derived relationships, excessive LLM requests, and truncation failures.

Change

  • Limit bulk status, list, and processing paths to NPCs with non-empty stored relationship maps, matching HerikaServer's migration scope.
  • Normalize and copy structured Stobe relationship JSON directly into extended_data without an LLM request.
  • Retain the LLM fallback for legacy prose relationship summaries.
  • Leave the manual per-NPC Build from Events action unchanged.

Compatibility

No schema migration is required. Existing built relationships remain skipped unless Force Rebuild is selected.

HerikaServer already uses the limited stored-relationship scope. DialecticServer has no equivalent bulk UI and its internal batch analysis already requires stored relationships, so no sibling port is needed.

Validation

  • php -l ext/relationship_system/batch_build.php
  • php -l ext/relationship_system/relationship_llm.php
  • php -l tests/relationship_system_regression.php
  • STOBE_DB_NAME=stobe_test php tests/relationship_system_regression.php
  • Read-only local stats check: 15 built, 38 pending after limiting the scope, down from 643 pending.
  • git diff --check origin/unstable...HEAD

Deployment

Not deployed.

Limits

No browser or in-game bulk build was performed. The separate per-NPC connector-selection issue and faction full-snapshot cleanup issue are outside this PR.

@RANGROO
RANGROO marked this pull request as ready for review August 20, 2026 04:50
@RANGROO
RANGROO merged commit 66f0cce into unstable Aug 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant