InsightStore
Corex\Config\Insights\InsightStore · class · Config layer
The pure cache + history for insight results. It transforms the decoded option state (provider => {latest, history[]}) — adding a run, reading the latest, or mapping every provider to its latest for the dashboard. The controller owns the actual option read/write, so this stays headless-testable and free of WordPress. Every row is read through {@see InsightFailure}, so a failed run stored by an earlier release as a score of 50 is read as the failure it was (spec 114, US-SAFE-12).
Public API
Section titled “Public API”__construct(InsightFailure $failures)
Section titled “__construct(InsightFailure $failures)”put(array $state, InsightResult $result, int $historyLimit): array
Section titled “put(array $state, InsightResult $result, int $historyLimit): array”Record a result, returning the new state. History is newest-first and bounded.