Skip to content

Architecture: cora debt reads from file snapshots, not cora.db (SoT gap) #403

Description

@ajianaz

Problem

cora debt reads from .cora/history/*.json file snapshots while cora findings reads from cora.db. This creates a data inconsistency:

Source Reviews Findings
cora debt (file snapshots) 15 16
cora findings (cora.db) 12 1

The DB is supposed to be the Single Source of Truth (SoT) since v0.8.4.

Expected

cora debt should read from cora.db (reviews + findings tables) instead of file-based snapshots. File snapshots should be deprecated or synced.

Impact

  • cora debt shows stale/phantom data from old reviews that pre-date DB persistence
  • Users see conflicting numbers between cora debt and cora findings stats
  • File-based snapshots are not portable, not queryable, and prone to corruption

Proposed Fix

  1. Migrate debt_tracker to read from cora.db reviews/findings tables
  2. Optionally keep file snapshots as a backup/fallback
  3. Consider a migration tool to backfill DB from existing snapshot files

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmajorMajor severity issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions