SQLite cache bootstrap + single-issue mirror upsert (#3) #55
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/sqlite-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lands #3's core seam: a rebuildable SQLite mirror of the reconciled backlog — an index over gitea's durable truth, never the source of truth (D4).
What
cache/cache-v0.ts: the 5-table schema (issues/labels/milestones/comments/issue_events); aCacheDriverinjected-IO interface (exec/run/get/all); pure row↔domain mappers.upsertIssuemirrors one issue (+ its milestone), upsert-by-number so re-reconciling updates in place, never duplicates.readIssuere-derivesfactsfrom the stored label set viaextractLabelFacts— facts are never stored, so the mirror can't drift from the label semantics.node:sqlite(present in the Node 24 test runtime) to the same seam better-sqlite3 will fill.Acceptance ✅
Upsert one reconciled issue → read back → assert
estimateDays/priority/hardDeadline(plus upsert-in-place, no-milestone, and cache-miss cases). 143 core tests green; typecheck clean.Deliberately out of scope (follow-up)
The main-process better-sqlite3 adapter + migrating the JSON snapshot-store onto it. It's packaging-sensitive (native module → electron-rebuild + asarUnpack) and would need a fresh .dmg verification; kept separate so the shipped build stays green. #30 (purity/rebuild test) depends on that integration, so it stays blocked until then.
🤖 Generated with Claude Code