Complete bd-164: Fix timestamp-only export deduplication

- Add export_hashes table to track last exported content state
- Implement GetExportHash/SetExportHash in storage interface
- Update shouldSkipExport to use export_hashes instead of dirty_issues
- Call SetExportHash after successful export
- Clean up dirty_issues table (remove content_hash column)
- Simplify MarkIssueDirty functions (no longer compute hashes)
- Update markIssuesDirtyTx signature (remove store parameter)

Testing:
- Timestamp-only updates are skipped during export ✓
- Real content changes trigger export ✓
- export_hashes table populated correctly ✓

Fixes bd-159, bd-164
This commit is contained in:
Steve Yegge
2025-10-26 20:35:37 -07:00
parent a898df6915
commit a02729ea57
7 changed files with 109 additions and 56 deletions

View File

@@ -56,6 +56,10 @@ type Storage interface {
ClearDirtyIssues(ctx context.Context) error // WARNING: Race condition (bd-52), use ClearDirtyIssuesByID
ClearDirtyIssuesByID(ctx context.Context, issueIDs []string) error
// Export hash tracking (for timestamp-only dedup, bd-164)
GetExportHash(ctx context.Context, issueID string) (string, error)
SetExportHash(ctx context.Context, issueID, contentHash string) error
// Config
SetConfig(ctx context.Context, key, value string) error
GetConfig(ctx context.Context, key string) (string, error)