feat: complete Epic 1 production foundation

This commit is contained in:
bsodfather committed 2026-08-25 01:24:11 +03:00
1 parent 767428436d
commit 182bde8ac0
298 files changed
+35711 -5291

No files matched your search

+23 -5
View File
@@ -1,19 +1,28 @@
use crank_adapter_rest::RestAdapterError;
use crank_core::{ExecutionMode, OperationSafetyClass, Protocol};
use crank_core::{ExecutionMode, OperationSafetyClass, Protocol, ProtocolAdapterError};
use crank_mapping::MappingError;
use crank_schema::SchemaError;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum RuntimeError {
#[error("execution request is invalid")]
InvalidExecutionRequest,
#[error("execution deadline elapsed")]
ExecutionDeadlineElapsed { may_have_dispatched: bool },
#[error(transparent)]
Schema(#[from] SchemaError),
#[error(transparent)]
InputSchema(SchemaError),
#[error(transparent)]
OutputSchema(SchemaError),
#[error(transparent)]
Mapping(#[from] MappingError),
#[error(transparent)]
RestAdapter(#[from] RestAdapterError),
#[error("{0}")]
ProtocolAdapter(String),
InputMapping(MappingError),
#[error(transparent)]
OutputMapping(MappingError),
#[error(transparent)]
ProtocolAdapter(#[from] ProtocolAdapterError),
#[error("protocol {protocol:?} is not supported by runtime")]
UnsupportedProtocol { protocol: Protocol },
#[error("operation {operation_id} does not support requested execution mode {mode:?}")]
@@ -46,8 +55,17 @@ pub enum RuntimeError {
IdempotencyConflict { operation_id: String },
#[error("the outcome of operation {operation_id} is unknown; automatic retry is unsafe")]
IdempotencyOutcomeUnknown { operation_id: String },
#[error("idempotency completion is unavailable after operation {operation_id} dispatch")]
IdempotencyCompletionUnknown { operation_id: String },
#[error("authorization storage is unavailable")]
AuthorizationStoreUnavailable,
#[error("auth profile {auth_profile_id} was not found")]
MissingAuthProfile { auth_profile_id: String },
#[error("auth profile {auth_profile_id} is invalid: {reason}")]
InvalidAuthProfileConfig {
auth_profile_id: String,
reason: String,
},
#[error("secret {secret_id} was not found")]
MissingSecret { secret_id: String },
#[error("secret {secret_id} does not have current version {version}")]