Expand description
Conformance suites for kernel store backends (spec 3.2 §11, §13 Q8; feature
conformance).
adk-core cannot depend on adk-kernel, so the kernel’s suites live here, in the form
of adk_core::conformance: a harness trait that opens the backend, one public function
per case, and a macro that generates one #[tokio::test] per case.
| Store | Harness | Test macro | Cases |
|---|---|---|---|
ProcessStore | ProcessStoreHarness | process_store_conformance_tests! | process_store |
AgendaStore | AgendaStoreHarness | agenda_store_conformance_tests! | agenda_store |
AgentStore (spec 3.3 §10 K7) | AgentStoreHarness | agent_store_conformance_tests! | agent_store |
drivers::DriverStore (feature drivers) | DriverStoreHarness | driver_store_conformance_tests! | driver_store |
proc::LedgerStore (feature proc) | LedgerStoreHarness | ledger_store_conformance_tests! | ledger_store |
DeviceStore (spec 3.3 §10 K2) | DeviceStoreHarness | device_store_conformance_tests! | device_store |
channels::ChannelBindingStore (feature channels; spec 3.3 §10 K1) | ChannelBindingStoreHarness | channel_binding_store_conformance_tests! | channel_binding_store |
PartitionStore | PartitionStoreHarness | partition_store_conformance_tests! | partition_store |
ControlStore (spec 3.3 §10 K3, K4) | ControlStoreHarness | control_store_conformance_tests! | control_store |
CronWatermarkStore | CronWatermarkStoreHarness | cron_watermark_store_conformance_tests! | cron_watermark_store |
The charter, KPI, autonomy and signal stores (feature charter; spec 3.5 §7.10, §7.11) | charter::*Harness | charter_store_conformance_tests!, kpi_store_conformance_tests!, autonomy_store_conformance_tests!, signal_store_conformance_tests! | charter |
Chat channel adapters pass channel_contract (feature channels; spec 3.3 §10 K1): a
ChannelAdapterHarness makes a fresh adapter per case and channel_contract_tests!
generates the tests, which run the adapter under the kernel’s gateway and check what it
put on the wire.
In-memory and SQLite run on the PR tier; PostgreSQL and Redis run in the CI postgres
job, #[ignore]d elsewhere.
A harness opens the backend; each call to open returns a new handle over the same
data, as a restarted or second process would see it. Each case writes under fresh
process ids, so a harness may point every case at one shared database. The macros need
tokio with the macros and rt-multi-thread features in the calling crate, and
apply the attributes written before harness = to every generated test.
§Example
use std::sync::Arc;
use adk_kernel::conformance::ProcessStoreHarness;
use adk_kernel::{InMemoryProcessStore, ProcessStore};
struct InMemory;
#[async_trait::async_trait]
impl ProcessStoreHarness for InMemory {
async fn open(&self) -> Arc<dyn ProcessStore> {
Arc::new(InMemoryProcessStore::new())
}
fn is_durable(&self) -> bool {
false
}
}
adk_kernel::process_store_conformance_tests! { harness = InMemory }Re-exports§
pub use agenda_store::AgendaStoreHarness;pub use agent_store::AgentStoreHarness;pub use channel_binding_store::ChannelBindingStoreHarness;pub use channel_contract::ChannelAdapter;pub use channel_contract::ChannelAdapterHarness;pub use channel_contract::ContractHost;pub use control_store::ControlStoreHarness;pub use cron_watermark_store::CronWatermarkStoreHarness;pub use device_store::DeviceStoreHarness;pub use driver_store::DriverStoreHarness;pub use ledger_store::LedgerStoreHarness;pub use partition_store::PartitionStoreHarness;pub use process_store::ProcessStoreHarness;
Modules§
- agenda_
store - Conformance cases for
AgendaStorebackends (spec 3.2 §7.5, §11, §13 Q8). - agent_
store - Conformance cases for
AgentStorebackends (spec 3.3 §5.7, §10 K7, S-I14). - channel_
binding_ store - Conformance cases for
ChannelBindingStorebackends (spec 3.3 §10 K1; featurechannels). - channel_
contract - The contract every chat channel adapter passes (spec 3.3 §5.3, §7.2, §10 K1, §11 S-I2,
S-I5, S-I6, S-I10; feature
channels). - charter
- Conformance suites for the charter module’s stores (spec 3.5 §7.10, §7.11, §11;
features
charterandconformance). - control_
store - Conformance cases for
ControlStorebackends (spec 3.3 §10 K3, K4). - cron_
watermark_ store - Conformance cases for
CronWatermarkStorebackends (spec 3.2 §7.4, §11, §13 Q8). - device_
store - Conformance cases for
DeviceStorebackends (spec 3.3 §10 K2, §11 S-I7). - driver_
store - Conformance cases for
DriverStorebackends (spec 3.2 §7.7, §11, §13 Q8). - ledger_
store - Conformance cases for
LedgerStorebackends (spec 3.2 §7.10, §11, §13 Q8; featuresconformanceandproc). - partition_
store - Conformance cases for
PartitionStorebackends (spec 3.2 §7.8, §11, §13 Q8). - process_
store - Conformance cases for
ProcessStorebackends (spec 3.2 §11, §13 Q8).