fix: Remove unsafe ClearDirtyIssues() method (bd-b6xo)
Remove ClearDirtyIssues() which had a race condition that could lose dirty issues if export failed partway through. All callers now use ClearDirtyIssuesByID() which only clears specific exported issues. - Remove from Storage interface - Remove from SQLite and Memory implementations - Update 6 test call sites to use ClearDirtyIssuesByID() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -351,9 +351,9 @@ func TestLabelMarksDirty(t *testing.T) {
|
||||
}
|
||||
|
||||
// Clear dirty issues
|
||||
err = store.ClearDirtyIssues(ctx)
|
||||
err = store.ClearDirtyIssuesByID(ctx, []string{issue.ID})
|
||||
if err != nil {
|
||||
t.Fatalf("ClearDirtyIssues failed: %v", err)
|
||||
t.Fatalf("ClearDirtyIssuesByID failed: %v", err)
|
||||
}
|
||||
|
||||
// Add label - should mark issue dirty
|
||||
@@ -372,9 +372,9 @@ func TestLabelMarksDirty(t *testing.T) {
|
||||
}
|
||||
|
||||
// Clear dirty again
|
||||
err = store.ClearDirtyIssues(ctx)
|
||||
err = store.ClearDirtyIssuesByID(ctx, []string{issue.ID})
|
||||
if err != nil {
|
||||
t.Fatalf("ClearDirtyIssues failed: %v", err)
|
||||
t.Fatalf("ClearDirtyIssuesByID failed: %v", err)
|
||||
}
|
||||
|
||||
// Remove label - should mark issue dirty
|
||||
|
||||
Reference in New Issue
Block a user