tarlatan
    Preparing search index...

    Interface LogReader

    A project log opened only to read.

    interface LogReader {
        readFrom: (
            position: number & Brand<"LogPosition">,
        ) => Effect<readonly LoggedEvent[], ProjectLogError | StoreVersionNewer>;
        version: number;
        versionedFrom: (
            position: number & Brand<"LogPosition">,
        ) => Effect<VersionedEvents, ProjectLogError | StoreVersionNewer>;
    }
    Index
    readFrom: (
        position: number & Brand<"LogPosition">,
    ) => Effect<readonly LoggedEvent[], ProjectLogError | StoreVersionNewer>

    Every event after position, in order, read in one deferred transaction whose first statement reads the version and decides on it (review finding F6). At 0, 1 or 2, each a format this release reads, the events are read. A newer log fails with StoreVersionNewer and one below 0 with ProjectLogError (owner ruling P2), and no event is read.

    version: number

    The log's format version as its header read at the open, decoded as an integer: 0 for a log v0.1.0 wrote and no writer has stamped since, 1 for a log not yet raised, 2 for the format this release knows. The reader stamps nothing. Each read decides on the version its own snapshot reads, which another connection may have changed since the open.

    versionedFrom: (
        position: number & Brand<"LogPosition">,
    ) => Effect<VersionedEvents, ProjectLogError | StoreVersionNewer>

    The events LogReader.readFrom reads after position, with the version the same snapshot's header read, so status can report the version the events came from (review finding F6). Fails as readFrom does.