Fix prediction persistence crash after successful LLM ideas #53

Closed
opened 2026-07-04 10:25:21 +00:00 by MrSphay · 1 comment
Owner

Observed problem

Live validation of the LiteLLM timeout fix generated five valid ideas, then the sweep failed while persisting predictions with Cannot access stableId before initialization.

IntelligenceStore._recordPredictions declares const stableId = stableId(...), shadowing the module helper and triggering the temporal dead zone whenever LLM ideas are present.

Acceptance criteria

  • Rename the local value so the stable ID helper is callable.
  • Add a SQLite-backed regression test that records and reads an LLM prediction.
  • Pass Gitea runner tests and image build.
  • Redeploy and verify a full sweep reports ideasSource=llm without lastSweepError.
## Observed problem Live validation of the LiteLLM timeout fix generated five valid ideas, then the sweep failed while persisting predictions with `Cannot access stableId before initialization`. `IntelligenceStore._recordPredictions` declares `const stableId = stableId(...)`, shadowing the module helper and triggering the temporal dead zone whenever LLM ideas are present. ## Acceptance criteria - Rename the local value so the stable ID helper is callable. - Add a SQLite-backed regression test that records and reads an LLM prediction. - Pass Gitea runner tests and image build. - Redeploy and verify a full sweep reports `ideasSource=llm` without `lastSweepError`.
Author
Owner

Fix is in PR #54: #54. The live LLM call already produced five valid ideas; this PR fixes the subsequent persistence failure.

Fix is in PR #54: https://git.wilkensxl.de/Code-Inc/intelligence-terminal/pulls/54. The live LLM call already produced five valid ideas; this PR fixes the subsequent persistence failure.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Code-Inc/intelligence-terminal#53