WIP: bd-164 timestamp-only export deduplication (~80% complete)
Implemented content hash-based deduplication to skip exports when only timestamps changed. Core logic complete, needs export_hashes table wiring. Completed: - Added computeIssueContentHash() excluding timestamps - Created shouldSkipExport() logic - Updated export loop to skip timestamp-only changes - Added hash.go with content hashing - Extended Storage interface Remaining: - Complete export_hashes table migration - Add SetExportHash/GetExportHash to interface - Revert content_hash from dirty_issues approach - Wire up hash persistence in export - Testing See bd-164 notes for details. Amp-Thread-ID: https://ampcode.com/threads/T-d70657d1-4433-4f7e-b10a-3fccf8bf17fb Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -120,6 +120,14 @@ CREATE TABLE IF NOT EXISTS dirty_issues (
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_dirty_issues_marked_at ON dirty_issues(marked_at);
|
||||
|
||||
-- Tracks content hash of last export for each issue (for timestamp-only dedup, bd-164)
|
||||
CREATE TABLE IF NOT EXISTS export_hashes (
|
||||
issue_id TEXT PRIMARY KEY,
|
||||
content_hash TEXT NOT NULL,
|
||||
exported_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Issue counters table (for atomic ID generation)
|
||||
CREATE TABLE IF NOT EXISTS issue_counters (
|
||||
prefix TEXT PRIMARY KEY,
|
||||
|
||||
Reference in New Issue
Block a user