[skip ci] wip: preserve Hermes crank development checkpoint

Owner-authorized recovery of accumulated source changes.
Includes accepted work and in-progress changes; NOT a release or acceptance.
Parent baseline 1b6db09bd1. Runtime data, build caches and local credentials excluded.
This commit is contained in:
Hermes DevOps committed 2026-10-25 08:05:37 +00:00
1 parent 1b6db09bd1
commit 301dce301a
357 files changed
+118831 -5113

No files matched your search

@@ -1,6 +1,7 @@
#![allow(dead_code, unused_imports)]
use std::collections::BTreeMap;
use std::str::FromStr;
use crank_core::{
AgentId, AgentOperationBinding, AgentStatus, AgentVersion, ApiKeyHeaderAuthConfig, AuthConfig,
@@ -295,6 +296,29 @@ impl TestDatabase {
.unwrap()
}
/// Registry over a multi-connection pool in this test schema: concurrency regressions need
/// sessions that can genuinely block on each other's row locks.
pub(super) async fn concurrent_registry(&self, max_connections: u32) -> PostgresRegistry {
let database_url = format!(
"{}?options=-csearch_path%3D{}",
self.database_url, self.schema
);
let options = sqlx::postgres::PgConnectOptions::from_str(&database_url)
.expect("the test database url must parse into connect options");
PostgresRegistry::connect_with_options_and_pool_config(
options,
crank_registry::PostgresPoolConfig {
max_connections,
min_connections: 0,
acquire_timeout_ms: 10_000,
idle_timeout_ms: 600_000,
max_lifetime_ms: 1_800_000,
},
)
.await
.expect("the concurrent test registry must connect")
}
pub(super) async fn cleanup(&self) {
self.admin_pool
.execute(sqlx::query(sqlx::AssertSqlSafe(format!(