fix(workspace): a pull that succeeded never fails on the name it follows

The name follow after a pull caught only the home's own exceptions, so a 403
or any other error from the home's list (or a bundle in use) made a pull that
had already pulled and replayed report a failure. It is now logged as a
warning and the name is followed at the next pull; a cancellation still passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-04 13:35:47 +01:00
1 parent ab6cad51b2
commit 5ff9c086fd
3 files changed
+73 -6

No files matched your search

@@ -197,6 +197,41 @@ internal sealed class CountingHome(IProjectHome home) : IProjectHome
public Task<PushResult> PushAsync(Guid projectId, ProjectVersion version, CancellationToken cancellationToken) => home.PushAsync(projectId, version, cancellationToken);
}
/// <summary>
/// A home whose list of projects fails with an error no other call gives (a server's 403 or 500 passed through as it is), the
/// rest passed through.
/// </summary>
internal sealed class FailingListHome(IProjectHome home) : IProjectHome
{
public int Lists { get; private set; }
public Task<IReadOnlyList<SequenceProject>> ListAsync(CancellationToken cancellationToken)
{
Lists++;
throw new InvalidOperationException("The server refused the list (403).");
}
public Task<HomeSequence> SequenceAsync(CancellationToken cancellationToken) => home.SequenceAsync(cancellationToken);
public Task<SequenceProject> CreateAsync(string name, Guid? fromVersionId, string? author, CancellationToken cancellationToken) =>
home.CreateAsync(name, fromVersionId, author, cancellationToken);
public Task<ProjectVersion> HeadAsync(Guid projectId, CancellationToken cancellationToken) => home.HeadAsync(projectId, cancellationToken);
public Task<ProjectVersion?> GetVersionAsync(Guid projectId, Guid versionId, CancellationToken cancellationToken) =>
home.GetVersionAsync(projectId, versionId, cancellationToken);
public Task<IReadOnlyList<ProjectVersion>> VersionsAfterAsync(Guid projectId, int afterNumber, int limit, CancellationToken cancellationToken) =>
home.VersionsAfterAsync(projectId, afterNumber, limit, cancellationToken);
public Task<IReadOnlyList<ProjectVersion>> HistoryAsync(Guid projectId, int? beforeNumber, int limit, CancellationToken cancellationToken) =>
home.HistoryAsync(projectId, beforeNumber, limit, cancellationToken);
public Task<PushResult> PushAsync(Guid projectId, ProjectVersion version, CancellationToken cancellationToken) => home.PushAsync(projectId, version, cancellationToken);
public Task<HomeFrames> FramesAsync(CancellationToken cancellationToken) => home.FramesAsync(cancellationToken);
}
/// <summary>A home that cannot be reached, standing for a server out of reach or an archive offline.</summary>
internal sealed class UnreachableHome(IProjectHome home) : IProjectHome
{