/** * Copyright (c) 2025 Mihajlo Stojanovski * All rights reserved. */ import { HistoryRecord } from "../types"; export { HistoryRecord }; /** * Legacy TestPattern interface (kept for HTML rendering compatibility) */ export interface TestPattern { testId: string; flakeRate: number; failureRate: number; avgDuration: number; durationTrend: "stable" | "slower" | "faster"; lastStatus: string; commonSignature?: string; } /** * History Store * Enterprise principle: append-only, bounded window, crash-safe. * * Newer versions store one JSON file per run to avoid write contention in CI. * Legacy `runs.jsonl` history is still read and pruned for backwards compatibility. */ export declare class HistoryStore { private readonly historyDir; private readonly legacyRunsFile; private readonly runsDir; /** * Initialize the history store * * @param historyDir - Directory path for storing test history */ constructor(historyDir: string); /** * Save a test run to history storage. * * Uses atomic write + rename into a run-specific file to reduce CI contention. * * @param entry - Test run record with results, timestamps, and metadata */ saveRun(entry: HistoryRecord): Promise; /** * Get raw entries for the last N days. */ getEntries(days?: number): Promise; /** * Remove entries older than the retention window. */ private prune; private loadRunFiles; private loadLegacyEntries; private ensureDir; } //# sourceMappingURL=store.d.ts.map