CI / UI Checks (pull_request) Successful in 11s
CI / Rust Checks (pull_request) Successful in 12m45s
CI / Rust Feature Validation (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Required Checks (pull_request) Successful in 1s
CI / Deploy (pull_request) Skipped
Community Release / release (push) Successful in 40m35s
Tool Draft фиксирует synchronous/background/adaptive, deadline и fallback; runtime применяет единый снимок политики (concurrency, очередь, approval, deadline) до внешнего действия. Насыщение отклоняется typed overload с retry guidance, mandatory safety store fail closed, background/adaptive используют опубликованный synchronous/unsupported fallback. Refs: #29
46 lines
1.3 KiB
Rust
46 lines
1.3 KiB
Rust
use sqlx::{Postgres, Transaction, query};
|
|
|
|
use super::authority::{MigrationDescriptor, MigrationError};
|
|
|
|
pub(super) const NAME: &str = "execution-admission-v24";
|
|
pub(super) const SOURCE: &str = include_str!("execution_admission_v24.sql");
|
|
pub(super) const SOURCE_SHA256: &str =
|
|
"efe021ebcd68bbed64edaa1e90c3a851f7b167b94ba65d88f525d58160f02681";
|
|
|
|
pub(super) async fn apply(
|
|
transaction: &mut Transaction<'_, Postgres>,
|
|
descriptor: &MigrationDescriptor,
|
|
) -> Result<(), MigrationError> {
|
|
sqlx::raw_sql(SOURCE)
|
|
.execute(&mut **transaction)
|
|
.await
|
|
.map_err(|_| {
|
|
MigrationError::new(
|
|
"apply_failed",
|
|
"apply.execution_admission_v24",
|
|
Some(24),
|
|
"restore_known_good_backup",
|
|
)
|
|
})?;
|
|
query(
|
|
"insert into __crank_migrations (version, name, checksum, phase, compatibility)
|
|
values ($1, $2, $3, $4, $5)",
|
|
)
|
|
.bind(descriptor.version)
|
|
.bind(descriptor.name)
|
|
.bind(&descriptor.checksum)
|
|
.bind(descriptor.phase)
|
|
.bind(descriptor.compatibility)
|
|
.execute(&mut **transaction)
|
|
.await
|
|
.map_err(|_| {
|
|
MigrationError::new(
|
|
"apply_failed",
|
|
"apply.canonical_ledger",
|
|
Some(24),
|
|
"restore_known_good_backup",
|
|
)
|
|
})?;
|
|
Ok(())
|
|
}
|