From b711cf2e96c1ff49fdbe3b58c3ba8794d19e13c5 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 21:55:48 +0300 Subject: [PATCH 01/18] test(session): add file and MongoDB storage conformance tests Extend the session store conformance suite to cover the file and MongoDB storage drivers alongside the existing memory and SQLite backends. The MongoDB test is ignored by default and requires a local replica set via TSD_MONGO_URL, with a helper that validates the target is loopback and generates a unique database name per run. Auto-committed-on: dragonfly --- Cargo.toml | 2 ++ crates/tinyagents-session/Cargo.toml | 2 ++ .../src/port/drivers/mod_tests.rs | 31 ++++++++++++++++ crates/tinyagents-session/src/testkit/mod.rs | 35 +++++++++++++++++++ 4 files changed, 70 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 141f9bfa3..71b00a10c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,8 @@ tracing = "0.1" # module (tinyflows, tinybox, tinychannels, ...) and tinyinference names, so a # host's graph holds one set of port types with no [patch] to reconcile them. tinystoragedrivers-core = { version = "1.0.0", git = "https://github.com/tinyhumansai/tinystoragedrivers", tag = "v1.0.0" } +tinystoragedrivers-file = { version = "1.0.0", git = "https://github.com/tinyhumansai/tinystoragedrivers", tag = "v1.0.0" } +tinystoragedrivers-mongodb = { version = "1.0.0", git = "https://github.com/tinyhumansai/tinystoragedrivers", tag = "v1.0.0" } tinystoragedrivers-sqlite = { version = "1.0.0", git = "https://github.com/tinyhumansai/tinystoragedrivers", tag = "v1.0.0" } uuid = { version = "1", features = ["v4"] } diff --git a/crates/tinyagents-session/Cargo.toml b/crates/tinyagents-session/Cargo.toml index 136fb8dc0..9470fdda5 100644 --- a/crates/tinyagents-session/Cargo.toml +++ b/crates/tinyagents-session/Cargo.toml @@ -56,6 +56,8 @@ storage-drivers = [] # `legacy`, so they need the importer even under `--no-default-features`. tinyagents-session = { path = ".", features = ["legacy-import"] } tinystoragedrivers-sqlite = { workspace = true } +tinystoragedrivers-file = { workspace = true } +tinystoragedrivers-mongodb = { workspace = true } tokio = { workspace = true, default-features = true, features = ["macros", "rt-multi-thread"] } [lints] diff --git a/crates/tinyagents-session/src/port/drivers/mod_tests.rs b/crates/tinyagents-session/src/port/drivers/mod_tests.rs index 5b680830e..d5840b412 100644 --- a/crates/tinyagents-session/src/port/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/port/drivers/mod_tests.rs @@ -1,6 +1,7 @@ use super::*; use crate::testkit::conformance::{session_store_conformance, session_store_isolation_conformance}; use crate::turn_state::{TurnLifecycle, TurnState}; +use tinystoragedrivers_file::FileStorage; use tinystoragedrivers_core::MemoryStorage; use tinystoragedrivers_sqlite::SqliteStorage; @@ -117,6 +118,36 @@ async fn sqlite_backed_stores_keep_agents_apart() { session_store_isolation_conformance(&sqlite(&dir)).await; } +#[tokio::test] +async fn file_backed_stores_meet_the_contract_and_keep_agents_apart() { + let dir = tempfile::tempdir().unwrap(); + let stores = DriverSessionStores::new( + Arc::new(FileStorage::open(dir.path()).unwrap()), + tinystoragedrivers_core::Scope::local(), + ) + .unwrap(); + session_store_conformance(&stores).await; + session_store_isolation_conformance(&stores).await; +} + +/// Run with `TSD_MONGO_URL=... cargo test -p tinyagents-session --all-features +/// mongodb_backed_stores -- --ignored` against a local replica set. +#[tokio::test(flavor = "multi_thread")] +#[ignore = "requires a local MongoDB replica set; run explicitly with TSD_MONGO_URL"] +async fn mongodb_backed_stores_meet_the_contract_and_keep_agents_apart() { + let (uri, database) = crate::testkit::local_mongo_test_target("session_store"); + let backend = tinystoragedrivers_mongodb::MongoStorage::connect(&uri, &database) + .await + .expect("local MongoDB replica set is reachable"); + let stores = DriverSessionStores::new( + Arc::new(backend), + tinystoragedrivers_core::Scope::local(), + ) + .unwrap(); + session_store_conformance(&stores).await; + session_store_isolation_conformance(&stores).await; +} + #[tokio::test(flavor = "multi_thread")] async fn stores_work_from_a_multi_threaded_runtime() { session_store_conformance(&memory()).await; diff --git a/crates/tinyagents-session/src/testkit/mod.rs b/crates/tinyagents-session/src/testkit/mod.rs index dd7629b13..32126d21b 100644 --- a/crates/tinyagents-session/src/testkit/mod.rs +++ b/crates/tinyagents-session/src/testkit/mod.rs @@ -37,6 +37,41 @@ pub mod conformance; mod in_memory_transcript; pub use in_memory_transcript::InMemoryTranscriptHistory; +/// Returns a local MongoDB URI and a unique database name for an explicitly +/// enabled driver conformance test. +#[cfg(test)] +pub(crate) fn local_mongo_test_target(label: &str) -> (String, String) { + let uri = std::env::var("TSD_MONGO_URL") + .expect("set TSD_MONGO_URL to run this ignored MongoDB conformance test"); + let rest = uri.split_once("://").map_or(uri.as_str(), |(_, rest)| rest); + let authority = rest.split(['/', '?']).next().unwrap_or_default(); + let hosts = authority.rsplit_once('@').map_or(authority, |(_, h)| h); + let is_loopback = !hosts.is_empty() + && !uri.starts_with("mongodb+srv://") + && hosts.split(',').all(|host| { + let name = if let Some(v6) = host.strip_prefix('[') { + v6.split(']').next().unwrap_or_default() + } else { + host.rsplit_once(':').map_or(host, |(name, _)| name) + }; + matches!(name, "localhost" | "127.0.0.1" | "::1") + }); + assert!( + is_loopback, + "TSD_MONGO_URL must name a local MongoDB server for conformance tests" + ); + + let nanos = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map_or(0, |duration| duration.as_nanos()); + let database = format!( + "tinyagents_session_{label}_{}_{}", + std::process::id(), + nanos + ); + (uri, database) +} + /// Creates an empty driver-backed transcript locator over in-memory storage. /// /// Use this when a test needs the same locator interface used by production From 564ddf15b64db381704df3da1472f99ef2a9cb75 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 21:56:20 +0300 Subject: [PATCH 02/18] test(run_ledger): cover driver conformance and scope isolation Adds a shared conformance check that runs the run ledger contract against a scoped backend and verifies that a separate scope cannot list another scope's runs. The check runs against file storage by default and against MongoDB behind an ignored test that requires a local replica set. Auto-committed-on: dragonfly --- .../scripts/start-session-mongo-replset.sh | 38 +++++++++++++ .github/workflows/session-mongodb.yml | 56 +++++++++++++++++++ .../src/run_ledger/drivers/mod_tests.rs | 43 +++++++++++++- 3 files changed, 136 insertions(+), 1 deletion(-) create mode 100755 .github/scripts/start-session-mongo-replset.sh create mode 100644 .github/workflows/session-mongodb.yml diff --git a/.github/scripts/start-session-mongo-replset.sh b/.github/scripts/start-session-mongo-replset.sh new file mode 100755 index 000000000..5d59eab71 --- /dev/null +++ b/.github/scripts/start-session-mongo-replset.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# Start the same single-node replica-set fixture used by tinystoragedrivers. +set -euo pipefail + +port="${1:-27017}" +image="${2:-mongo:7}" +name="tinyagents-session-mongo" + +cleanup() { + if [[ $? -ne 0 ]]; then + docker rm -f "$name" >/dev/null 2>&1 || true + fi +} +trap cleanup EXIT + +docker run -d --rm --name "$name" -p "127.0.0.1:${port}:27017" "$image" \ + --replSet rs0 --bind_ip_all >/dev/null + +for _ in $(seq 1 60); do + if docker exec "$name" mongosh --quiet --eval 'db.adminCommand({ping: 1}).ok' >/dev/null 2>&1; then + break + fi + sleep 1 +done + +docker exec "$name" mongosh --quiet --eval \ + 'rs.initiate({_id: "rs0", members: [{_id: 0, host: "localhost:27017"}]})' >/dev/null + +for _ in $(seq 1 60); do + if [[ "$(docker exec "$name" mongosh --quiet --eval 'db.hello().isWritablePrimary')" == "true" ]]; then + echo "MongoDB replica set ready on port ${port}" + exit 0 + fi + sleep 1 +done + +echo "MongoDB replica set did not elect a primary" >&2 +exit 1 diff --git a/.github/workflows/session-mongodb.yml b/.github/workflows/session-mongodb.yml new file mode 100644 index 000000000..d1720a0dc --- /dev/null +++ b/.github/workflows/session-mongodb.yml @@ -0,0 +1,56 @@ +name: Session MongoDB conformance + +on: + pull_request: + paths: + - "Cargo.toml" + - "Cargo.lock" + - "crates/tinyagents-session/**" + - ".github/scripts/start-session-mongo-replset.sh" + - ".github/workflows/session-mongodb.yml" + push: + branches: [main] + paths: + - "Cargo.toml" + - "Cargo.lock" + - "crates/tinyagents-session/**" + - ".github/scripts/start-session-mongo-replset.sh" + - ".github/workflows/session-mongodb.yml" + schedule: + - cron: "23 3 * * *" + workflow_dispatch: + +permissions: + contents: read + +jobs: + mongo-conformance: + name: MongoDB session-store and run-ledger conformance + runs-on: ubuntu-latest + timeout-minutes: 35 + env: + TSD_MONGO_URL: mongodb://localhost:27017/tsd_test?directConnection=true + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_TEST_DEBUG: 0 + RUST_BACKTRACE: 1 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + submodules: recursive + + - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable + with: + toolchain: stable + + - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + with: + workspaces: . + key: session-mongodb + + - name: Start a local MongoDB replica set + run: .github/scripts/start-session-mongo-replset.sh 27017 + + - name: Run MongoDB driver conformance + run: cargo test -p tinyagents-session --all-features mongodb_ -- --ignored diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index 12d8fda87..5c1596e92 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -1,8 +1,10 @@ use super::*; use crate::run_ledger::LedgerError; +use crate::run_ledger::RunLedgerStore; use chrono::Duration; use serde_json::json; -use tinystoragedrivers_core::{ErrorKind, MemoryStorage, StorageBackend}; +use std::sync::Arc; +use tinystoragedrivers_core::{ErrorKind, MemoryStorage, Scope, StorageBackend}; /// Explicit handles share a backend while retaining separate tenant namespaces. pub(super) fn ledgers() -> (DriverRunLedger, DriverRunLedger) { @@ -21,6 +23,45 @@ pub(super) fn ledgers() -> (DriverRunLedger, DriverRunLedger) { ) } +async fn assert_ledger_conformance_and_scope_isolation(backend: &dyn StorageBackend) { + use crate::testkit::conformance::run_ledger_conformance; + + let scoped = |name: &str| { + Arc::new(DriverRunLedger::new( + backend.for_scope(&Scope::new(name).unwrap()).unwrap(), + )) as Arc + }; + run_ledger_conformance(scoped("session-contract-agent")).await; + assert!( + scoped("session-contract-peer") + .list_agent_runs(&AgentRunListRequest::default()) + .await + .unwrap() + .runs + .is_empty(), + "a separate scope cannot list the conformance agent's runs" + ); +} + +#[tokio::test] +async fn driver_run_ledger_conformance_and_scope_isolation_pass_on_file() { + let dir = tempfile::tempdir().unwrap(); + let backend = tinystoragedrivers_file::FileStorage::open(dir.path()).unwrap(); + assert_ledger_conformance_and_scope_isolation(&backend).await; +} + +/// Run with `TSD_MONGO_URL=... cargo test -p tinyagents-session --all-features +/// mongodb_run_ledger_conformance -- --ignored` against a local replica set. +#[tokio::test(flavor = "multi_thread")] +#[ignore = "requires a local MongoDB replica set; run explicitly with TSD_MONGO_URL"] +async fn mongodb_run_ledger_conformance_and_scope_isolation() { + let (uri, database) = crate::testkit::local_mongo_test_target("run_ledger"); + let backend = tinystoragedrivers_mongodb::MongoStorage::connect(&uri, &database) + .await + .expect("local MongoDB replica set is reachable"); + assert_ledger_conformance_and_scope_isolation(&backend).await; +} + /// A known workflow input whose first SQL revision is zero. fn workflow(id: &str) -> WorkflowRunUpsert { WorkflowRunUpsert { From fa5d02eeadeba7d3c84dcc5dec3692c495a476d0 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 21:57:09 +0300 Subject: [PATCH 03/18] style(tinyagents-session): reorder imports and reflow mongodb test setup Reordered the driver imports so the core crate precedes the file crate, and reformatted the MongoDB-backed conformance test's store construction to fit within the line width. No behaviour changed. Auto-committed-on: dragonfly --- .../tinyagents-session/src/port/drivers/mod_tests.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/tinyagents-session/src/port/drivers/mod_tests.rs b/crates/tinyagents-session/src/port/drivers/mod_tests.rs index d5840b412..ebd8a4e6d 100644 --- a/crates/tinyagents-session/src/port/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/port/drivers/mod_tests.rs @@ -1,8 +1,8 @@ use super::*; use crate::testkit::conformance::{session_store_conformance, session_store_isolation_conformance}; use crate::turn_state::{TurnLifecycle, TurnState}; -use tinystoragedrivers_file::FileStorage; use tinystoragedrivers_core::MemoryStorage; +use tinystoragedrivers_file::FileStorage; use tinystoragedrivers_sqlite::SqliteStorage; fn memory() -> DriverSessionStores { @@ -139,11 +139,9 @@ async fn mongodb_backed_stores_meet_the_contract_and_keep_agents_apart() { let backend = tinystoragedrivers_mongodb::MongoStorage::connect(&uri, &database) .await .expect("local MongoDB replica set is reachable"); - let stores = DriverSessionStores::new( - Arc::new(backend), - tinystoragedrivers_core::Scope::local(), - ) - .unwrap(); + let stores = + DriverSessionStores::new(Arc::new(backend), tinystoragedrivers_core::Scope::local()) + .unwrap(); session_store_conformance(&stores).await; session_store_isolation_conformance(&stores).await; } From 0b4319bf4aef006fed54a9a86c676de1242a6c39 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:00:21 +0300 Subject: [PATCH 04/18] chore: files changed Cargo.lock Auto-committed-on: dragonfly --- Cargo.lock | 911 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 883 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eefb7ef55..4c4c1b5d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,6 +18,19 @@ dependencies = [ "generic-array", ] +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.5" @@ -145,6 +158,29 @@ dependencies = [ "hybrid-array", ] +[[package]] +name = "bson" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969a9ba84b0ff843813e7249eed1678d9b6607ce5a3b8f0a47af3fcf7978e6e" +dependencies = [ + "ahash", + "base64 0.22.1", + "bitvec", + "getrandom 0.2.17", + "getrandom 0.3.4", + "hex", + "indexmap", + "js-sys", + "once_cell", + "rand 0.9.4", + "serde", + "serde_bytes", + "serde_json", + "time", + "uuid", +] + [[package]] name = "bumpalo" version = "3.20.3" @@ -296,12 +332,67 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "cmov" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" + +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "const-oid" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.17", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -335,12 +426,42 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + [[package]] name = "crypto-common" version = "0.1.7" @@ -361,12 +482,83 @@ dependencies = [ "hybrid-array", ] +[[package]] +name = "ctutils" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03bb0e1cc970d482d121d9a1744999169b69a07470b3d644a7894e53fcaf4574" +dependencies = [ + "cmov", +] + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.118", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.118", +] + [[package]] name = "data-encoding" version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" +[[package]] +name = "deranged" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" + +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "derive-where" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e2b94854e8576378ccda7c8de8a66ed8b4e8acbd2c50ec3418ea6c8aaf4b567" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.2", +] + [[package]] name = "derive_arbitrary" version = "1.4.2" @@ -378,6 +570,29 @@ dependencies = [ "syn 2.0.118", ] +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.118", + "unicode-xid", +] + [[package]] name = "digest" version = "0.10.7" @@ -398,6 +613,7 @@ dependencies = [ "block-buffer 0.12.1", "const-oid", "crypto-common 0.2.2", + "ctutils", ] [[package]] @@ -418,7 +634,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -438,6 +654,12 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + [[package]] name = "equivalent" version = "1.0.2" @@ -451,7 +673,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -760,13 +982,83 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hickory-net" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c480823ed7c2c5d0f09c41020cb6b7c28029ce60ec42dc942158dcf22f8e0a4d" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "futures-channel", + "futures-io", + "futures-util", + "hickory-proto", + "idna", + "ipnet", + "jni", + "rand 0.10.3", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-proto" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12b92608f679a6fa515dd1d15c1ff89443026e391200a2c840c7afcba482893d" +dependencies = [ + "data-encoding", + "idna", + "ipnet", + "jni", + "once_cell", + "prefix-trie", + "rand 0.10.3", + "ring", + "thiserror", + "tinyvec", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3da5255c95d5a716857d54b5b8f4e8d67c3484d3beaaaae2ce25063b3ba981" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-net", + "hickory-proto", + "ipconfig", + "ipnet", + "jni", + "moka", + "ndk-context", + "once_cell", + "parking_lot", + "rand 0.10.3", + "resolv-conf", + "smallvec", + "system-configuration", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "hkdf" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ - "hmac", + "hmac 0.12.1", ] [[package]] @@ -778,6 +1070,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "hmac" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" +dependencies = [ + "digest 0.11.3", +] + [[package]] name = "http" version = "1.4.2" @@ -998,6 +1299,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.1.0" @@ -1060,11 +1367,27 @@ version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f0fb0570afe1fed943c5c3d4102d5358592d8625fda6a0007fdbe65a92fba96" +[[package]] +name = "ipconfig" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222" +dependencies = [ + "socket2", + "widestring", + "windows-registry", + "windows-result", + "windows-sys 0.61.2", +] + [[package]] name = "ipnet" version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" +dependencies = [ + "serde", +] [[package]] name = "itoa" @@ -1072,6 +1395,55 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.118", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.118", +] + [[package]] name = "jobserver" version = "0.1.35" @@ -1176,12 +1548,70 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" +[[package]] +name = "macro_magic" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "macro_magic_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "macro_magic_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.118", +] + [[package]] name = "maybe-owned" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" +[[package]] +name = "md-5" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" +dependencies = [ + "cfg-if", + "digest 0.11.3", +] + [[package]] name = "memchr" version = "2.8.2" @@ -1195,35 +1625,140 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "mime_guess" -version = "2.0.5" +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "moka" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4293f18e7567a1caf3c584855554377025c65e0aa445344d04171f5ad63d19b9" +dependencies = [ + "crossbeam-channel", + "crossbeam-epoch", + "crossbeam-utils", + "equivalent", + "parking_lot", + "portable-atomic", + "smallvec", + "tagptr", + "uuid", +] + +[[package]] +name = "mongocrypt" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8426a875ded61430d4a811dbfda7633b6b8af0225c547fc6c28b8b0aa7d79a13" +dependencies = [ + "bson", + "mongocrypt-sys", + "once_cell", + "serde", +] + +[[package]] +name = "mongocrypt-sys" +version = "0.1.6+1.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "851fac73f7fe22f6a3ab87f720ce509cae7c9fd08e7dd27866cc232dee07ccf4" + +[[package]] +name = "mongodb" +version = "3.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af84443ae9878f59a6818686f339064479f42cdf293c4c637d8fc9c0a8c5eed6" +dependencies = [ + "base64 0.22.1", + "bitflags 2.13.0", + "bson", + "derive-where", + "derive_more", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hickory-net", + "hickory-proto", + "hickory-resolver", + "hmac 0.13.0", + "macro_magic", + "md-5", + "mongocrypt", + "mongodb-internal-macros", + "pbkdf2", + "percent-encoding", + "rand 0.9.4", + "rustc_version_runtime", + "rustls", + "serde", + "serde_bytes", + "serde_with", + "sha1 0.11.0", + "sha2 0.11.0", + "socket2", + "stringprep", + "strsim", + "take_mut", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", + "typed-builder", + "uuid", + "webpki-roots 1.0.8", +] + +[[package]] +name = "mongodb-internal-macros" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +checksum = "504024bbb83ab1bf1512007f7288b54d3a6343043f3f619c26a153346773598d" dependencies = [ - "mime", - "unicase", + "macro_magic", + "proc-macro2", + "quote", + "syn 2.0.118", ] [[package]] -name = "miniz_oxide" -version = "0.8.9" +name = "ndk-context" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" -dependencies = [ - "adler2", - "simd-adler32", -] +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] -name = "mio" -version = "1.2.1" +name = "num-conv" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.61.2", -] +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-traits" @@ -1239,6 +1774,10 @@ name = "once_cell" version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +dependencies = [ + "critical-section", + "portable-atomic", +] [[package]] name = "opaque-debug" @@ -1289,6 +1828,15 @@ dependencies = [ "windows-link", ] +[[package]] +name = "pbkdf2" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629" +dependencies = [ + "digest 0.11.3", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -1349,6 +1897,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + [[package]] name = "potential_utf" version = "0.1.5" @@ -1358,6 +1912,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "powerfmt" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" + [[package]] name = "ppv-lite86" version = "0.2.21" @@ -1367,6 +1927,17 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prefix-trie" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cf6e3177f0684016a5c209b00882e15f8bdd3f3bb48f0491df10cd102d0c6e7" +dependencies = [ + "either", + "ipnet", + "num-traits", +] + [[package]] name = "proc-macro2" version = "1.0.106" @@ -1604,6 +2175,12 @@ dependencies = [ "webpki-roots 1.0.8", ] +[[package]] +name = "resolv-conf" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" + [[package]] name = "rgb" version = "0.8.53" @@ -1658,6 +2235,25 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustc_version_runtime" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dd18cd2bae1820af0b6ad5e54f4a51d0f3fcc53b05f845675074efcc7af071d" +dependencies = [ + "rustc_version", + "semver", +] + [[package]] name = "rustix" version = "0.38.44" @@ -1681,7 +2277,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1700,6 +2296,7 @@ version = "0.23.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -1756,6 +2353,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + [[package]] name = "serde" version = "1.0.229" @@ -1766,6 +2369,16 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +dependencies = [ + "serde", + "serde_core", +] + [[package]] name = "serde_core" version = "1.0.229" @@ -1792,6 +2405,7 @@ version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ + "indexmap", "itoa", "memchr", "serde", @@ -1820,6 +2434,28 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee78f1fbe43ac4a0e47aadb3dbd357b69eb0d3793e948624cd03dd2750ab1c0a" +dependencies = [ + "serde_core", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "3.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8705578779c2b6bd90d84d66eb2e206b708b1a4d7b9f17641b293545bf1c7e46" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "sha1" version = "0.10.7" @@ -1831,6 +2467,17 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha1" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + [[package]] name = "sha2" version = "0.10.9" @@ -1875,6 +2522,22 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "siphasher" version = "1.0.3" @@ -1900,7 +2563,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -1921,6 +2584,23 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "subtle" version = "2.6.1" @@ -1969,6 +2649,39 @@ dependencies = [ "syn 2.0.118", ] +[[package]] +name = "system-configuration" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" +dependencies = [ + "bitflags 2.13.0", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tagptr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" + +[[package]] +name = "take_mut" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" + [[package]] name = "tap" version = "1.0.1" @@ -1995,7 +2708,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix 1.1.4", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -2018,6 +2731,45 @@ dependencies = [ "syn 3.0.2", ] +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinyagents-definition" version = "2.2.0" @@ -2240,6 +2992,8 @@ dependencies = [ "tinyagents-session", "tinyagents-tasks", "tinystoragedrivers-core", + "tinystoragedrivers-file", + "tinystoragedrivers-mongodb", "tinystoragedrivers-sqlite", "tinytools-agent", "tokio", @@ -2392,6 +3146,34 @@ dependencies = [ "zstd", ] +[[package]] +name = "tinystoragedrivers-file" +version = "1.0.0" +source = "git+https://github.com/tinyhumansai/tinystoragedrivers?tag=v1.0.0#141fd9ed0ad5d14a8fb5a1b3e837a719e81ac08d" +dependencies = [ + "async-trait", + "libc", + "serde", + "serde_json", + "tinystoragedrivers-core", + "tokio", +] + +[[package]] +name = "tinystoragedrivers-mongodb" +version = "1.0.0" +source = "git+https://github.com/tinyhumansai/tinystoragedrivers?tag=v1.0.0#141fd9ed0ad5d14a8fb5a1b3e837a719e81ac08d" +dependencies = [ + "async-trait", + "futures-util", + "mongodb", + "serde", + "serde_json", + "sha2 0.10.9", + "tinystoragedrivers-core", + "tokio", +] + [[package]] name = "tinystoragedrivers-secrets" version = "1.0.0" @@ -2559,7 +3341,9 @@ checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", + "futures-util", "pin-project-lite", "tokio", ] @@ -2701,10 +3485,30 @@ dependencies = [ "rand 0.9.4", "rustls", "rustls-pki-types", - "sha1", + "sha1 0.10.7", "thiserror", ] +[[package]] +name = "typed-builder" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "398a3a3c918c96de527dc11e6e846cd549d4508030b8a33e1da12789c856b81a" +dependencies = [ + "typed-builder-macro", +] + +[[package]] +name = "typed-builder-macro" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e48cea23f68d1f78eb7bc092881b6bb88d3d6b5b7e6234f6f9c911da1ffb221" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "typenum" version = "1.20.1" @@ -2727,12 +3531,45 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + [[package]] name = "unicode-ident" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-normalization" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75cd3fb03d5288b3ba9a1ee103ac7e9cbb59f0b03d64f8ddfcc04dd42758a85d" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "universal-hash" version = "0.5.1" @@ -2775,6 +3612,7 @@ checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" dependencies = [ "getrandom 0.4.3", "js-sys", + "serde_core", "wasm-bindgen", ] @@ -2939,6 +3777,12 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + [[package]] name = "winapi" version = "0.3.9" @@ -2961,7 +3805,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3021,6 +3865,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "windows-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +dependencies = [ + "windows-link", + "windows-result", + "windows-strings", +] + [[package]] name = "windows-result" version = "0.4.1" From c55502afd7d25832efbf88784904e8487bbd11e7 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:01:37 +0300 Subject: [PATCH 05/18] test(session): remove file backend ledger conformance test The file storage driver no longer needs its own conformance test since the shared helper already covers ledger conformance and scope isolation for all backends. Auto-committed-on: dragonfly --- .../tinyagents-session/src/run_ledger/drivers/mod_tests.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index 5c1596e92..05a33b4b8 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -43,13 +43,6 @@ async fn assert_ledger_conformance_and_scope_isolation(backend: &dyn StorageBack ); } -#[tokio::test] -async fn driver_run_ledger_conformance_and_scope_isolation_pass_on_file() { - let dir = tempfile::tempdir().unwrap(); - let backend = tinystoragedrivers_file::FileStorage::open(dir.path()).unwrap(); - assert_ledger_conformance_and_scope_isolation(&backend).await; -} - /// Run with `TSD_MONGO_URL=... cargo test -p tinyagents-session --all-features /// mongodb_run_ledger_conformance -- --ignored` against a local replica set. #[tokio::test(flavor = "multi_thread")] From 15d047d755b7919030c80337958eeed39a3991f7 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:05:38 +0300 Subject: [PATCH 06/18] test(run_ledger): cover file driver workflow run round trip and scope isolation Auto-committed-on: dragonfly --- .../src/run_ledger/drivers/mod_tests.rs | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index 05a33b4b8..203b2e65e 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -43,6 +43,40 @@ async fn assert_ledger_conformance_and_scope_isolation(backend: &dyn StorageBack ); } +#[tokio::test] +async fn file_workflow_records_round_trip_and_stay_in_their_scope() { + let dir = tempfile::tempdir().unwrap(); + let backend = tinystoragedrivers_file::FileStorage::open(dir.path()).unwrap(); + let a = DriverRunLedger::new( + backend + .for_scope(&Scope::new("profile-a").unwrap()) + .unwrap(), + ); + let b = DriverRunLedger::new( + backend + .for_scope(&Scope::new("profile-b").unwrap()) + .unwrap(), + ); + + let written = a.upsert_workflow_run(workflow("workflow")).await.unwrap(); + assert_eq!(a.get_workflow_run("workflow").await.unwrap(), Some(written)); + assert!(b.get_workflow_run("workflow").await.unwrap().is_none()); + assert_eq!( + a.list_workflow_runs(&WorkflowRunListRequest::default()) + .await + .unwrap() + .count, + 1 + ); + assert_eq!( + b.list_workflow_runs(&WorkflowRunListRequest::default()) + .await + .unwrap() + .count, + 0 + ); +} + /// Run with `TSD_MONGO_URL=... cargo test -p tinyagents-session --all-features /// mongodb_run_ledger_conformance -- --ignored` against a local replica set. #[tokio::test(flavor = "multi_thread")] From 5d7d8972c4e320b0c7f53314c58caeae22956238 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:14:24 +0300 Subject: [PATCH 07/18] test(run_ledger): cover file driver lease races and unsupported atomic ops Adds tests exercising the FileStorage workflow lease path, including concurrent claimers, renewal by a non-owner, and revision-fenced compare-and-swap. Also verifies that unsupported validated-batch agent operations fail without leaving partial writes in agent or event rows. Auto-committed-on: dragonfly --- .../src/run_ledger/drivers/mod_tests.rs | 181 ++++++++++++++++++ 1 file changed, 181 insertions(+) diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index 203b2e65e..01e8933bd 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -77,6 +77,187 @@ async fn file_workflow_records_round_trip_and_stay_in_their_scope() { ); } +/// FileStorage supports atomic lease primitives even though its document store +/// cannot execute validated multi-document batches. Exercise the complete +/// workflow lease path, including a race and a revision-fenced transition. +#[tokio::test] +async fn file_workflow_lease_race_and_revision_fencing() { + use crate::run_ledger::WorkflowLeaseClaim; + + let dir = tempfile::tempdir().unwrap(); + let backend = tinystoragedrivers_file::FileStorage::open(dir.path()).unwrap(); + let ledger = Arc::new(DriverRunLedger::new( + backend + .for_scope(&Scope::new("profile-a").unwrap()) + .unwrap(), + )); + let created = ledger + .upsert_workflow_run(workflow("leased")) + .await + .unwrap(); + + let mut claimers = tokio::task::JoinSet::new(); + for owner in ["first", "second", "third"] { + let ledger = ledger.clone(); + claimers.spawn(async move { + ledger + .try_claim_workflow_run("leased", owner, Duration::minutes(1)) + .await + .unwrap() + }); + } + let mut acquired = Vec::new(); + while let Some(result) = claimers.join_next().await { + if let WorkflowLeaseClaim::Acquired(run) = result.unwrap() { + acquired.push(run); + } + } + assert_eq!(acquired.len(), 1, "one live workflow lease owner wins"); + let owner = acquired[0].lease_owner.as_deref().unwrap(); + assert!( + ledger + .renew_workflow_run_lease("leased", owner, Duration::minutes(1)) + .await + .unwrap() + ); + + let current = ledger.get_workflow_run("leased").await.unwrap().unwrap(); + let mut transition = workflow("leased"); + transition.summary = Some("committed by lease owner".into()); + let committed = ledger + .compare_and_swap_workflow_run( + transition.clone(), + current.revision, + owner, + Duration::minutes(1), + ) + .await + .unwrap() + .unwrap(); + assert_eq!( + committed.summary.as_deref(), + Some("committed by lease owner") + ); + assert!( + ledger + .compare_and_swap_workflow_run( + transition, + current.revision, + owner, + Duration::minutes(1) + ) + .await + .unwrap() + .is_none(), + "a stale revision cannot overwrite the committed workflow" + ); + + let not_owner = if owner == "first" { "second" } else { "first" }; + assert!( + !ledger + .renew_workflow_run_lease("leased", not_owner, Duration::minutes(1)) + .await + .unwrap() + ); + assert_eq!(created.id, committed.id); +} + +/// Unsupported validated-batch operations must fail before changing any rows. +/// This pins FileStorage's capability boundary while still exercising the +/// single-record telemetry path that agents depend on. +#[tokio::test] +async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { + use crate::run_ledger::{AgentRunListRequest, RunEventAppend, RunEventListRequest}; + use tinystoragedrivers_core::Capability; + + let dir = tempfile::tempdir().unwrap(); + let backend = tinystoragedrivers_file::FileStorage::open(dir.path()).unwrap(); + let ledger = DriverRunLedger::new( + backend + .for_scope(&Scope::new("profile-a").unwrap()) + .unwrap(), + ); + let telemetry = ledger + .upsert_run_telemetry(RunTelemetryUpsert { + run_id: "atomic-agent".into(), + input_tokens: Some(17), + ..Default::default() + }) + .await + .unwrap(); + assert_eq!(telemetry.input_tokens, 17); + + let error = ledger + .upsert_agent_run(crate::run_ledger::AgentRunUpsert { + id: "atomic-agent".into(), + kind: crate::run_ledger::AgentRunKind::Subagent, + parent_run_id: None, + parent_thread_id: None, + agent_id: None, + status: crate::run_ledger::AgentRunStatus::Running, + prompt_ref: None, + worker_thread_id: None, + checkpoint_path: None, + checkpoint: None, + summary: None, + error: None, + metadata: json!({}), + started_at: None, + completed_at: None, + }) + .await + .unwrap_err(); + assert!( + matches!(error, LedgerError::Driver(ref native) if native.kind() == ErrorKind::Unsupported(Capability::ValidatedBatch)) + ); + assert!( + ledger + .list_agent_runs(&AgentRunListRequest::default()) + .await + .unwrap() + .runs + .is_empty(), + "failed atomic agent upsert leaves no agent row" + ); + assert_eq!( + ledger + .upsert_run_telemetry(RunTelemetryUpsert { + run_id: "atomic-agent".into(), + ..Default::default() + }) + .await + .unwrap() + .input_tokens, + 17, + "failed agent upsert does not alter telemetry" + ); + + let error = ledger + .append_run_event(RunEventAppend { + run_id: "atomic-agent".into(), + event_type: "created".into(), + payload: json!({}), + }) + .await + .unwrap_err(); + assert!( + matches!(error, LedgerError::Driver(ref native) if native.kind() == ErrorKind::Unsupported(Capability::ValidatedBatch)) + ); + assert!( + ledger + .list_recent_run_events(&RunEventListRequest { + run_id: "atomic-agent".into(), + after_sequence: None, + limit: None, + }) + .await + .unwrap() + .events + .is_empty(), + "failed event append leaves no event row" + ); +} + /// Run with `TSD_MONGO_URL=... cargo test -p tinyagents-session --all-features /// mongodb_run_ledger_conformance -- --ignored` against a local replica set. #[tokio::test(flavor = "multi_thread")] From cf71139d117918dd07132b15cf86bd6371e1d9e1 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:15:22 +0300 Subject: [PATCH 08/18] test(run_ledger): cover atomic team task claim rejection Extend the file ledger test to verify that a claim on an agent team task fails with an unsupported validated batch error when the driver cannot perform atomic writes. The task is asserted to remain in the todo state and unclaimed after the failed operation. Auto-committed-on: dragonfly --- .../src/run_ledger/drivers/mod_tests.rs | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index 01e8933bd..ad2bc8c33 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -256,6 +256,39 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { .is_empty(), "failed event append leaves no event row" ); + + ledger + .upsert_agent_team_task(crate::run_ledger::AgentTeamTaskUpsert { + id: "atomic-task".into(), + team_id: "atomic-team".into(), + title: "must remain unclaimed".into(), + objective: None, + status: crate::run_ledger::AgentTeamTaskStatus::Todo, + owner_member_id: None, + depends_on: vec![], + gate_status: None, + gate_reason: None, + evidence: vec![], + source_run_id: None, + order_index: 0, + created_at: None, + }) + .await + .unwrap(); + let error = ledger + .claim_agent_team_task("atomic-team", "atomic-task", "member", "token") + .await + .unwrap_err(); + assert!( + matches!(error, LedgerError::Driver(ref native) if native.kind() == ErrorKind::Unsupported(Capability::ValidatedBatch)) + ); + let tasks = ledger.list_agent_team_tasks("atomic-team").await.unwrap(); + assert_eq!(tasks.len(), 1); + assert_eq!(tasks[0].status, crate::run_ledger::AgentTeamTaskStatus::Todo); + assert!( + tasks[0].claimed_by_member_id.is_none(), + "failed atomic claim leaves task unclaimed" + ); } /// Run with `TSD_MONGO_URL=... cargo test -p tinyagents-session --all-features From 0555ac101f851f2ec4e4510a9a8fca61b842fb08 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:16:38 +0300 Subject: [PATCH 09/18] docs(session): document FileStorage conformance coverage Explain that FileStorage is tested against the operations its capability set supports, namely workflow CRUD and leases, and that atomic agent, event, and task operations are verified to return Unsupported(ValidatedBatch) without partial writes because its document driver lacks the required multi-document transaction boundary. Auto-committed-on: dragonfly --- .../tinyagents-session/src/run_ledger/drivers/mod_tests.rs | 5 ++++- crates/tinyagents-session/src/testkit/conformance.rs | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index ad2bc8c33..a8d623939 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -284,7 +284,10 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { ); let tasks = ledger.list_agent_team_tasks("atomic-team").await.unwrap(); assert_eq!(tasks.len(), 1); - assert_eq!(tasks[0].status, crate::run_ledger::AgentTeamTaskStatus::Todo); + assert_eq!( + tasks[0].status, + crate::run_ledger::AgentTeamTaskStatus::Todo + ); assert!( tasks[0].claimed_by_member_id.is_none(), "failed atomic claim leaves task unclaimed" diff --git a/crates/tinyagents-session/src/testkit/conformance.rs b/crates/tinyagents-session/src/testkit/conformance.rs index f99ca6b65..a3d47b069 100644 --- a/crates/tinyagents-session/src/testkit/conformance.rs +++ b/crates/tinyagents-session/src/testkit/conformance.rs @@ -7,7 +7,12 @@ //! re-import of the same run id, event append + ordered listing, and the //! concurrent lease-claim and team-task-claim races). Every backend a host //! opens goes through the one driver implementation, so this suite is run -//! here against the memory and SQLite drivers. +//! here against the memory and SQLite drivers. FileStorage is tested against +//! the operations its capability set supports (workflow CRUD and leases), +//! and separately verifies that atomic agent/event/task operations return +//! `Unsupported(ValidatedBatch)` without partial writes; its document driver +//! does not provide the multi-document transaction boundary those operations +//! require. //! * [`transcript_history_conformance`] exercises //! [`crate::transcript::TranscriptHistory`]/[`crate::transcript::TranscriptRead`], //! which — unlike the ledger — genuinely has two independent From 29c7ec21c7e5734263a9ad48f57a03d5a8f9684b Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:23:30 +0300 Subject: [PATCH 10/18] test(run-ledger): assert raw storage snapshots in driver tests The driver tests now compare full collection snapshots before and after failed atomic operations instead of checking only the public list views, so partial writes to any record are caught. The lease race test also synchronises claimants on a barrier and asserts that losing live claimants report Busy with the winning owner. Auto-committed-on: dragonfly --- .../src/run_ledger/drivers/mod_tests.rs | 105 ++++++++++-------- 1 file changed, 60 insertions(+), 45 deletions(-) diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index a8d623939..306cd1ffb 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -4,7 +4,23 @@ use crate::run_ledger::RunLedgerStore; use chrono::Duration; use serde_json::json; use std::sync::Arc; -use tinystoragedrivers_core::{ErrorKind, MemoryStorage, Scope, StorageBackend}; +use tinystoragedrivers_core::{ + DocumentStoreExt, ErrorKind, MemoryStorage, Query, Scope, ScopedStorage, StorageBackend, + Versioned, +}; + +async fn collection_snapshot( + storage: &ScopedStorage, + collection: &str, +) -> Vec> { + let mut rows = storage + .documents() + .query_all(collection, &Query::default()) + .await + .unwrap(); + rows.sort_by(|left, right| left.id.cmp(&right.id)); + rows +} /// Explicit handles share a backend while retaining separate tenant namespaces. pub(super) fn ledgers() -> (DriverRunLedger, DriverRunLedger) { @@ -96,10 +112,13 @@ async fn file_workflow_lease_race_and_revision_fencing() { .await .unwrap(); + let start = Arc::new(tokio::sync::Barrier::new(3)); let mut claimers = tokio::task::JoinSet::new(); for owner in ["first", "second", "third"] { let ledger = ledger.clone(); + let start = start.clone(); claimers.spawn(async move { + start.wait().await; ledger .try_claim_workflow_run("leased", owner, Duration::minutes(1)) .await @@ -107,13 +126,20 @@ async fn file_workflow_lease_race_and_revision_fencing() { }); } let mut acquired = Vec::new(); + let mut busy = Vec::new(); while let Some(result) = claimers.join_next().await { - if let WorkflowLeaseClaim::Acquired(run) = result.unwrap() { - acquired.push(run); + match result.unwrap() { + WorkflowLeaseClaim::Acquired(run) => acquired.push(run), + WorkflowLeaseClaim::Busy(run) => busy.push(run), + WorkflowLeaseClaim::Missing => panic!("the seeded workflow remains present"), } } assert_eq!(acquired.len(), 1, "one live workflow lease owner wins"); + assert_eq!(busy.len(), 2, "every losing live claimant reports Busy"); let owner = acquired[0].lease_owner.as_deref().unwrap(); + assert!(busy + .iter() + .all(|run| run.lease_owner.as_deref() == Some(owner))); assert!( ledger .renew_workflow_run_lease("leased", owner, Duration::minutes(1)) @@ -172,11 +198,8 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { let dir = tempfile::tempdir().unwrap(); let backend = tinystoragedrivers_file::FileStorage::open(dir.path()).unwrap(); - let ledger = DriverRunLedger::new( - backend - .for_scope(&Scope::new("profile-a").unwrap()) - .unwrap(), - ); + let storage = backend.for_scope(&Scope::new("profile-a").unwrap()).unwrap(); + let ledger = DriverRunLedger::new(storage.clone()); let telemetry = ledger .upsert_run_telemetry(RunTelemetryUpsert { run_id: "atomic-agent".into(), @@ -187,6 +210,8 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { .unwrap(); assert_eq!(telemetry.input_tokens, 17); + let agents_before = collection_snapshot(&storage, "ledger.agent_runs").await; + let telemetry_before = collection_snapshot(&storage, "ledger.telemetry").await; let error = ledger .upsert_agent_run(crate::run_ledger::AgentRunUpsert { id: "atomic-agent".into(), @@ -210,28 +235,19 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { assert!( matches!(error, LedgerError::Driver(ref native) if native.kind() == ErrorKind::Unsupported(Capability::ValidatedBatch)) ); - assert!( - ledger - .list_agent_runs(&AgentRunListRequest::default()) - .await - .unwrap() - .runs - .is_empty(), - "failed atomic agent upsert leaves no agent row" + assert_eq!( + collection_snapshot(&storage, "ledger.agent_runs").await, + agents_before, + "failed atomic agent upsert leaves every agent record unchanged" ); assert_eq!( - ledger - .upsert_run_telemetry(RunTelemetryUpsert { - run_id: "atomic-agent".into(), - ..Default::default() - }) - .await - .unwrap() - .input_tokens, - 17, - "failed agent upsert does not alter telemetry" + collection_snapshot(&storage, "ledger.telemetry").await, + telemetry_before, + "failed atomic agent upsert leaves every telemetry record unchanged" ); + let event_heads_before = collection_snapshot(&storage, "ledger.event_heads").await; + let events_before = collection_snapshot(&storage, "ledger.event_outbox").await; let error = ledger .append_run_event(RunEventAppend { run_id: "atomic-agent".into(), @@ -243,20 +259,19 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { assert!( matches!(error, LedgerError::Driver(ref native) if native.kind() == ErrorKind::Unsupported(Capability::ValidatedBatch)) ); - assert!( - ledger - .list_recent_run_events(&RunEventListRequest { - run_id: "atomic-agent".into(), - after_sequence: None, - limit: None, - }) - .await - .unwrap() - .events - .is_empty(), - "failed event append leaves no event row" + assert_eq!( + collection_snapshot(&storage, "ledger.event_heads").await, + event_heads_before, + "failed event append leaves every event head unchanged" + ); + assert_eq!( + collection_snapshot(&storage, "ledger.event_outbox").await, + events_before, + "failed event append leaves every event record unchanged" ); + let tasks_before = collection_snapshot(&storage, "ledger.tasks").await; + let members_before = collection_snapshot(&storage, "ledger.members").await; ledger .upsert_agent_team_task(crate::run_ledger::AgentTeamTaskUpsert { id: "atomic-task".into(), @@ -282,15 +297,15 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { assert!( matches!(error, LedgerError::Driver(ref native) if native.kind() == ErrorKind::Unsupported(Capability::ValidatedBatch)) ); - let tasks = ledger.list_agent_team_tasks("atomic-team").await.unwrap(); - assert_eq!(tasks.len(), 1); assert_eq!( - tasks[0].status, - crate::run_ledger::AgentTeamTaskStatus::Todo + collection_snapshot(&storage, "ledger.tasks").await, + tasks_before, + "failed atomic claim leaves every task record unchanged" ); - assert!( - tasks[0].claimed_by_member_id.is_none(), - "failed atomic claim leaves task unclaimed" + assert_eq!( + collection_snapshot(&storage, "ledger.members").await, + members_before, + "failed atomic claim leaves every member record unchanged" ); } From 768ea7f38e7f90dc1087bf2a11e3e4f4f288b2b0 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:23:53 +0300 Subject: [PATCH 11/18] test(run-ledger): capture team snapshots after seeding The file ledger test now snapshots the tasks and members collections after the seed upserts instead of before them, so the comparison reflects only the partial-write behaviour under test. The unused request imports were dropped. Auto-committed-on: dragonfly --- .../tinyagents-session/src/run_ledger/drivers/mod_tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index 306cd1ffb..5fd448aa2 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -193,7 +193,7 @@ async fn file_workflow_lease_race_and_revision_fencing() { /// single-record telemetry path that agents depend on. #[tokio::test] async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { - use crate::run_ledger::{AgentRunListRequest, RunEventAppend, RunEventListRequest}; + use crate::run_ledger::RunEventAppend; use tinystoragedrivers_core::Capability; let dir = tempfile::tempdir().unwrap(); @@ -270,8 +270,6 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { "failed event append leaves every event record unchanged" ); - let tasks_before = collection_snapshot(&storage, "ledger.tasks").await; - let members_before = collection_snapshot(&storage, "ledger.members").await; ledger .upsert_agent_team_task(crate::run_ledger::AgentTeamTaskUpsert { id: "atomic-task".into(), @@ -290,6 +288,8 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { }) .await .unwrap(); + let tasks_before = collection_snapshot(&storage, "ledger.tasks").await; + let members_before = collection_snapshot(&storage, "ledger.members").await; let error = ledger .claim_agent_team_task("atomic-team", "atomic-task", "member", "token") .await From b504700593b3d9ed2541b24eb866fe8d56727d3d Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:24:37 +0300 Subject: [PATCH 12/18] style: format run ledger driver tests Auto-committed-on: dragonfly --- .../src/run_ledger/drivers/mod_tests.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index 5fd448aa2..59ed8b39a 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -137,9 +137,10 @@ async fn file_workflow_lease_race_and_revision_fencing() { assert_eq!(acquired.len(), 1, "one live workflow lease owner wins"); assert_eq!(busy.len(), 2, "every losing live claimant reports Busy"); let owner = acquired[0].lease_owner.as_deref().unwrap(); - assert!(busy - .iter() - .all(|run| run.lease_owner.as_deref() == Some(owner))); + assert!( + busy.iter() + .all(|run| run.lease_owner.as_deref() == Some(owner)) + ); assert!( ledger .renew_workflow_run_lease("leased", owner, Duration::minutes(1)) @@ -198,7 +199,9 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { let dir = tempfile::tempdir().unwrap(); let backend = tinystoragedrivers_file::FileStorage::open(dir.path()).unwrap(); - let storage = backend.for_scope(&Scope::new("profile-a").unwrap()).unwrap(); + let storage = backend + .for_scope(&Scope::new("profile-a").unwrap()) + .unwrap(); let ledger = DriverRunLedger::new(storage.clone()); let telemetry = ledger .upsert_run_telemetry(RunTelemetryUpsert { From cd0ca3f74cd4afd93463789be2140ac76a510cfd Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:30:09 +0300 Subject: [PATCH 13/18] refactor(session): move MongoDB conformance tests to integration-proofs The MongoDB driver conformance tests were removed from the tinyagents-session crate and relocated to the integration-proofs workspace, so the crate no longer depends on tinystoragedrivers-mongodb. The CI workflow now runs the conformance suite from its new location and watches the integration-proofs path for changes. Auto-committed-on: dragonfly --- .github/workflows/session-mongodb.yml | 4 +- Cargo.toml | 1 - crates/tinyagents-session/Cargo.toml | 1 - .../src/port/drivers/mod_tests.rs | 16 ---- .../src/run_ledger/drivers/mod_tests.rs | 12 --- crates/tinyagents-session/src/testkit/mod.rs | 35 -------- .../tests/session_driver_conformance.rs | 79 +++++++++++++++++++ 7 files changed, 82 insertions(+), 66 deletions(-) create mode 100644 integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs diff --git a/.github/workflows/session-mongodb.yml b/.github/workflows/session-mongodb.yml index d1720a0dc..b91b33e28 100644 --- a/.github/workflows/session-mongodb.yml +++ b/.github/workflows/session-mongodb.yml @@ -6,6 +6,7 @@ on: - "Cargo.toml" - "Cargo.lock" - "crates/tinyagents-session/**" + - "integration-proofs/run-ledger-mongodb/**" - ".github/scripts/start-session-mongo-replset.sh" - ".github/workflows/session-mongodb.yml" push: @@ -14,6 +15,7 @@ on: - "Cargo.toml" - "Cargo.lock" - "crates/tinyagents-session/**" + - "integration-proofs/run-ledger-mongodb/**" - ".github/scripts/start-session-mongo-replset.sh" - ".github/workflows/session-mongodb.yml" schedule: @@ -53,4 +55,4 @@ jobs: run: .github/scripts/start-session-mongo-replset.sh 27017 - name: Run MongoDB driver conformance - run: cargo test -p tinyagents-session --all-features mongodb_ -- --ignored + run: cargo test --manifest-path integration-proofs/run-ledger-mongodb/Cargo.toml --features mongodb-storage-tests --test session_driver_conformance -- --ignored diff --git a/Cargo.toml b/Cargo.toml index 71b00a10c..260fd78cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,6 @@ tracing = "0.1" # host's graph holds one set of port types with no [patch] to reconcile them. tinystoragedrivers-core = { version = "1.0.0", git = "https://github.com/tinyhumansai/tinystoragedrivers", tag = "v1.0.0" } tinystoragedrivers-file = { version = "1.0.0", git = "https://github.com/tinyhumansai/tinystoragedrivers", tag = "v1.0.0" } -tinystoragedrivers-mongodb = { version = "1.0.0", git = "https://github.com/tinyhumansai/tinystoragedrivers", tag = "v1.0.0" } tinystoragedrivers-sqlite = { version = "1.0.0", git = "https://github.com/tinyhumansai/tinystoragedrivers", tag = "v1.0.0" } uuid = { version = "1", features = ["v4"] } diff --git a/crates/tinyagents-session/Cargo.toml b/crates/tinyagents-session/Cargo.toml index 9470fdda5..fca8f668d 100644 --- a/crates/tinyagents-session/Cargo.toml +++ b/crates/tinyagents-session/Cargo.toml @@ -57,7 +57,6 @@ storage-drivers = [] tinyagents-session = { path = ".", features = ["legacy-import"] } tinystoragedrivers-sqlite = { workspace = true } tinystoragedrivers-file = { workspace = true } -tinystoragedrivers-mongodb = { workspace = true } tokio = { workspace = true, default-features = true, features = ["macros", "rt-multi-thread"] } [lints] diff --git a/crates/tinyagents-session/src/port/drivers/mod_tests.rs b/crates/tinyagents-session/src/port/drivers/mod_tests.rs index ebd8a4e6d..e20bdd178 100644 --- a/crates/tinyagents-session/src/port/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/port/drivers/mod_tests.rs @@ -130,22 +130,6 @@ async fn file_backed_stores_meet_the_contract_and_keep_agents_apart() { session_store_isolation_conformance(&stores).await; } -/// Run with `TSD_MONGO_URL=... cargo test -p tinyagents-session --all-features -/// mongodb_backed_stores -- --ignored` against a local replica set. -#[tokio::test(flavor = "multi_thread")] -#[ignore = "requires a local MongoDB replica set; run explicitly with TSD_MONGO_URL"] -async fn mongodb_backed_stores_meet_the_contract_and_keep_agents_apart() { - let (uri, database) = crate::testkit::local_mongo_test_target("session_store"); - let backend = tinystoragedrivers_mongodb::MongoStorage::connect(&uri, &database) - .await - .expect("local MongoDB replica set is reachable"); - let stores = - DriverSessionStores::new(Arc::new(backend), tinystoragedrivers_core::Scope::local()) - .unwrap(); - session_store_conformance(&stores).await; - session_store_isolation_conformance(&stores).await; -} - #[tokio::test(flavor = "multi_thread")] async fn stores_work_from_a_multi_threaded_runtime() { session_store_conformance(&memory()).await; diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index 59ed8b39a..e75b67605 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -312,18 +312,6 @@ async fn file_ledger_rejects_atomic_agent_operations_without_partial_writes() { ); } -/// Run with `TSD_MONGO_URL=... cargo test -p tinyagents-session --all-features -/// mongodb_run_ledger_conformance -- --ignored` against a local replica set. -#[tokio::test(flavor = "multi_thread")] -#[ignore = "requires a local MongoDB replica set; run explicitly with TSD_MONGO_URL"] -async fn mongodb_run_ledger_conformance_and_scope_isolation() { - let (uri, database) = crate::testkit::local_mongo_test_target("run_ledger"); - let backend = tinystoragedrivers_mongodb::MongoStorage::connect(&uri, &database) - .await - .expect("local MongoDB replica set is reachable"); - assert_ledger_conformance_and_scope_isolation(&backend).await; -} - /// A known workflow input whose first SQL revision is zero. fn workflow(id: &str) -> WorkflowRunUpsert { WorkflowRunUpsert { diff --git a/crates/tinyagents-session/src/testkit/mod.rs b/crates/tinyagents-session/src/testkit/mod.rs index 32126d21b..dd7629b13 100644 --- a/crates/tinyagents-session/src/testkit/mod.rs +++ b/crates/tinyagents-session/src/testkit/mod.rs @@ -37,41 +37,6 @@ pub mod conformance; mod in_memory_transcript; pub use in_memory_transcript::InMemoryTranscriptHistory; -/// Returns a local MongoDB URI and a unique database name for an explicitly -/// enabled driver conformance test. -#[cfg(test)] -pub(crate) fn local_mongo_test_target(label: &str) -> (String, String) { - let uri = std::env::var("TSD_MONGO_URL") - .expect("set TSD_MONGO_URL to run this ignored MongoDB conformance test"); - let rest = uri.split_once("://").map_or(uri.as_str(), |(_, rest)| rest); - let authority = rest.split(['/', '?']).next().unwrap_or_default(); - let hosts = authority.rsplit_once('@').map_or(authority, |(_, h)| h); - let is_loopback = !hosts.is_empty() - && !uri.starts_with("mongodb+srv://") - && hosts.split(',').all(|host| { - let name = if let Some(v6) = host.strip_prefix('[') { - v6.split(']').next().unwrap_or_default() - } else { - host.rsplit_once(':').map_or(host, |(name, _)| name) - }; - matches!(name, "localhost" | "127.0.0.1" | "::1") - }); - assert!( - is_loopback, - "TSD_MONGO_URL must name a local MongoDB server for conformance tests" - ); - - let nanos = std::time::SystemTime::now() - .duration_since(std::time::UNIX_EPOCH) - .map_or(0, |duration| duration.as_nanos()); - let database = format!( - "tinyagents_session_{label}_{}_{}", - std::process::id(), - nanos - ); - (uri, database) -} - /// Creates an empty driver-backed transcript locator over in-memory storage. /// /// Use this when a test needs the same locator interface used by production diff --git a/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs b/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs new file mode 100644 index 000000000..c4329385e --- /dev/null +++ b/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs @@ -0,0 +1,79 @@ +//! Opt-in full session-store and run-ledger conformance against a real local +//! MongoDB replica set. This excluded workspace keeps BSON's serde_json feature +//! unification out of the ordinary TinyAgents workspace graph. +#![cfg(feature = "mongodb-storage-tests")] + +use std::sync::Arc; + +use tinyagents_session::{ + port::{DriverSessionStores, SessionStoreProvider}, + run_ledger::{AgentRunListRequest, DriverRunLedger, RunLedgerStore}, + testkit::conformance::{ + run_ledger_conformance, session_store_conformance, session_store_isolation_conformance, + }, +}; +use tinystoragedrivers_core::{Scope, StorageBackend}; +use tinystoragedrivers_mongodb::MongoStorage; + +/// Require an explicit, credential-free loopback URL for the local fixture. +fn local_mongo_url() -> String { + let value = std::env::var("TSD_MONGO_URL") + .expect("set TSD_MONGO_URL to run ignored MongoDB conformance tests"); + let url = reqwest::Url::parse(&value).expect("TSD_MONGO_URL must be a valid URI"); + assert_eq!(url.scheme(), "mongodb", "MongoDB SRV URLs are not accepted"); + assert!( + matches!(url.host_str(), Some("localhost" | "127.0.0.1" | "::1")) + && url.port().is_some(), + "TSD_MONGO_URL must point to a local MongoDB server with an explicit port" + ); + assert!( + url.username().is_empty() && url.password().is_none(), + "credentials are not accepted for local conformance tests" + ); + value +} + +async fn local_backend(label: &str) -> MongoStorage { + let url = local_mongo_url(); + let database = format!("tinyagents_session_{label}_{}", uuid::Uuid::new_v4()); + let backend = MongoStorage::connect(&url, &database) + .await + .expect("local MongoDB replica set is reachable"); + backend + .prepare_schema() + .await + .expect("the isolated test database schema prepares"); + backend +} + +#[tokio::test(flavor = "multi_thread")] +#[ignore = "requires local MongoDB; run explicitly with TSD_MONGO_URL and --ignored"] +async fn mongodb_session_store_round_trip_list_delete_and_agent_isolation() { + let backend: Arc = Arc::new(local_backend("session_store").await); + let stores = DriverSessionStores::new( + backend, + Scope::tenant("session_store_conformance").unwrap(), + ) + .unwrap(); + session_store_conformance(&stores).await; + session_store_isolation_conformance(&stores).await; +} + +#[tokio::test(flavor = "multi_thread")] +#[ignore = "requires local MongoDB; run explicitly with TSD_MONGO_URL and --ignored"] +async fn mongodb_run_ledger_contract_and_scope_isolation() { + let backend = local_backend("run_ledger").await; + let scoped = |scope: &str| { + Arc::new(DriverRunLedger::new( + backend.for_scope(&Scope::tenant(scope).unwrap()).unwrap(), + )) as Arc + }; + let ledger = scoped("run_ledger_conformance"); + run_ledger_conformance(ledger.clone()).await; + assert!(scoped("run_ledger_peer") + .list_agent_runs(&AgentRunListRequest::default()) + .await + .unwrap() + .runs + .is_empty()); +} From d0d87f2b91ab7b1858eae5a1e5f3263181069365 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:30:29 +0300 Subject: [PATCH 14/18] chore: files changed Cargo.lock,crates/tinyagents-session/src/testkit/conformance.rs,integration-pro Auto-committed-on: dragonfly --- Cargo.lock | 847 +----------------- .../src/testkit/conformance.rs | 5 +- .../tests/session_driver_conformance.rs | 2 +- 3 files changed, 8 insertions(+), 846 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4c4c1b5d7..c544efede 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,19 +18,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "getrandom 0.3.4", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.5" @@ -158,29 +145,6 @@ dependencies = [ "hybrid-array", ] -[[package]] -name = "bson" -version = "2.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969a9ba84b0ff843813e7249eed1678d9b6607ce5a3b8f0a47af3fcf7978e6e" -dependencies = [ - "ahash", - "base64 0.22.1", - "bitvec", - "getrandom 0.2.17", - "getrandom 0.3.4", - "hex", - "indexmap", - "js-sys", - "once_cell", - "rand 0.9.4", - "serde", - "serde_bytes", - "serde_json", - "time", - "uuid", -] - [[package]] name = "bumpalo" version = "3.20.3" @@ -332,67 +296,12 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "cmov" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" - -[[package]] -name = "combine" -version = "4.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" -dependencies = [ - "bytes", - "memchr", -] - [[package]] name = "const-oid" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom 0.2.17", - "once_cell", - "tiny-keccak", -] - -[[package]] -name = "convert_case" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -426,42 +335,12 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "critical-section" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" - -[[package]] -name = "crossbeam-channel" -version = "0.5.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - [[package]] name = "crypto-common" version = "0.1.7" @@ -482,83 +361,12 @@ dependencies = [ "hybrid-array", ] -[[package]] -name = "ctutils" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03bb0e1cc970d482d121d9a1744999169b69a07470b3d644a7894e53fcaf4574" -dependencies = [ - "cmov", -] - -[[package]] -name = "darling" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" -dependencies = [ - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.118", -] - -[[package]] -name = "darling_macro" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.118", -] - [[package]] name = "data-encoding" version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" -[[package]] -name = "deranged" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" - -[[package]] -name = "derive-syn-parse" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.118", -] - -[[package]] -name = "derive-where" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e2b94854e8576378ccda7c8de8a66ed8b4e8acbd2c50ec3418ea6c8aaf4b567" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.2", -] - [[package]] name = "derive_arbitrary" version = "1.4.2" @@ -570,29 +378,6 @@ dependencies = [ "syn 2.0.118", ] -[[package]] -name = "derive_more" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.118", - "unicode-xid", -] - [[package]] name = "digest" version = "0.10.7" @@ -613,7 +398,6 @@ dependencies = [ "block-buffer 0.12.1", "const-oid", "crypto-common 0.2.2", - "ctutils", ] [[package]] @@ -654,12 +438,6 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" -[[package]] -name = "either" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" - [[package]] name = "equivalent" version = "1.0.2" @@ -982,83 +760,13 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hickory-net" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c480823ed7c2c5d0f09c41020cb6b7c28029ce60ec42dc942158dcf22f8e0a4d" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "futures-channel", - "futures-io", - "futures-util", - "hickory-proto", - "idna", - "ipnet", - "jni", - "rand 0.10.3", - "thiserror", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "hickory-proto" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b92608f679a6fa515dd1d15c1ff89443026e391200a2c840c7afcba482893d" -dependencies = [ - "data-encoding", - "idna", - "ipnet", - "jni", - "once_cell", - "prefix-trie", - "rand 0.10.3", - "ring", - "thiserror", - "tinyvec", - "tracing", - "url", -] - -[[package]] -name = "hickory-resolver" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3da5255c95d5a716857d54b5b8f4e8d67c3484d3beaaaae2ce25063b3ba981" -dependencies = [ - "cfg-if", - "futures-util", - "hickory-net", - "hickory-proto", - "ipconfig", - "ipnet", - "jni", - "moka", - "ndk-context", - "once_cell", - "parking_lot", - "rand 0.10.3", - "resolv-conf", - "smallvec", - "system-configuration", - "thiserror", - "tokio", - "tracing", -] - [[package]] name = "hkdf" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ - "hmac 0.12.1", + "hmac", ] [[package]] @@ -1070,15 +778,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "hmac" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" -dependencies = [ - "digest 0.11.3", -] - [[package]] name = "http" version = "1.4.2" @@ -1299,12 +998,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "1.1.0" @@ -1367,27 +1060,11 @@ version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f0fb0570afe1fed943c5c3d4102d5358592d8625fda6a0007fdbe65a92fba96" -[[package]] -name = "ipconfig" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222" -dependencies = [ - "socket2", - "widestring", - "windows-registry", - "windows-result", - "windows-sys 0.61.2", -] - [[package]] name = "ipnet" version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" -dependencies = [ - "serde", -] [[package]] name = "itoa" @@ -1395,55 +1072,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" -[[package]] -name = "jni" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" -dependencies = [ - "cfg-if", - "combine", - "jni-macros", - "jni-sys", - "log", - "simd_cesu8", - "thiserror", - "walkdir", - "windows-link", -] - -[[package]] -name = "jni-macros" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "simd_cesu8", - "syn 2.0.118", -] - -[[package]] -name = "jni-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" -dependencies = [ - "jni-sys-macros", -] - -[[package]] -name = "jni-sys-macros" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" -dependencies = [ - "quote", - "syn 2.0.118", -] - [[package]] name = "jobserver" version = "0.1.35" @@ -1548,69 +1176,11 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" -[[package]] -name = "macro_magic" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d" -dependencies = [ - "macro_magic_core", - "macro_magic_macros", - "quote", - "syn 2.0.118", -] - -[[package]] -name = "macro_magic_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150" -dependencies = [ - "const-random", - "derive-syn-parse", - "macro_magic_core_macros", - "proc-macro2", - "quote", - "syn 2.0.118", -] - -[[package]] -name = "macro_magic_core_macros" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.118", -] - -[[package]] -name = "macro_magic_macros" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" -dependencies = [ - "macro_magic_core", - "quote", - "syn 2.0.118", -] - [[package]] name = "maybe-owned" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" - -[[package]] -name = "md-5" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" -dependencies = [ - "cfg-if", - "digest 0.11.3", -] +checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" [[package]] name = "memchr" @@ -1655,111 +1225,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "moka" -version = "0.12.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4293f18e7567a1caf3c584855554377025c65e0aa445344d04171f5ad63d19b9" -dependencies = [ - "crossbeam-channel", - "crossbeam-epoch", - "crossbeam-utils", - "equivalent", - "parking_lot", - "portable-atomic", - "smallvec", - "tagptr", - "uuid", -] - -[[package]] -name = "mongocrypt" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8426a875ded61430d4a811dbfda7633b6b8af0225c547fc6c28b8b0aa7d79a13" -dependencies = [ - "bson", - "mongocrypt-sys", - "once_cell", - "serde", -] - -[[package]] -name = "mongocrypt-sys" -version = "0.1.6+1.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851fac73f7fe22f6a3ab87f720ce509cae7c9fd08e7dd27866cc232dee07ccf4" - -[[package]] -name = "mongodb" -version = "3.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af84443ae9878f59a6818686f339064479f42cdf293c4c637d8fc9c0a8c5eed6" -dependencies = [ - "base64 0.22.1", - "bitflags 2.13.0", - "bson", - "derive-where", - "derive_more", - "futures-core", - "futures-io", - "futures-util", - "hex", - "hickory-net", - "hickory-proto", - "hickory-resolver", - "hmac 0.13.0", - "macro_magic", - "md-5", - "mongocrypt", - "mongodb-internal-macros", - "pbkdf2", - "percent-encoding", - "rand 0.9.4", - "rustc_version_runtime", - "rustls", - "serde", - "serde_bytes", - "serde_with", - "sha1 0.11.0", - "sha2 0.11.0", - "socket2", - "stringprep", - "strsim", - "take_mut", - "thiserror", - "tokio", - "tokio-rustls", - "tokio-util", - "typed-builder", - "uuid", - "webpki-roots 1.0.8", -] - -[[package]] -name = "mongodb-internal-macros" -version = "3.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504024bbb83ab1bf1512007f7288b54d3a6343043f3f619c26a153346773598d" -dependencies = [ - "macro_magic", - "proc-macro2", - "quote", - "syn 2.0.118", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "num-conv" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" - [[package]] name = "num-traits" version = "0.2.19" @@ -1774,10 +1239,6 @@ name = "once_cell" version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" -dependencies = [ - "critical-section", - "portable-atomic", -] [[package]] name = "opaque-debug" @@ -1828,15 +1289,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "pbkdf2" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629" -dependencies = [ - "digest 0.11.3", -] - [[package]] name = "percent-encoding" version = "2.3.2" @@ -1897,12 +1349,6 @@ dependencies = [ "universal-hash", ] -[[package]] -name = "portable-atomic" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" - [[package]] name = "potential_utf" version = "0.1.5" @@ -1912,12 +1358,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "powerfmt" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" - [[package]] name = "ppv-lite86" version = "0.2.21" @@ -1927,17 +1367,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "prefix-trie" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cf6e3177f0684016a5c209b00882e15f8bdd3f3bb48f0491df10cd102d0c6e7" -dependencies = [ - "either", - "ipnet", - "num-traits", -] - [[package]] name = "proc-macro2" version = "1.0.106" @@ -2175,12 +1604,6 @@ dependencies = [ "webpki-roots 1.0.8", ] -[[package]] -name = "resolv-conf" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" - [[package]] name = "rgb" version = "0.8.53" @@ -2235,25 +1658,6 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustc_version_runtime" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd18cd2bae1820af0b6ad5e54f4a51d0f3fcc53b05f845675074efcc7af071d" -dependencies = [ - "rustc_version", - "semver", -] - [[package]] name = "rustix" version = "0.38.44" @@ -2296,7 +1700,6 @@ version = "0.23.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" dependencies = [ - "log", "once_cell", "ring", "rustls-pki-types", @@ -2353,12 +1756,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "semver" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" - [[package]] name = "serde" version = "1.0.229" @@ -2369,16 +1766,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde_bytes" -version = "0.11.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" -dependencies = [ - "serde", - "serde_core", -] - [[package]] name = "serde_core" version = "1.0.229" @@ -2405,7 +1792,6 @@ version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ - "indexmap", "itoa", "memchr", "serde", @@ -2434,28 +1820,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_with" -version = "3.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee78f1fbe43ac4a0e47aadb3dbd357b69eb0d3793e948624cd03dd2750ab1c0a" -dependencies = [ - "serde_core", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "3.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8705578779c2b6bd90d84d66eb2e206b708b1a4d7b9f17641b293545bf1c7e46" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.118", -] - [[package]] name = "sha1" version = "0.10.7" @@ -2467,17 +1831,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha1" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "digest 0.11.3", -] - [[package]] name = "sha2" version = "0.10.9" @@ -2522,22 +1875,6 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" -[[package]] -name = "simd_cesu8" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" -dependencies = [ - "rustc_version", - "simdutf8", -] - -[[package]] -name = "simdutf8" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" - [[package]] name = "siphasher" version = "1.0.3" @@ -2584,23 +1921,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" -[[package]] -name = "stringprep" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", - "unicode-properties", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - [[package]] name = "subtle" version = "2.6.1" @@ -2649,39 +1969,6 @@ dependencies = [ "syn 2.0.118", ] -[[package]] -name = "system-configuration" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" -dependencies = [ - "bitflags 2.13.0", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tagptr" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" - -[[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - [[package]] name = "tap" version = "1.0.1" @@ -2731,45 +2018,6 @@ dependencies = [ "syn 3.0.2", ] -[[package]] -name = "time" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" -dependencies = [ - "deranged", - "num-conv", - "powerfmt", - "serde_core", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" - -[[package]] -name = "time-macros" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tinyagents-definition" version = "2.2.0" @@ -2993,7 +2241,6 @@ dependencies = [ "tinyagents-tasks", "tinystoragedrivers-core", "tinystoragedrivers-file", - "tinystoragedrivers-mongodb", "tinystoragedrivers-sqlite", "tinytools-agent", "tokio", @@ -3159,21 +2406,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tinystoragedrivers-mongodb" -version = "1.0.0" -source = "git+https://github.com/tinyhumansai/tinystoragedrivers?tag=v1.0.0#141fd9ed0ad5d14a8fb5a1b3e837a719e81ac08d" -dependencies = [ - "async-trait", - "futures-util", - "mongodb", - "serde", - "serde_json", - "sha2 0.10.9", - "tinystoragedrivers-core", - "tokio", -] - [[package]] name = "tinystoragedrivers-secrets" version = "1.0.0" @@ -3341,9 +2573,7 @@ checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", - "futures-io", "futures-sink", - "futures-util", "pin-project-lite", "tokio", ] @@ -3485,30 +2715,10 @@ dependencies = [ "rand 0.9.4", "rustls", "rustls-pki-types", - "sha1 0.10.7", + "sha1", "thiserror", ] -[[package]] -name = "typed-builder" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "398a3a3c918c96de527dc11e6e846cd549d4508030b8a33e1da12789c856b81a" -dependencies = [ - "typed-builder-macro", -] - -[[package]] -name = "typed-builder-macro" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e48cea23f68d1f78eb7bc092881b6bb88d3d6b5b7e6234f6f9c911da1ffb221" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.118", -] - [[package]] name = "typenum" version = "1.20.1" @@ -3531,45 +2741,12 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" -[[package]] -name = "unicode-bidi" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" - [[package]] name = "unicode-ident" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" -[[package]] -name = "unicode-normalization" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cd3fb03d5288b3ba9a1ee103ac7e9cbb59f0b03d64f8ddfcc04dd42758a85d" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-properties" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" - -[[package]] -name = "unicode-segmentation" -version = "1.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - [[package]] name = "universal-hash" version = "0.5.1" @@ -3612,7 +2789,6 @@ checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" dependencies = [ "getrandom 0.4.3", "js-sys", - "serde_core", "wasm-bindgen", ] @@ -3777,12 +2953,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "widestring" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" - [[package]] name = "winapi" version = "0.3.9" @@ -3865,17 +3035,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "windows-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" -dependencies = [ - "windows-link", - "windows-result", - "windows-strings", -] - [[package]] name = "windows-result" version = "0.4.1" diff --git a/crates/tinyagents-session/src/testkit/conformance.rs b/crates/tinyagents-session/src/testkit/conformance.rs index a3d47b069..aac5a766d 100644 --- a/crates/tinyagents-session/src/testkit/conformance.rs +++ b/crates/tinyagents-session/src/testkit/conformance.rs @@ -12,7 +12,10 @@ //! and separately verifies that atomic agent/event/task operations return //! `Unsupported(ValidatedBatch)` without partial writes; its document driver //! does not provide the multi-document transaction boundary those operations -//! require. +//! require. The full MongoDB contracts run from the excluded +//! `integration-proofs/run-ledger-mongodb` workspace because BSON enables +//! `serde_json/preserve_order`, which must not alter the main workspace's +//! shared feature graph. //! * [`transcript_history_conformance`] exercises //! [`crate::transcript::TranscriptHistory`]/[`crate::transcript::TranscriptRead`], //! which — unlike the ledger — genuinely has two independent diff --git a/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs b/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs index c4329385e..aa0474761 100644 --- a/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs +++ b/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs @@ -6,7 +6,7 @@ use std::sync::Arc; use tinyagents_session::{ - port::{DriverSessionStores, SessionStoreProvider}, + port::DriverSessionStores, run_ledger::{AgentRunListRequest, DriverRunLedger, RunLedgerStore}, testkit::conformance::{ run_ledger_conformance, session_store_conformance, session_store_isolation_conformance, From e0c5406909804b6a322166d6e897b173a63b4ca2 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:31:18 +0300 Subject: [PATCH 15/18] style(integration-proofs): reformat session driver conformance test Adjust line wrapping and assertion formatting in the MongoDB session driver conformance test to satisfy rustfmt. No behaviour changes. Auto-committed-on: dragonfly --- .../tests/session_driver_conformance.rs | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs b/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs index aa0474761..63e38ccf5 100644 --- a/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs +++ b/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs @@ -22,8 +22,7 @@ fn local_mongo_url() -> String { let url = reqwest::Url::parse(&value).expect("TSD_MONGO_URL must be a valid URI"); assert_eq!(url.scheme(), "mongodb", "MongoDB SRV URLs are not accepted"); assert!( - matches!(url.host_str(), Some("localhost" | "127.0.0.1" | "::1")) - && url.port().is_some(), + matches!(url.host_str(), Some("localhost" | "127.0.0.1" | "::1")) && url.port().is_some(), "TSD_MONGO_URL must point to a local MongoDB server with an explicit port" ); assert!( @@ -50,11 +49,9 @@ async fn local_backend(label: &str) -> MongoStorage { #[ignore = "requires local MongoDB; run explicitly with TSD_MONGO_URL and --ignored"] async fn mongodb_session_store_round_trip_list_delete_and_agent_isolation() { let backend: Arc = Arc::new(local_backend("session_store").await); - let stores = DriverSessionStores::new( - backend, - Scope::tenant("session_store_conformance").unwrap(), - ) - .unwrap(); + let stores = + DriverSessionStores::new(backend, Scope::tenant("session_store_conformance").unwrap()) + .unwrap(); session_store_conformance(&stores).await; session_store_isolation_conformance(&stores).await; } @@ -70,10 +67,12 @@ async fn mongodb_run_ledger_contract_and_scope_isolation() { }; let ledger = scoped("run_ledger_conformance"); run_ledger_conformance(ledger.clone()).await; - assert!(scoped("run_ledger_peer") - .list_agent_runs(&AgentRunListRequest::default()) - .await - .unwrap() - .runs - .is_empty()); + assert!( + scoped("run_ledger_peer") + .list_agent_runs(&AgentRunListRequest::default()) + .await + .unwrap() + .runs + .is_empty() + ); } From 667a130f4804c7303b70bfd260d91ea7b75d4b8e Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:34:45 +0300 Subject: [PATCH 16/18] test(run_ledger): remove unused ledger conformance helper Drops the unused conformance and scope isolation helper along with its now-unneeded RunLedgerStore import from the driver tests. The helper was no longer referenced, so removing it keeps the test module free of dead code. Auto-committed-on: dragonfly --- .../src/run_ledger/drivers/mod_tests.rs | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs index e75b67605..2e91ed61e 100644 --- a/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs +++ b/crates/tinyagents-session/src/run_ledger/drivers/mod_tests.rs @@ -1,6 +1,5 @@ use super::*; use crate::run_ledger::LedgerError; -use crate::run_ledger::RunLedgerStore; use chrono::Duration; use serde_json::json; use std::sync::Arc; @@ -39,26 +38,6 @@ pub(super) fn ledgers() -> (DriverRunLedger, DriverRunLedger) { ) } -async fn assert_ledger_conformance_and_scope_isolation(backend: &dyn StorageBackend) { - use crate::testkit::conformance::run_ledger_conformance; - - let scoped = |name: &str| { - Arc::new(DriverRunLedger::new( - backend.for_scope(&Scope::new(name).unwrap()).unwrap(), - )) as Arc - }; - run_ledger_conformance(scoped("session-contract-agent")).await; - assert!( - scoped("session-contract-peer") - .list_agent_runs(&AgentRunListRequest::default()) - .await - .unwrap() - .runs - .is_empty(), - "a separate scope cannot list the conformance agent's runs" - ); -} - #[tokio::test] async fn file_workflow_records_round_trip_and_stay_in_their_scope() { let dir = tempfile::tempdir().unwrap(); From dc011514fc80b4a165d83271d23cee26d3bae789 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:37:35 +0300 Subject: [PATCH 17/18] chore(integration-proofs): refresh run-ledger-mongodb lockfile Updates the Cargo.lock for the MongoDB run-ledger integration proof to pick up tinyagents 2.2.0 and the tinystoragedrivers v1.0.0 tag, along with the cap-std and rustix dependencies those crates now require. Auto-committed-on: dragonfly --- .../run-ledger-mongodb/Cargo.lock | 136 ++++++++++++++---- 1 file changed, 111 insertions(+), 25 deletions(-) diff --git a/integration-proofs/run-ledger-mongodb/Cargo.lock b/integration-proofs/run-ledger-mongodb/Cargo.lock index cec71ca0d..372db3dd9 100644 --- a/integration-proofs/run-ledger-mongodb/Cargo.lock +++ b/integration-proofs/run-ledger-mongodb/Cargo.lock @@ -34,6 +34,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "ambient-authority" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" + [[package]] name = "android_system_properties" version = "0.1.6" @@ -172,6 +178,36 @@ version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +[[package]] +name = "cap-primitives" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b5f74729fd2f44701d1a8eb47e906cdb3ccd9ec0f02baad85a744b791940b18" +dependencies = [ + "ambient-authority", + "fs-set-times", + "io-extras", + "io-lifetimes 3.0.1", + "ipnet", + "maybe-owned", + "rustix 1.1.5", + "rustix-linux-procfs", + "windows-sys 0.61.2", + "winx", +] + +[[package]] +name = "cap-std" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ec78e242cfa2cfe276807ac2ecc00315a6c97786977414bcd1c3963b6c91b8" +dependencies = [ + "cap-primitives", + "io-extras", + "io-lifetimes 3.0.1", + "rustix 1.1.5", +] + [[package]] name = "cc" version = "1.8.0" @@ -601,6 +637,17 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-set-times" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" +dependencies = [ + "io-lifetimes 2.0.4", + "rustix 1.1.5", + "windows-sys 0.52.0", +] + [[package]] name = "fs4" version = "1.1.0" @@ -1152,6 +1199,28 @@ dependencies = [ "generic-array", ] +[[package]] +name = "io-extras" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20fd6de4ccfcc187e38bc21cfa543cb5a302cb86a8b114eb7f0bf0dc9f8ac00f" +dependencies = [ + "io-lifetimes 3.0.1", + "windows-sys 0.52.0", +] + +[[package]] +name = "io-lifetimes" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983" + +[[package]] +name = "io-lifetimes" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0fb0570afe1fed943c5c3d4102d5358592d8625fda6a0007fdbe65a92fba96" + [[package]] name = "ipconfig" version = "0.3.4" @@ -1354,6 +1423,12 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "maybe-owned" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" + [[package]] name = "md-5" version = "0.11.0" @@ -1944,6 +2019,16 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "rustix-linux-procfs" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" +dependencies = [ + "once_cell", + "rustix 1.1.5", +] + [[package]] name = "rustls" version = "0.23.45" @@ -2394,7 +2479,7 @@ dependencies = [ [[package]] name = "tinyagents-definition" -version = "2.1.4" +version = "2.2.0" dependencies = [ "anyhow", "async-trait", @@ -2407,14 +2492,17 @@ dependencies = [ [[package]] name = "tinyagents-harness" -version = "2.1.4" +version = "2.2.0" dependencies = [ "anyhow", "async-trait", "base64 0.22.1", + "cap-std", "chrono", "futures", + "libc", "regex", + "rustix 1.1.5", "serde", "serde_json", "sha2 0.11.0", @@ -2424,7 +2512,7 @@ dependencies = [ "tinyinference-core", "tinyinference-embeddings", "tinyinference-llm", - "tinystoragedrivers-core 1.0.0", + "tinystoragedrivers-core", "tinytools", "tinytools-agent", "tokio", @@ -2443,7 +2531,7 @@ dependencies = [ "tempfile", "tinyagents-session", "tinyinference-llm", - "tinystoragedrivers-core 1.0.0", + "tinystoragedrivers-core", "tinystoragedrivers-mongodb", "tokio", "uuid", @@ -2451,7 +2539,7 @@ dependencies = [ [[package]] name = "tinyagents-session" -version = "2.1.4" +version = "2.2.0" dependencies = [ "anyhow", "async-trait", @@ -2465,7 +2553,7 @@ dependencies = [ "thiserror", "tinyagents-harness", "tinyagents-tasks", - "tinystoragedrivers-core 1.0.0", + "tinystoragedrivers-core", "tinystoragedrivers-sqlite", "tinytools-agent", "tokio", @@ -2475,7 +2563,7 @@ dependencies = [ [[package]] name = "tinyagents-tasks" -version = "2.1.4" +version = "2.2.0" dependencies = [ "anyhow", "async-trait", @@ -2483,7 +2571,7 @@ dependencies = [ "serde_json", "tinyagents-harness", "tinyinference-llm", - "tinystoragedrivers-core 1.0.0", + "tinystoragedrivers-core", "tinytools", "tokio", "tracing", @@ -2552,18 +2640,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "tinystoragedrivers-core" -version = "0.11.0" -source = "git+https://github.com/tinyhumansai/tinystoragedrivers?tag=v0.11.0#9eeef54aea403ac07461a612189bdf4982782823" -dependencies = [ - "async-trait", - "serde", - "serde_json", - "thiserror", - "tokio", -] - [[package]] name = "tinystoragedrivers-core" version = "1.0.0" @@ -2591,14 +2667,14 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "tinystoragedrivers-core 1.0.0", + "tinystoragedrivers-core", "tokio", ] [[package]] name = "tinystoragedrivers-secrets" -version = "0.11.0" -source = "git+https://github.com/tinyhumansai/tinystoragedrivers?tag=v0.11.0#9eeef54aea403ac07461a612189bdf4982782823" +version = "1.0.0" +source = "git+https://github.com/tinyhumansai/tinystoragedrivers?tag=v1.0.0#141fd9ed0ad5d14a8fb5a1b3e837a719e81ac08d" dependencies = [ "async-trait", "atomicwrites", @@ -2610,7 +2686,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "tinystoragedrivers-core 0.11.0", + "tinystoragedrivers-core", "tokio", "winapi-util", "windows-permissions", @@ -2626,7 +2702,7 @@ dependencies = [ "rusqlite", "serde_json", "sha2 0.10.9", - "tinystoragedrivers-core 1.0.0", + "tinystoragedrivers-core", "tokio", "zstd", ] @@ -3321,6 +3397,16 @@ version = "0.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ef0ffc427f045c0cc9ebffd6f4f91153dcd2a1547b5c3c29ee3f541e16e95c6" +[[package]] +name = "winx" +version = "0.36.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" +dependencies = [ + "bitflags 2.13.2", + "windows-sys 0.52.0", +] + [[package]] name = "wit-bindgen" version = "0.57.1" From 4988f64bb6933a8746853bf29192744584ca40a8 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Sun, 18 Oct 2026 22:39:25 +0300 Subject: [PATCH 18/18] test(session-driver-conformance): shorten generated MongoDB database names The test now builds database names from a shorter prefix and a compact UUID representation, keeping identifiers within MongoDB's length limit while still guaranteeing uniqueness per run. Auto-committed-on: dragonfly --- .../run-ledger-mongodb/tests/session_driver_conformance.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs b/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs index 63e38ccf5..40e365709 100644 --- a/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs +++ b/integration-proofs/run-ledger-mongodb/tests/session_driver_conformance.rs @@ -34,7 +34,7 @@ fn local_mongo_url() -> String { async fn local_backend(label: &str) -> MongoStorage { let url = local_mongo_url(); - let database = format!("tinyagents_session_{label}_{}", uuid::Uuid::new_v4()); + let database = format!("ta_{label}_{}", uuid::Uuid::new_v4().simple()); let backend = MongoStorage::connect(&url, &database) .await .expect("local MongoDB replica set is reachable");