obzenflow_core 0.2.4

Core domain layer for ObzenFlow - pure abstractions with minimal dependencies
Documentation
// SPDX-License-Identifier: MIT OR Apache-2.0
// SPDX-FileCopyrightText: 2025-2026 ObzenFlow Contributors
// https://obzenflow.dev

/// Journal errors (domain-level, not I/O specific)
#[derive(Debug, thiserror::Error)]
pub enum JournalError {
    /// Storage may have committed. Callers must neither retry nor refund
    /// committed-output reservations as if rollback had been established.
    #[error("journal commit outcome is indeterminate")]
    CommitIndeterminate {
        #[source]
        source: Box<dyn std::error::Error + Send + Sync>,
    },

    #[error("Journal is full")]
    Full,

    #[error("Event not found: {0}")]
    EventNotFound(String),

    #[error("Writer not authorized")]
    Unauthorized,

    #[error("Causal ordering violation")]
    CausalityViolation,

    #[error("Subscription closed")]
    SubscriptionClosed,

    #[error("Journal reader does not support a fixed committed initial prefix")]
    InitialPrefixUnsupported,

    #[error(
        "Journal does not support atomic append group '{group_id}' with {member_count} members"
    )]
    AtomicAppendUnsupported {
        group_id: String,
        member_count: usize,
    },

    /// Generic implementation error with source
    #[error("Implementation error: {message}")]
    Implementation {
        message: String,
        #[source]
        source: Box<dyn std::error::Error + Send + Sync>,
    },
}