feat: owner review 2 phase 4b: mass conversion after import #13

Merged
Alby96 merged 82 commits from claude/owner-review-2-p4b-rc7 into main 2026-11-03 10:41:59 +01:00
Showing only changes of commit 44e5b9da9e - Show all commits
@@ -70,9 +70,12 @@ public sealed class LeaseFileTests(TestContext context)
var duration = TimeSpan.FromSeconds(TestTiming.Budget(0.3));
using var lease = LeaseFile.TryAcquire(locks, "seq-1", "server", duration);
Assert.NotNull(lease);
var first = LeaseFile.Read(lease.Path)!.Expires;
await Task.Delay(duration * 3);
Assert.True(lease.IsHeld);
Assert.Greater((LeaseFile.Read(lease.Path)!.Expires - DateTimeOffset.UtcNow).TotalMilliseconds, 0);
// Renewed: the expiry moved on. Whether it is still ahead of the clock at this instant depends on when the last
// timer ran, which a busy runner can delay by a few milliseconds past it.
Assert.Greater((LeaseFile.Read(lease.Path)!.Expires - first).TotalMilliseconds, duration.TotalMilliseconds);
Assert.Null(LeaseFile.TryAcquire(locks, "seq-1", "client", duration));
}