наблюдаемость: завершить базовый контур Community
Добавить структурированные журналы, метрики, трассировку и безопасный канал критических ошибок. Усилить границы рантайма, тесты, проверку зависимостей и сценарии развёртывания.
This commit is contained in:
1 parent
99bd05c145
commit
0e8f1ca03a
160 files changed
+13506
-1499
No files matched your search
@@ -50,6 +50,12 @@ pub async fn confirm_operation(
|
||||
consume_confirmation_token(store, &scope, provided_token, &input_hash).await
|
||||
}
|
||||
|
||||
pub(crate) fn is_applicable(operation: &RuntimeOperation) -> bool {
|
||||
effective_safety_policy(operation)
|
||||
.class
|
||||
.requires_confirmation()
|
||||
}
|
||||
|
||||
fn effective_safety_policy(operation: &RuntimeOperation) -> OperationSafetyPolicy {
|
||||
operation
|
||||
.execution_config
|
||||
@@ -137,13 +143,12 @@ async fn consume_confirmation_token(
|
||||
) -> Result<(), RuntimeError> {
|
||||
let key = confirmation_cache_key(operation_scope, token);
|
||||
let stored = store
|
||||
.get_value(CacheScope::Coordination, &key)
|
||||
.take_value(CacheScope::Coordination, &key)
|
||||
.await
|
||||
.map_err(|error| RuntimeError::InvalidPreparedRequest {
|
||||
field: "confirmation_token".to_owned(),
|
||||
reason: error.to_string(),
|
||||
})?;
|
||||
let _ = store.delete_value(CacheScope::Coordination, &key).await;
|
||||
|
||||
let Some(stored) = stored else {
|
||||
return Err(RuntimeError::InvalidConfirmationToken {
|
||||
|
||||
Reference in new issue
Block a user