fix: harden Structural S/R after OHLCV writes and surface cleanup failures
Deploy / lint (push) Successful in 8s
Deploy / test (push) Successful in 1m18s
Deploy / deploy (push) Successful in 40s

Honor custom S/R tolerance as a transient detect, refresh levels after OHLCV
mutations without failing committed price writes, report per-ticker S/R
rebuild failures from admin cleanup, and warn in the admin UI when refresh is partial.
This commit is contained in:
2026-07-18 13:44:34 +02:00
parent b0e33e1606
commit cad4b49e7c
11 changed files with 181 additions and 23 deletions
+10 -1
View File
@@ -269,9 +269,18 @@ export function acknowledgeSystemEvents(days = 7) {
}
// Data cleanup
export interface CleanupResult {
ohlcv: number;
sentiment: number;
fundamentals: number;
sr_refresh_ok: number;
sr_refresh_failed: number;
sr_refresh_failures: { symbol: string; error: string }[];
}
export function cleanupData(olderThanDays: number) {
return apiClient
.post<{ message: string }>('admin/data/cleanup', {
.post<CleanupResult>('admin/data/cleanup', {
older_than_days: olderThanDays,
})
.then((r) => r.data);