Modello del dominio e interfacce degli archivi in Febe.Core; implementazione SQLite in Febe.Data (WAL, chiavi esterne, migrazioni numerate in transazione, coda di scrittura su un solo thread); logica della libreria in Febe.Core/Library; 164 prove MSTest, compresa la ricostruzione del database da una libreria di prova e la scala a 200.000 elementi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
23 lines
1.0 KiB
C#
23 lines
1.0 KiB
C#
using Febe.Core.Domain;
|
|
|
|
namespace Febe.Core.Storage;
|
|
|
|
/// <summary>Probable duplicates waiting for Alberto (spec §8.3 <c>duplicate_pair</c>, §9.3, §9.5).</summary>
|
|
public interface IDuplicateStore
|
|
{
|
|
/// <summary>
|
|
/// Adds a pair. Idempotent: if the same pending pair (same sides) exists, it is returned unchanged.
|
|
/// </summary>
|
|
Task<DuplicatePair> AddAsync(DuplicatePair pair, CancellationToken ct = default);
|
|
|
|
Task<DuplicatePair?> GetAsync(long pairId, CancellationToken ct = default);
|
|
|
|
/// <summary>Pending pairs in creation order, after <paramref name="afterId"/>.</summary>
|
|
Task<IReadOnlyList<DuplicatePair>> ListPendingAsync(DuplicateOrigin? origin = null, long afterId = 0, int limit = 200, CancellationToken ct = default);
|
|
|
|
Task<int> CountPendingAsync(DuplicateOrigin? origin = null, CancellationToken ct = default);
|
|
|
|
/// <summary>Records Alberto's decision. Applying it to files is the caller's job.</summary>
|
|
Task DecideAsync(long pairId, DuplicateDecision decision, DateTimeOffset at, CancellationToken ct = default);
|
|
}
|