fix(client): npc harness must set player.luck_descriptor (schema requires non-empty)

The throwaway harness hand-built a minimal canon log and left luck_descriptor
as the default "", which fails the canon-log schema (minLength 1) → /npc/speak
422s and the harness silently degrades to fallback. Build the player through
LogPlayer with a non-empty §7 fortune line. Verified: request now 200s and Fenn
answers in-voice.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-10 13:30:45 -05:00
parent d788225754
commit 81db962a9d

View File

@@ -33,8 +33,10 @@ func _ready() -> void:
_game_state = GameState.new()
_canon_log = CanonLog.new()
_canon_log.set_location("greywater_docks", "Greywater Docks")
_canon_log.player.name = "Aldric"
_canon_log.player.class_id = "sellsword"
# Build the player through LogPlayer so luck_descriptor is non-empty — the
# canon-log schema requires it (minLength 1), and it's the §7 fortune line
# the digest surfaces to the NPC. An empty string here 422s the request.
_canon_log.player = LogPlayer.new("Aldric", "sellsword", "the dice are kind today")
# Deliberately no find_the_ledger quest here — leave it un-started so Fenn
# can offer_quest it during the conversation.