import type { ForensicsRun, ForensicsSegment, ForensicsTile } from '../forensics-types'

/** Verbatim values from collector/test/fixtures/harness/timeline-opt-data-integrity.json. */
export const OPT_DATA_INTEGRITY_TILES: ForensicsTile[] = [
  { key: 'wallClockMs', label: 'Run span', value: 1_140_000 },
  { key: 'runCount', label: 'Run attempts', value: 1 },
  { key: 'llmMs', label: 'LLM time', value: 750_000 },
  { key: 'gate0Ms', label: 'gate0 time', value: 300_000 },
  { key: 'idleRestartMs', label: 'Idle between runs', value: 60_000 },
  { key: 'tasksLanded', label: 'Tasks landed', value: 4 },
]

export const OPT_DATA_INTEGRITY_ATTRIBUTION = [
  { cat: 'llm-implement', totalMs: 420_000 },
  { cat: 'llm-fixer', totalMs: 180_000 },
  { cat: 'llm-review', totalMs: 150_000 },
  { cat: 'gate0', totalMs: 300_000 },
  { cat: 'idle-restart', totalMs: 60_000 },
  { cat: 'other', totalMs: 30_000 },
]

export const OPT_DATA_INTEGRITY_RUNS: ForensicsRun[] = [
  {
    index: 0,
    startTs: '2026-07-08T21:20:36.610+07:00',
    endTs: '2026-07-08T22:22:33.603+07:00',
    durationMs: 3_716_993,
    outcome: 'done',
    landed: 4,
    quarantined: 0,
    skipped: 0,
    gate0Fails: 1,
    fixerAttempts: 1,
  },
]

/** Verbatim values from collector/test/fixtures/harness/timeline-opt-data-integrity.json. */
export const OPT_DATA_INTEGRITY_SEGMENTS: ForensicsSegment[] = [
  { t0: 1783520436610, durMs: 420_000, cat: 'llm-implement', taskId: 't1', agentId: 't1' },
  { t0: 1783520856610, durMs: 300_000, cat: 'gate0', taskId: 't1', agentId: 't1' },
  { t0: 1783521156610, durMs: 180_000, cat: 'llm-fixer', taskId: 't1', agentId: 't1' },
  { t0: 1783521336610, durMs: 150_000, cat: 'llm-review', taskId: 't5', agentId: 't5' },
  { t0: 1783521486610, durMs: 60_000, cat: 'idle-restart' },
  { t0: 1783521546610, durMs: 30_000, cat: 'other' },
]

/** Verbatim values from collector/test/fixtures/harness/timeline-grok-account-parity.json. */
export const GROK_ACCOUNT_PARITY_RUNS: ForensicsRun[] = [
  {
    index: 0,
    startTs: '2026-07-10T09:09:00.000+07:00',
    endTs: '2026-07-10T09:10:00.000+07:00',
    durationMs: 60_000,
    outcome: 'crash',
    landed: 0,
    quarantined: 0,
    skipped: 0,
    gate0Fails: 1,
    fixerAttempts: 0,
  },
]

/** Verbatim values from collector/test/fixtures/harness/timeline-grok-account-parity.json. */
export const GROK_ACCOUNT_PARITY_SEGMENTS: ForensicsSegment[] = [
  { t0: 1783649340000, durMs: 40_000, cat: 'llm-implement', taskId: 't1', agentId: 't1' },
  { t0: 1783649380000, durMs: 20_000, cat: 'gate0', taskId: 't1', agentId: 't1' },
]
