Skip to content

Control automatic relationship evaluation frequency - #724

Merged
RANGROO merged 4 commits into
unstablefrom
codex/relationship-update-frequency
Aug 22, 2026
Merged

Control automatic relationship evaluation frequency#724
RANGROO merged 4 commits into
unstablefrom
codex/relationship-update-frequency

Conversation

@RANGROO

@RANGROO RANGROO commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a global Relationship Update Chance setting from 0 to 100 in the Prompt & Rechat settings tab, defaulting to 50
  • apply the chance before queueing automatic background relationship evaluations
  • stop automatic initialization from sending the retired text relationships column to an LLM; runtime prompt/update context remains sourced from extended_data.relationships JSON
  • include the setting in global settings portability

Behavior

  • 0: no new automatic relationship evaluation calls are queued; stored JSON relationship context is still injected
  • 1-99: each eligible completed NPC response independently queues at the configured percentage
  • 100: preserves the current every-eligible-response behavior
  • the manual Build with AI event-history flow remains available and already writes the JSON relationship map

Compatibility

  • no schema migration or data deletion
  • new installs and missing/invalid values default to 50; explicitly saved values remain unchanged
  • the legacy text column is left intact for data compatibility, but its automatic LLM conversion path is no longer invoked

Validation

  • PHP lint passed for all nine changed PHP files
  • RelationshipTypeValidationTest.php: 9 tests, 25 assertions
  • OghmaSettingsTest.php: 2 tests, 15 assertions
  • conf_schema.json parsed and the integer/default/scope contract passed
  • focused settings-catalog placement and runtime 0/50/100 boundary probes passed
  • git diff --check passed

Performance

At N%, new background evaluations are expected to be queued for approximately N of every 100 eligible responses; 0 queues none and 100 retains the existing rate. The default is 50. Automatic legacy text-to-JSON LLM initialization is eliminated. No live connector/token benchmark was run.

Review size

131 changed lines (99 additions, 32 deletions) across 10 focused source/test files; no generated or binary artifacts.

Local deployment and limits

  • locally deployed from exact commit a15bd0f9 to WSL /var/www/html/HerikaServer; all 10 changed-file hashes match source
  • Apache serves Global Settings at HTTP 200 on port 8081; the control is visible in Prompt & Rechat, absent from Global Connectors, and renders type=number, value=50, min=0, and max=100
  • deployed runtime probes confirm the missing-setting 50/51 boundary, plus explicit 0/100 behavior
  • deployed RelationshipTypeValidationTest.php: 9 tests, 25 assertions, including the legacy-text no-LLM regression
  • the general DB updater logged an existing dependent-view error; this PR has no migration
  • no live LLM call, worker-daemon processing, or in-game validation was performed
  • open PRs Merge relationship history into user timelines #723, Ground Soulgaze narration and report capture status #709, and Complete Skyrim Oghma retrieval and final catalog #704 overlap some catalog/relationship files; this PR remains open for conflict-aware review

@RANGROO
RANGROO marked this pull request as ready for review August 22, 2026 21:29
@RANGROO
RANGROO merged commit 99bda33 into unstable Aug 22, 2026
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