Relationship proposals fire before the entries they should relate exist, so a session's own lore is never connected #286
Loading…
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?
Found in the LLM trigger audit that produced #278 and #279. Verified against the code.
The bug
propose_lore_relationshipsis enqueued at two places, both at the completion of lore proposal generation:But the entries it loads are filtered to already-approved ones (
reminder_tasks.py:3814-3816):Everything the pipeline just produced is
proposed_by_bot = True. So the task runs at the exact moment a batch of new entries appears and then deliberately ignores all of them.Consequence
Relationship proposals only ever connect entries that were already approved before this session ran. The NPCs, locations, and factions that came out of tonight's transcript never get related to anything — which is precisely the moment their relationships are most obvious and most worth capturing.
It also means the task does redundant work: every session re-examines the same static set of previously-approved entries, and if that set hasn't changed it re-proposes the same relationships (or none).
Fix direction
Fire it on proposal approval, not proposal generation — when a GM approves bot-proposed entries, those become
proposed_by_bot = Falseand are exactly the new material worth relating. The approval path iscampaigns.py:2746.Worth considering whether it should be debounced: approving five entries one at a time would fire it five times over a nearly-identical entry set. A short delay, or firing once per approval batch, would avoid that.
Related inconsistency
While in here:
propose_lore_relationshipssilently returns when the LLM is unconfigured (reminder_tasks.py:3800-3803, log + return), whereas the lore pipeline it is chained from raises and retries in the same situation (:563,:648,:747). Two tasks in one pipeline behaving differently on the same condition is confusing to debug — see the broader inconsistency tracked separately.Acceptance
Labels: backend