VanishedFileRetry

works.iterative.claude.zio.log.VanishedFileRetry

A vendor tree can be pruned in the gap between resolving a session's path and actually reading it. The read then fails because the file no longer exists; these helpers re-resolve the session once and retry against whatever root now wins, so a live prune degrades to the mirror instead of an opaque I/O error. A second failure is surfaced as-is: one retry only.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def isVanished(t: Throwable): Boolean

True when t or any error in its cause chain is a "file no longer exists" failure — the signature of a path resolved just before it was pruned.

True when t or any error in its cause chain is a "file no longer exists" failure — the signature of a path resolved just before it was pruned.

Attributes

def read[A](path: Path, read: Path => IO[ArchiveError, A], reResolve: IO[ArchiveError, Path]): IO[ArchiveError, A]

Runs read against path. If it fails because the file vanished, evaluates reResolve once for the path to retry against and reads that, surfacing any second failure. reResolve fails with the caller's chosen error when the session no longer resolves to a usable path at all.

Runs read against path. If it fails because the file vanished, evaluates reResolve once for the path to retry against and reads that, surfacing any second failure. reResolve fails with the caller's chosen error when the session no longer resolves to a usable path at all.

Attributes

def stream[A](open: Path => ZStream[Any, ArchiveError, A], resolve: IO[ArchiveError, Option[Path]], whenGone: => ArchiveError): ZStream[Any, ArchiveError, A]

Opens a stream for the session's resolved path. If reading fails because the file vanished, re-resolves once and opens the new path, surfacing any second failure. whenGone is used when nothing resolves.

Opens a stream for the session's resolved path. If reading fails because the file vanished, re-resolves once and opens the new path, surfacing any second failure. whenGone is used when nothing resolves.

Attributes