[Medium] [Bug] Pact System: signedPactDetails never populated by any production code #308
Reference in New Issue
Block a user
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?
Spec: docs/specs/attunements/invoker/systems/pact-system-spec.md §5.1
Severity: Medium
Problem: The
signedPactDetailsstate field exists inprestigeStore.ts:41and is persisted, but no production code writes to it. BothcompletePactRitualinprestigeStore.ts:113-143andprocessPactRitualinpact-ritual.ts:30-52never set it. OnlydebugSetPactDetailscan write to it. Historical pact tracking is non-functional.Files:
src/lib/game/stores/prestigeStore.ts:113-143src/lib/game/stores/pipelines/pact-ritual.ts:30-52Fixed. The root cause was that
processPactRitualinpact-ritual.ts(the actual production code path for pact completion) never includedsignedPactDetailsin its writes. Fixed by:signedPactDetailstoPactRitualResult.writesinterfacesignedPactDetails,currentDay,currentHourparameters toprocessPactRitualgameStore.tscall site to passctx.prestige.signedPactDetailsandday, hourcompletePactRitualinprestigeStore.tsfor completeness (was dead code, now correct if called in future)