Let reviews see low-confidence suggestions and rebase preview applies

A low-confidence answer was discarded inside Classify, so Analyse showed
the row as unchanged instead of a reviewable suggestion; the fallback
decision moves to the import path, which keeps the merchant link and the
recorded confidence. ApplyPreview now rebases onto the current journal:
unrelated commits during a minutes-long paced run no longer invalidate
the review, only an edit to a selected transaction itself conflicts, and
applied changes are pruned so the rest stay appliable.
This commit is contained in:
Lars Nolden
2026-09-12 18:35:38 +02:00
parent 9092c5721d
commit 2373790be3
6 changed files with 160 additions and 28 deletions
-3
View File
@@ -258,9 +258,6 @@ func (c *Client) Classify(ctx context.Context, facts domain.Facts, data domain.D
}
}
e.Classification = domain.Provenance{Source: "openrouter", Model: model, Confidence: answer.Confidence, Timestamp: time.Now().UTC().Format(time.RFC3339)}
if answer.Confidence == "low" {
e.CategoryID = domain.Fallback(facts).CategoryID
}
validationData := data
if proposed != nil {
validationData.Merchants = append(append([]domain.Merchant{}, data.Merchants...), *proposed)