Skip to content

Incremental engine for long horizon agents 🌟 Star if you like it!

test(sdk): link the Rust SDK's integration tests as one binary (#2860)

Jiangzhou7d0661d62852
diff --git a/AGENTS.md b/AGENTS.md
index 0fb25575..b228dc04 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -104,6 +104,7 @@ cocoindex/
β”‚ β”œβ”€β”€ code_match/ # Structural code pattern matching over tree-sitter ASTs
β”‚ β”œβ”€β”€ sdk/
β”‚ β”‚ β”œβ”€β”€ cocoindex/ # Rust SDK (`cocoindex` crate); calls core engine APIs directly, like py/
+β”‚ β”‚ β”‚ └── tests/it/ # Its integration tests: one test binary, a module per area (`main.rs` says where a new test file goes)
β”‚ β”‚ └── cocoindex_macros/ # Proc macros for the Rust SDK (`#[function]`, `#[app]`, `#[lifespan]`, `#[main]`)
β”‚ └── cli/ # `cocoindex` CLI for Rust projects: builds the user's crate, drives its binary (spec: dev/plans/rust-cli.md)
β”‚
diff --git a/dev/plans/rust-sdk-ergonomics.md b/dev/plans/rust-sdk-ergonomics.md
index 00b2f45d..f60a3db0 100644
--- a/dev/plans/rust-sdk-ergonomics.md
+++ b/dev/plans/rust-sdk-ergonomics.md
@@ -50,7 +50,7 @@ Compile errors (via `syn::Error`): `batching` with no non-ctx param; first non-c
`Vec<_>`; return type not `Result<Vec<_>>`; `max_batch_size` without `batching`.
**Acceptance.** The `SHOWCASE.md` batching examples compile as written (after WS7 fixes the
-rest of that file). Test in `rust/sdk/cocoindex/tests/pipeline.rs`: per-item cache hits skip
+rest of that file). Test in `rust/sdk/cocoindex/tests/it/pipeline.rs`: per-item cache hits skip
the body, misses batch, body-edit (hash change) invalidates, extra-param change invalidates.
---
@@ -91,7 +91,7 @@ detection, `MemoInput`, the foreign-type newtype pattern, and the argument order
## WS3 β€” memo guidance fix (documentation, not a new macro)
-**Problem.** `rust/sdk/cocoindex/tests/pipeline.rs` (~2691) calls hand-rolled
+**Problem.** `rust/sdk/cocoindex/tests/it/pipeline.rs` (~2691) calls hand-rolled
`ctx.memo(&(__COCO_FN_HASH_ANALYZE, input), ...)` "the realistic pattern" for memoizing calls
that use non-serializable resources. This is wrong on both counts: the memo body closure
receives an owned `Ctx` (`cached_by_fingerprint_with_state`, `memo.rs:117-126`), so
diff --git a/dev/run_cargo_test_sdk.sh b/dev/run_cargo_test_sdk.sh
index 8416c82d..6632b76e 100755
--- a/dev/run_cargo_test_sdk.sh
+++ b/dev/run_cargo_test_sdk.sh
@@ -19,7 +19,9 @@ cargo check -p cocoindex --all-features --all-targets
# features left out probe localhost for a server, or pull in a large dependency
# tree only to skip. The build without features has no tests of its own
# (cargo-clippy-sdk compiles it). Arguments narrow the run, e.g.
-# `--test fs_live`.
+# `--test it fs_live::` (the integration tests are the modules of one test
+# binary, `tests/it`; a few that need a process of their own are binaries
+# beside it).
SDK_TEST_FEATURES="azure_blob,bigquery,code_match,doris,embed_api,fs_live,google_drive,kafka,lancedb"
SDK_TEST_FEATURES+=",oci_object_storage,postgres,snowflake,sqlite,surrealdb,surrealdb_mem,testing,text,turbopuffer,valkey"
# The zvec tests link the prebuilt `zvec_c_api` shared library that the
diff --git a/docs/src/content/docs/advanced_topics/concurrency_control.mdx b/docs/src/content/docs/advanced_topics/concurrency_control.mdx
index 5a69c471..b3730714 100644
--- a/docs/src/content/docs/advanced_topics/concurrency_control.mdx
+++ b/docs/src/content/docs/advanced_topics/concurrency_control.mdx
@@ -134,7 +134,7 @@ let results = ctx.map(tasks, |task| async move {
A batched function with <Lang only="python">`max_batch_size=N`</Lang><Lang only="rust">`max_batch_size = N`</Lang> receives up to `N` items at once; concurrent single-item calls are grouped into physical batches of at most that size. See [Batching](../programming_guide/function#batching) for the <Lang only="python">decorator options</Lang><Lang only="rust">attribute, and `Error::retry_with_smaller_batch` for a batch the backend rejects</Lang>.
-{/* Rust: rust/sdk/cocoindex_macros/src/lib.rs (function macro docs), rust/sdk/cocoindex/tests/batching_runner.rs */}
+{/* Rust: rust/sdk/cocoindex_macros/src/lib.rs (function macro docs), rust/sdk/cocoindex/tests/it/batching_runner.rs */}
<LangTabs>
<Fragment slot="python">
@@ -164,7 +164,7 @@ let embedding: Vec<f32> = embed(ctx, text).await?;
The pool size is detected from `COCOINDEX_NUM_GPUS`, then `CUDA_VISIBLE_DEVICES`, then `nvidia-smi`, and falls back to one. <Lang only="python">`coco.configure_gpu_pool(n)`</Lang><Lang only="rust">`configure_gpu_pool(n)`</Lang> overrides it; call it before any GPU function runs.
-{/* Rust: rust/sdk/cocoindex/tests/batching_runner.rs (whole_gpu, half_gpu, gpu_batch), rust/sdk/cocoindex/src/runner.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/batching_runner.rs (whole_gpu, half_gpu, gpu_batch), rust/sdk/cocoindex/src/runner.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/advanced_topics/custom_target_connector.mdx b/docs/src/content/docs/advanced_topics/custom_target_connector.mdx
index 6b04196f..9a641387 100644
--- a/docs/src/content/docs/advanced_topics/custom_target_connector.mdx
+++ b/docs/src/content/docs/advanced_topics/custom_target_connector.mdx
@@ -28,7 +28,7 @@ The labels distinguish types you implement from types CocoIndex provides.
<Lang only="rust">
-The types are in `cocoindex::prelude`: the `TargetHandler<V>` trait, `TargetActionSink<A>`, `TargetAction<A>`, `TargetReconcileOutput<A, R>`, `TargetChildInvalidation`, `TargetStateProvider<V>`, `TargetState<V>`, `ChildTargetDef`, `StableKey`, and the functions `register_root_target_states_provider`, `declare_target_state`, `declare_target_state_with_child` and `mount_target`. The Rust snippets on this page come from `rust/sdk/cocoindex/tests/target_state.rs`, which exercises each piece without an external service. For a complete connector against a database, read `rust/sdk/cocoindex/src/connectors/valkey.rs` (a container target with child documents).
+The types are in `cocoindex::prelude`: the `TargetHandler<V>` trait, `TargetActionSink<A>`, `TargetAction<A>`, `TargetReconcileOutput<A, R>`, `TargetChildInvalidation`, `TargetStateProvider<V>`, `TargetState<V>`, `ChildTargetDef`, `StableKey`, and the functions `register_root_target_states_provider`, `declare_target_state`, `declare_target_state_with_child` and `mount_target`. The Rust snippets on this page come from `rust/sdk/cocoindex/tests/it/target_state.rs`, which exercises each piece without an external service. For a complete connector against a database, read `rust/sdk/cocoindex/src/connectors/valkey.rs` (a container target with child documents).
</Lang>
@@ -168,7 +168,7 @@ A **tracking record** captures the essential information needed to detect change
- Are **deterministic**: Same input always produces the same record
- Are **serializable**: Must be persistable<Lang only="python"> (typically a NamedTuple or dataclass). Dataclasses and NamedTuples are serialized with msgspec automatically. For types requiring pickle, use `@coco.serialize_by_pickle`.</Lang><Lang only="rust">: any `Serialize + DeserializeOwned` type.</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (TableSpec, the tracking record of TableHandler) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (TableSpec, the tracking record of TableHandler) */}
<LangTabs>
<Fragment slot="python">
@@ -227,7 +227,7 @@ For content-based change detection, keep a fingerprint instead of the full conte
An **action** (you define) describes what operation to perform on the external system:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (RowAction) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (RowAction) */}
<LangTabs>
<Fragment slot="python">
@@ -255,7 +255,7 @@ struct RowAction {
A **TargetActionSink** batches and executes actions:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (recording_sink), rust/sdk/cocoindex/src/target_state.rs (TargetActionSink::from_async_fn) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (recording_sink), rust/sdk/cocoindex/src/target_state.rs (TargetActionSink::from_async_fn) */}
<LangTabs>
<Fragment slot="python">
@@ -455,7 +455,7 @@ Due to interrupted updates, `prev_possible_records` may contain multiple records
Start by defining the types for your provider:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (RowAction; RowHandler keeps the row value as its tracking record) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (RowAction; RowHandler keeps the row value as its tracking record) */}
<LangTabs>
<Fragment slot="python">
@@ -514,7 +514,7 @@ struct RowAction {
### Step 2: Implement the handler
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (RowHandler, key_str) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (RowHandler, key_str) */}
<LangTabs>
<Fragment slot="python">
@@ -652,7 +652,7 @@ impl TargetHandler<String> for RowHandler {
For root-level target states (not nested within another target), register a provider:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (flat_target_insert_update_nochange_delete) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (flat_target_insert_update_nochange_delete) */}
<LangTabs>
<Fragment slot="python">
@@ -755,7 +755,7 @@ When a container target undergoes certain changes, the child target states may b
Set `child_invalidation` in the **parent handler's** `reconcile()` method when you detect that the container itself has changed in a way that affects its children:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (TableSpec, TableAction, TableHandler) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (TableSpec, TableAction, TableHandler) */}
<LangTabs>
<Fragment slot="python">
@@ -904,7 +904,7 @@ The parent is the `TableHandler` [above](#child-invalidation), a `TargetHandler<
The parent's sink is built with <Lang only="python">`from_fn()` (or `from_async_fn()`), plus a `child_handler` factory</Lang><Lang only="rust">`TargetActionSink::from_async_fn_with_child_handler(apply, child_handler)`</Lang>. The callback creates and drops containers; the factory returns the handler for a container's child target states<Lang only="rust">: it takes `&A` and returns a `ChildTargetDef`, which wraps a typed child handler</Lang>:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (table_sink, log_table_action) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (table_sink, log_table_action) */}
<LangTabs>
<Fragment slot="python">
@@ -976,7 +976,7 @@ The container handler's `reconcile()` returns an action on every run while the c
The user-facing API uses <Lang only="python">`declare_target_state_with_child()`</Lang><Lang only="rust">`declare_target_state_with_child()` or `mount_target()`</Lang> and exposes methods for declaring children:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (run_table_with), rust/sdk/cocoindex/src/connectors/valkey.rs (declare_index_target_with_options, mount_index_target_with_options) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (run_table_with), rust/sdk/cocoindex/src/connectors/valkey.rs (declare_index_target_with_options, mount_index_target_with_options) */}
<LangTabs>
<Fragment slot="python">
@@ -1191,7 +1191,7 @@ class _VectorIndexHandler:
The parent handler (which manages regular children) returns <Lang only="python">a dict of </Lang>all supported attachment types:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (MainHandler) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (MainHandler) */}
<LangTabs>
<Fragment slot="python">
@@ -1260,7 +1260,7 @@ impl TargetHandler<String> for MainHandler {
The user-facing target <Lang only="python">class</Lang><Lang only="rust">struct</Lang> calls `provider.attachment()` to get the attachment sub-provider, then declares target states on it:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (attachment_lifecycle_create_and_cleanup) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (attachment_lifecycle_create_and_cleanup) */}
<LangTabs>
<Fragment slot="python">
@@ -1396,7 +1396,7 @@ await conn.execute("INSERT ...") # Fails on duplicate key
Due to interrupted updates, `prev_possible_records` may contain multiple records. Design your reconciliation logic to handle this:
-{/* Rust: rust/sdk/cocoindex/tests/target_state.rs (RowHandler) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/target_state.rs (RowHandler) */}
<LangTabs>
<Fragment slot="python">
@@ -1613,7 +1613,7 @@ See the full implementations in:
## Complete examples
-- [`rust/sdk/cocoindex/tests/target_state.rs`](https://github.com/cocoindex-io/cocoindex/blob/main/rust/sdk/cocoindex/tests/target_state.rs) β€” the handler, sink and provider snippets on this page, runnable without an external service: flat targets, containers with `mount_target`, child invalidation, attachments, and the deprecated sink shapes
+- [`rust/sdk/cocoindex/tests/it/target_state.rs`](https://github.com/cocoindex-io/cocoindex/blob/main/rust/sdk/cocoindex/tests/it/target_state.rs) β€” the handler, sink and provider snippets on this page, runnable without an external service: flat targets, containers with `mount_target`, child invalidation, attachments, and the deprecated sink shapes
- [`rust/sdk/cocoindex/src/resources/fs.rs`](https://github.com/cocoindex-io/cocoindex/blob/main/rust/sdk/cocoindex/src/resources/fs.rs) β€” `DirTarget`, file system targets
- [`rust/sdk/cocoindex/src/connectors/valkey.rs`](https://github.com/cocoindex-io/cocoindex/blob/main/rust/sdk/cocoindex/src/connectors/valkey.rs) β€” a Valkey index (container) and its documents, with `statediff` and `ManagedBy`
diff --git a/docs/src/content/docs/advanced_topics/exception_handlers.mdx b/docs/src/content/docs/advanced_topics/exception_handlers.mdx
index 68300045..1b472f35 100644
--- a/docs/src/content/docs/advanced_topics/exception_handlers.mdx
+++ b/docs/src/content/docs/advanced_topics/exception_handlers.mdx
@@ -108,7 +108,7 @@ For details on how target handlers deal with multiple possible previous states a
<Lang only="python">`app.update()`</Lang><Lang only="rust">`app.start_update(...)`</Lang> returns an `UpdateHandle` that exposes processing stats, including error counts:
-{/* Rust: rust/sdk/cocoindex/tests/detailed_stats.rs, rust/sdk/cocoindex/src/app.rs (UpdateHandle), src/stats.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/detailed_stats.rs, rust/sdk/cocoindex/src/app.rs (UpdateHandle), src/stats.rs */}
<LangTabs>
<Fragment slot="python">
@@ -191,7 +191,7 @@ Exception handlers only apply to background mounts. `ctx.scope` / `use_mount!` a
Register a handler inside your <Lang only="python">`@coco.lifespan` function using `builder.set_exception_handler()`</Lang><Lang only="rust">`#[cocoindex::lifespan]` function using `builder.exception_handler(...)`</Lang>:
-{/* Rust: rust/sdk/cocoindex/tests/mount.rs (temp_app_with_handler), rust/sdk/cocoindex/src/app.rs (EnvironmentBuilder::exception_handler) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/mount.rs (temp_app_with_handler), rust/sdk/cocoindex/src/app.rs (EnvironmentBuilder::exception_handler) */}
<LangTabs>
<Fragment slot="python">
@@ -231,7 +231,7 @@ This replaces the default "log error" behavior for all background mounts in the
<Lang only="python">Use `coco.exception_handler()` as an async context manager to apply a handler to a specific dynamic scope:</Lang><Lang only="rust">Use `ctx.with_exception_handler(handler)` to get a `Ctx` whose background mounts go through the handler first:</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/mount.rs (scoped_handler_applies_only_to_mounts_from_the_scoped_ctx) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/mount.rs (scoped_handler_applies_only_to_mounts_from_the_scoped_ctx) */}
<LangTabs>
<Fragment slot="python">
@@ -362,7 +362,7 @@ Handlers receive the same `Error` that a foreground call such as `ctx.scope(...)
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/mount.rs (handler_error_propagates_through_ready_with_its_type) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/mount.rs (handler_error_propagates_through_ready_with_its_type) */}
<LangTabs>
<Fragment slot="python">
@@ -466,7 +466,7 @@ If the innermost handler returns `Err`, the next outer handler is called with th
This continues up the stack. If every handler <Lang only="python">raises, the last handler's exception</Lang><Lang only="rust">returns `Err`, the last handler's error</Lang> propagates through `handle.ready()` (see [How to opt into propagation](#how-to-opt-into-propagation)). If no handler is registered, CocoIndex falls back to the built-in behavior: logging the error at `ERROR` level, with no crash.
-{/* Rust: rust/sdk/cocoindex/tests/mount.rs (scoped handler then global handler with source == Handler) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/mount.rs (scoped handler then global handler with source == Handler) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/advanced_topics/internal_storage.mdx b/docs/src/content/docs/advanced_topics/internal_storage.mdx
index 9692ceb1..82cf0b0e 100644
--- a/docs/src/content/docs/advanced_topics/internal_storage.mdx
+++ b/docs/src/content/docs/advanced_topics/internal_storage.mdx
@@ -231,7 +231,7 @@ The database format does not depend on the SDK that wrote it. The [Python CLI](/
</Lang>
-{/* Python: python/cocoindex/_internal/inspect_api.py, python/cocoindex/_internal/core.pyi (TargetStateEntry). Rust: rust/sdk/cocoindex/src/inspect.rs (module docs), rust/sdk/cocoindex/tests/inspect.rs */}
+{/* Python: python/cocoindex/_internal/inspect_api.py, python/cocoindex/_internal/core.pyi (TargetStateEntry). Rust: rust/sdk/cocoindex/src/inspect.rs (module docs), rust/sdk/cocoindex/tests/it/inspect.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/advanced_topics/live_component.mdx b/docs/src/content/docs/advanced_topics/live_component.mdx
index 200e124c..991ab802 100644
--- a/docs/src/content/docs/advanced_topics/live_component.mdx
+++ b/docs/src/content/docs/advanced_topics/live_component.mdx
@@ -33,7 +33,7 @@ A live component is a type that implements the `LiveComponent` trait, with two m
</Lang>
-{/* Rust: rust/sdk/cocoindex/src/live_component.rs (LiveComponent trait), rust/sdk/cocoindex/tests/live_map.rs (Producer) */}
+{/* Rust: rust/sdk/cocoindex/src/live_component.rs (LiveComponent trait), rust/sdk/cocoindex/tests/it/live_map.rs (Producer) */}
<LangTabs>
<Fragment slot="python">
@@ -198,7 +198,7 @@ You **don't** need `report_exception` around `update_full` / `update` / `delete`
A component that watches a local folder and processes each file:
-{/* Rust: rust/sdk/cocoindex/tests/live_component.rs (DirectDelete), rust/sdk/cocoindex/tests/live_map.rs (Producer) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_component.rs (DirectDelete), rust/sdk/cocoindex/tests/it/live_map.rs (Producer) */}
<LangTabs>
<Fragment slot="python">
@@ -286,7 +286,7 @@ For a real directory, `cocoindex` ships the watcher: `walk_dir(dir).live()` retu
The parent mounts it like any other component:
-{/* Rust: rust/sdk/cocoindex/tests/live_component.rs (mount_live_catch_up_runs_process_once) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_component.rs (mount_live_catch_up_runs_process_once) */}
<LangTabs>
<Fragment slot="python">
@@ -318,7 +318,7 @@ app.update(move |ctx| async move {
A traditional single-function component:
-{/* Rust: the body of rust/sdk/cocoindex/tests/live_component.rs (Declarer::process), inside an app.update root as in that file's tests */}
+{/* Rust: the body of rust/sdk/cocoindex/tests/it/live_component.rs (Declarer::process), inside an app.update root as in that file's tests */}
<LangTabs>
<Fragment slot="python">
@@ -347,7 +347,7 @@ app.update(move |ctx| async move {
is equivalent to this LiveComponent:
-{/* Rust: rust/sdk/cocoindex/tests/live_component.rs (Declarer) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_component.rs (Declarer) */}
<LangTabs>
<Fragment slot="python">
@@ -410,7 +410,7 @@ A common pattern is "run a regular processor on a fixed schedule." `ctx.auto_ref
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/live_component.rs (auto_refresh), rust/sdk/cocoindex/src/ctx.rs (Ctx::auto_refresh) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_component.rs (auto_refresh), rust/sdk/cocoindex/src/ctx.rs (Ctx::auto_refresh) */}
<LangTabs>
<Fragment slot="python">
@@ -574,7 +574,7 @@ The subscriber also has `is_live()`, and `read_committed_state` / `write_committ
A typical `watch()` implementation for a `LiveMapView`:
-{/* Rust: rust/sdk/cocoindex/tests/live_component.rs (StreamFeed) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_component.rs (StreamFeed) */}
<LangTabs>
<Fragment slot="python">
@@ -646,7 +646,7 @@ To add live support to a source connector, make your source return <Lang only="p
`LiveMap<K, V>` joins live data-*producing* logic and live data-*consuming* logic inside one session. The producer declares `(key, value)` entries as target states with `declare_entry`; the consumer reads the map as a `LiveMapView` through `ctx.mount_each_live`. An entry exists as long as some component declares it; when its declaring component stops declaring it, the entry is removed, and the consumer's child for it is deleted.
-{/* Rust: rust/sdk/cocoindex/tests/live_map.rs (Producer, Consumer), rust/sdk/cocoindex/src/resources/live_map.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_map.rs (Producer, Consumer), rust/sdk/cocoindex/src/resources/live_map.rs */}
```rust
use cocoindex::prelude::*;
diff --git a/docs/src/content/docs/advanced_topics/memoization_keys.mdx b/docs/src/content/docs/advanced_topics/memoization_keys.mdx
index ef4d6859..752e7dba 100644
--- a/docs/src/content/docs/advanced_topics/memoization_keys.mdx
+++ b/docs/src/content/docs/advanced_topics/memoization_keys.mdx
@@ -155,7 +155,7 @@ Return something that uniquely identifies the **semantic content** your function
**Example β€” DB row:**
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (impl MemoInput for Resource, write_memo_key) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (impl MemoInput for Resource, write_memo_key) */}
<LangTabs>
<Fragment slot="python">
@@ -338,7 +338,7 @@ The two approaches above are **type-level**: every memoized function sees the sa
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (memo_key_transform_and_skip_for_function_macro) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (memo_key_transform_and_skip_for_function_macro) */}
<LangTabs>
<Fragment slot="python">
@@ -405,7 +405,7 @@ The macro checks the names at compile time. A transform also suppresses the argu
**Target handles.** A target handle is where output goes, not an input of the computation, so it is not `MemoInput`. `DirTarget`, the Postgres, SQLite, Doris, SurrealDB, LanceDB, Neo4j and FalkorDB table and relation targets, the Qdrant collection, the Valkey index and the Turbopuffer namespace targets are `Serialize` instead: as an argument of a memoized function or of `mount!`, `use_mount!` or `mount_each!`, one is keyed by its stable key. The other connectors' handles are only `Clone`. Skip those in the memo key; you can skip any handle the same way:
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (target_state_of_nested_memo_survives_outer_memo_hit) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (target_state_of_nested_memo_survives_outer_memo_hit) */}
```rust
#[cocoindex::function(memo, memo_key(target = skip))]
async fn declare_nested(ctx: &Ctx, target: DirTarget, content: String) -> Result<()> {
@@ -499,7 +499,7 @@ Implement the async `memo_state` method of `MemoInput` beside `write_memo_key`,
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (type_owned_context_memo_state_invalidates_cached_function) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (type_owned_context_memo_state_invalidates_cached_function) */}
<LangTabs>
<Fragment slot="python">
@@ -717,7 +717,7 @@ A function's memo key covers its arguments and the context values it reads. Thre
`version = N` replaces the body hash as the function's logic: bump it to invalidate every memo of the function, for example when a helper the macro cannot see has changed. `deps = <expr>` folds a value into the logic fingerprint, so every call of the function depends on it. The expression is evaluated and fingerprinted once per process, through `MemoInput`.
-{/* Rust: rust/sdk/cocoindex_macros/src/lib.rs (version docs), rust/sdk/cocoindex/tests/memo_deps.rs (with_deps) */}
+{/* Rust: rust/sdk/cocoindex_macros/src/lib.rs (version docs), rust/sdk/cocoindex/tests/it/memo_deps.rs (with_deps) */}
```rust
#[cocoindex::function(memo, version = 2)]
async fn my_fn(ctx: &Ctx, arg: &String) -> Result<String> { /* ... */ }
@@ -736,7 +736,7 @@ Some dependencies are known only per call: a tree walk's `visit_file` depends on
Construct a `LogicDep` before any component runs, never per call: a memo entry is validated against the dependencies registered at that moment, and one that is dropped at the end of a call evicts every entry that recorded it. A `static` behind `LazyLock`, forced in `main` or a lifespan, is the usual form.
-{/* Rust: rust/sdk/cocoindex/tests/memo_deps.rs (release, leaf); static form from rust/sdk/SHOWCASE.md, verified against src/deps.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/memo_deps.rs (release, leaf); static form from rust/sdk/SHOWCASE.md, verified against src/deps.rs */}
```rust
use std::sync::LazyLock;
@@ -758,7 +758,7 @@ A `LogicDep` is itself a `MemoInput`, keyed by its fingerprint, so it can also b
Logic, arguments and context values are known before a body runs. Some bodies read things decided only while they run: an agent session opens the files the model chose. `DataDep::new(name, validate)` declares such a *kind* of read with a validator; `ctx.use_data_dep(&kind, &key, &state)?` records one read as a key and the state observed. The next probe validates each record from the stored key and state alone, through the validator, so the entry can be reused even though nothing in its arguments covers the read. Construct a `DataDep` before any component runs, as with `LogicDep`; renaming a kind invalidates every entry that recorded it.
-{/* Rust: rust/sdk/cocoindex/tests/memo_deps.rs (file_kind, read) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/memo_deps.rs (file_kind, read) */}
```rust
use cocoindex::Fingerprint;
diff --git a/docs/src/content/docs/advanced_topics/multiple_environments.mdx b/docs/src/content/docs/advanced_topics/multiple_environments.mdx
index 4e7b93bd..ed8ac67f 100644
--- a/docs/src/content/docs/advanced_topics/multiple_environments.mdx
+++ b/docs/src/content/docs/advanced_topics/multiple_environments.mdx
@@ -22,7 +22,7 @@ import LangTabs from '../../../components/LangTabs.astro';
Create an explicit environment <Lang only="python">by providing `Settings` with a `db_path`</Lang><Lang only="rust">with `Environment::builder()` and a `db_path`</Lang>:
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (Environment::builder), rust/sdk/cocoindex/src/app.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (Environment::builder), rust/sdk/cocoindex/src/app.rs */}
<LangTabs>
<Fragment slot="python">
@@ -289,7 +289,7 @@ The `cocoindex` CLI for Rust drives the one environment that `Environment::from_
For tests, create isolated environments to avoid interference between test runs:
-{/* Rust: rust/sdk/cocoindex/tests/mount.rs (temp_app), rust/sdk/cocoindex/tests/memo_deps.rs (app_at) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/mount.rs (temp_app), rust/sdk/cocoindex/tests/it/memo_deps.rs (app_at) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/advanced_topics/progress_monitoring.mdx b/docs/src/content/docs/advanced_topics/progress_monitoring.mdx
index 4dc2e28c..215ef12f 100644
--- a/docs/src/content/docs/advanced_topics/progress_monitoring.mdx
+++ b/docs/src/content/docs/advanced_topics/progress_monitoring.mdx
@@ -52,7 +52,7 @@ Use the structured progress APIs to stream progress from a daemon to a client, b
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/detailed_stats.rs, rust/sdk/cocoindex/src/app.rs (UpdateHandle) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/detailed_stats.rs, rust/sdk/cocoindex/src/app.rs (UpdateHandle) */}
<LangTabs>
<Fragment slot="python">
@@ -111,7 +111,7 @@ To read stats *while* an update is in flight, loop on `changed()` (below) and re
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/detailed_stats.rs, rust/sdk/cocoindex/src/app.rs (Progress, UpdateHandle::changed) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/detailed_stats.rs, rust/sdk/cocoindex/src/app.rs (Progress, UpdateHandle::changed) */}
<LangTabs>
<Fragment slot="python">
@@ -245,7 +245,7 @@ By default every component's stats roll up into one report for the whole update.
A group is a closure, not a `with` block. `stats_group` prints nothing; `stats_group_with_options` takes `StatsGroupOptions` to print the group's progress.
</RustNote>
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (ctx_stats_group_reports_scoped_child_stats, ctx_stats_group_with_options_reports_scoped_child_stats), rust/sdk/cocoindex/src/ctx.rs (stats_group, stats_group_with_options) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (ctx_stats_group_reports_scoped_child_stats, ctx_stats_group_with_options_reports_scoped_child_stats), rust/sdk/cocoindex/src/ctx.rs (stats_group, stats_group_with_options) */}
<LangTabs>
<Fragment slot="python">
@@ -318,7 +318,7 @@ The `StatsGroupHandle` has the same `stats_snapshot()`, `detailed_stats_snapshot
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (ctx_stats_group_reports_scoped_child_stats) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (ctx_stats_group_reports_scoped_child_stats) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/advanced_topics/timeouts.mdx b/docs/src/content/docs/advanced_topics/timeouts.mdx
index d3b4ffbf..4af443db 100644
--- a/docs/src/content/docs/advanced_topics/timeouts.mdx
+++ b/docs/src/content/docs/advanced_topics/timeouts.mdx
@@ -216,7 +216,7 @@ If the deadline passes while `parse_file` is inside an `.await`, CocoIndex does
Use <Lang only="python">`mount()` or `mount_each()`</Lang><Lang only="rust">`ctx.mount(..)` or `ctx.mount_each(..)`</Lang> when the child is independent background work. The parent's timeout can stop the parent from waiting forever, but it does not become the child's timeout:
-{/* Rust: rust/sdk/cocoindex/src/ctx.rs (Ctx::mount, ComponentMountHandle::ready), rust/sdk/cocoindex/tests/mount.rs */}
+{/* Rust: rust/sdk/cocoindex/src/ctx.rs (Ctx::mount, ComponentMountHandle::ready), rust/sdk/cocoindex/tests/it/mount.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/common_resources/data_types.mdx b/docs/src/content/docs/common_resources/data_types.mdx
index 68f8ebe4..7d554ed8 100644
--- a/docs/src/content/docs/common_resources/data_types.mdx
+++ b/docs/src/content/docs/common_resources/data_types.mdx
@@ -31,7 +31,7 @@ The file module (<Lang only="python">`cocoindex.resources.file`</Lang><Lang only
<Lang only="python">`FileLike` is a base class for file objects with async read methods. Each connector provides its own subclass (e.g., `localfs.File`, `amazon_s3.S3Object`).</Lang><Lang only="rust">`FileLike` is a trait for file objects with async read methods. Each connector has a type that implements it: `FileEntry` for the local file system, `AzureBlobFile` for Azure Blob Storage, and so on. A function takes the concrete type, as below, or a `&dyn FileLike`.</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (read_file), examples/rust/azure_blob_embedding/src/main.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (read_file), examples/rust/azure_blob_embedding/src/main.rs */}
<LangTabs>
<Fragment slot="python">
@@ -103,7 +103,7 @@ A `FileLike` is a `MemoInput` whose key is `file_path().memo_key()`, and whose s
`FilePath` <Lang only="python">is a base class that combines</Lang><Lang only="rust">combines</Lang> a **base directory** (with a stable key) and a **relative path**. This enables stable memoization even when the entire directory tree is moved to a different location.
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (with_base_dir), rust/sdk/cocoindex/tests/fs_target.rs (under_context_dir) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (with_base_dir), rust/sdk/cocoindex/tests/it/fs_target.rs (under_context_dir) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/common_resources/id_generation.mdx b/docs/src/content/docs/common_resources/id_generation.mdx
index 40bda94f..1437d05f 100644
--- a/docs/src/content/docs/common_resources/id_generation.mdx
+++ b/docs/src/content/docs/common_resources/id_generation.mdx
@@ -41,7 +41,7 @@ Every ID function takes the component's `Ctx` first: the memo that keeps an ID s
<Lang only="python">`generate_id` is an async function and `generate_uuid` a sync one;</Lang><Lang only="rust">Async functions that</Lang> <Lang only="python">both</Lang> return the **same** ID/UUID for the **same** `dep` value. These are idempotent: calling multiple times with identical `dep` yields identical results.
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (generate_id_returns_same_id_for_same_dep_across_runs, generate_uuid_...) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (generate_id_returns_same_id_for_same_dep_across_runs, generate_uuid_...) */}
<LangTabs>
<Fragment slot="python">
@@ -120,7 +120,7 @@ let uuids = vec![
Use these when you need multiple IDs for potentially non-distinct inputs, such as splitting text into chunks where chunks may have identical content but still need unique IDs.
-{/* Rust: examples/rust/text_embedding/src/main.rs (process_file), rust/sdk/cocoindex/tests/pipeline.rs (with_deps, UuidGenerator) */}
+{/* Rust: examples/rust/text_embedding/src/main.rs (process_file), rust/sdk/cocoindex/tests/it/pipeline.rs (with_deps, UuidGenerator) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/common_resources/live_map.mdx b/docs/src/content/docs/common_resources/live_map.mdx
index 7c8a503d..68b6af77 100644
--- a/docs/src/content/docs/common_resources/live_map.mdx
+++ b/docs/src/content/docs/common_resources/live_map.mdx
@@ -19,7 +19,7 @@ It is designed for [live mode](../programming_guide/live_mode): the producer and
## Example
-{/* Rust: rust/sdk/cocoindex/tests/live_map.rs (live module: Producer, Consumer) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_map.rs (live module: Producer, Consumer) */}
<LangTabs>
<Fragment slot="python">
@@ -125,7 +125,7 @@ The producer and the consumer are [live components](../advanced_topics/live_comp
## Creating a LiveMap
-{/* Rust: rust/sdk/cocoindex/tests/live_map.rs (live_map_create_and_declare) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_map.rs (live_map_create_and_declare) */}
<LangTabs>
<Fragment slot="python">
@@ -159,7 +159,7 @@ let lm: LiveMap<String, String> = LiveMap::create(&ctx).await?;
## Producing entries
-{/* Rust: rust/sdk/cocoindex/tests/live_map.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_map.rs */}
<LangTabs>
<Fragment slot="python">
@@ -189,7 +189,7 @@ Multiple components may declare into the same map, as long as each key has a sin
A `LiveMap` is a [`LiveMapView`](../advanced_topics/live_component#livemapfeed-and-livemapview), so pass it straight to <Lang only="python">`coco.mount_each`</Lang><Lang only="rust">`ctx.mount_each_live`</Lang> β€” it behaves just like a live source:
-{/* Rust: rust/sdk/cocoindex/tests/live_map.rs (Consumer::process) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_map.rs (Consumer::process) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/common_resources/vector_schema.mdx b/docs/src/content/docs/common_resources/vector_schema.mdx
index 25807f0c..8af31250 100644
--- a/docs/src/content/docs/common_resources/vector_schema.mdx
+++ b/docs/src/content/docs/common_resources/vector_schema.mdx
@@ -270,7 +270,7 @@ let schema = postgres::TableSchema::from_row::<DocEmbedding>(["id"])?
Specify dimension and dtype explicitly. Useful when using a custom embedding model that doesn't implement `VectorSchemaProvider`.
-{/* Rust: rust/sdk/cocoindex/src/row_schema.rs (module docs), rust/sdk/cocoindex/tests/schema_from_row.rs */}
+{/* Rust: rust/sdk/cocoindex/src/row_schema.rs (module docs), rust/sdk/cocoindex/tests/it/schema_from_row.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/amazon_s3.mdx b/docs/src/content/docs/connectors/amazon_s3.mdx
index 8b8ddb99..ec46d44b 100644
--- a/docs/src/content/docs/connectors/amazon_s3.mdx
+++ b/docs/src/content/docs/connectors/amazon_s3.mdx
@@ -208,7 +208,7 @@ The prefix is passed to S3 as given, not read as a folder: `"data"` also matches
`list_objects()` returns an `S3Walker` that <Lang only="python">yields</Lang><Lang only="rust">lists</Lang> `S3File` objects (implementing the [`FileLike`](../common_resources/data_types#filelike) base class):
-{/* Rust: rust/sdk/cocoindex/tests/amazon_s3_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/amazon_s3_source.rs */}
<LangTabs>
<Fragment slot="python">
@@ -254,7 +254,7 @@ See [`FileLike`](../common_resources/data_types#filelike) for details on the fil
<Lang only="python">`S3Walker.items()` yields `(str, S3File)` pairs</Lang><Lang only="rust">`S3Walker::items()` returns `(String, S3File)` pairs</Lang>, useful for associating each file with a stable string key: the object key relative to the prefix, exactly as stored. Keys are not normalized, so `a//b.txt` and `a/b.txt` are two items:
-{/* Rust: rust/sdk/cocoindex/tests/amazon_s3_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/amazon_s3_source.rs */}
<LangTabs>
<Fragment slot="python">
@@ -325,7 +325,7 @@ let files = amazon_s3::list_objects(
Use `max_file_size` to skip objects that exceed a size threshold:
-{/* Rust: rust/sdk/cocoindex/tests/amazon_s3_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/amazon_s3_source.rs */}
<LangTabs>
<Fragment slot="python">
@@ -405,7 +405,7 @@ pub async fn S3Client::get_object_uri(&self, uri: &str) -> Result<S3File>
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/amazon_s3_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/amazon_s3_source.rs */}
<LangTabs>
<Fragment slot="python">
@@ -488,7 +488,7 @@ The client reads an `S3File`, not a URI: get the file with `get_object_uri` firs
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/amazon_s3_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/amazon_s3_source.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/azure_blob.mdx b/docs/src/content/docs/connectors/azure_blob.mdx
index 3e010de2..885f3828 100644
--- a/docs/src/content/docs/connectors/azure_blob.mdx
+++ b/docs/src/content/docs/connectors/azure_blob.mdx
@@ -125,7 +125,7 @@ let client = ContainerClient::new(
To use a SAS token:
-{/* Rust: rust/sdk/cocoindex/tests/azure_blob_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/azure_blob_source.rs */}
<LangTabs>
<Fragment slot="python">
@@ -246,7 +246,7 @@ pub async fn AzureBlobWalker::items(&self) -> Result<Vec<(String, AzureBlobFile)
`list_blobs()` <Lang only="python">yields</Lang><Lang only="rust">lists</Lang> `AzureBlobFile` objects implementing [`FileLike`](../common_resources/data_types#filelike):
-{/* Rust: rust/sdk/cocoindex/tests/azure_blob_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/azure_blob_source.rs */}
<LangTabs>
<Fragment slot="python">
@@ -359,7 +359,7 @@ let files = azure_blob::list_blobs(
Use `max_file_size` to skip blobs above a size threshold:
-{/* Rust: rust/sdk/cocoindex/tests/azure_blob_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/azure_blob_source.rs */}
<LangTabs>
<Fragment slot="python">
@@ -420,7 +420,7 @@ pub async fn get_blob(client: &ContainerClient, blob_name: &str) -> Result<Azure
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/azure_blob_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/azure_blob_source.rs */}
<LangTabs>
<Fragment slot="python">
@@ -482,7 +482,7 @@ pub async fn read(
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/azure_blob_source.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/azure_blob_source.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/bigquery.mdx b/docs/src/content/docs/connectors/bigquery.mdx
index 050d2b48..f51c0be5 100644
--- a/docs/src/content/docs/connectors/bigquery.mdx
+++ b/docs/src/content/docs/connectors/bigquery.mdx
@@ -414,7 +414,7 @@ Use `#[coco(type = "…")]` on a field to specify a custom BigQuery type:
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/bigquery_target.rs; #[coco(type)] from rust/sdk/cocoindex_macros/src/lib.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/bigquery_target.rs; #[coco(type)] from rust/sdk/cocoindex_macros/src/lib.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/doris.mdx b/docs/src/content/docs/connectors/doris.mdx
index 18c2e549..d41cad68 100644
--- a/docs/src/content/docs/connectors/doris.mdx
+++ b/docs/src/content/docs/connectors/doris.mdx
@@ -10,7 +10,7 @@ The `doris` connector provides utilities for writing rows to Apache Doris databa
import LangTabs from '../../../components/LangTabs.astro';
-{/* Rust: rust/sdk/cocoindex/tests/doris_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/doris_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -67,7 +67,7 @@ Enable the `doris` Cargo feature of the `cocoindex` crate.
Configure the connection to your Doris cluster:
-{/* Rust: rust/sdk/cocoindex/tests/doris_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/doris_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -219,7 +219,7 @@ The key name is load-bearing across runs β€” it's the stable identity CocoIndex
CocoIndex tracks each table by the context key and the table name. The `database` in <Lang only="python">`DorisConnectionConfig`</Lang><Lang only="rust">`DorisConfig`</Lang> is not part of that identity. If you change `database` under the same key, CocoIndex treats it as if you moved the tables there. It assumes that they already exist in the new database, so it does not create them, and it leaves the old database as it is. To write to a new, empty database, use a new context key.
:::
-{/* Rust: rust/sdk/cocoindex/tests/doris_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/doris_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -356,7 +356,7 @@ mount_each!("facts", facts, |file| process_facts(ctx, file, table)).await?;
Once a <Lang only="python">`DorisTableTarget`</Lang><Lang only="rust">`TableTarget`</Lang> is resolved, declare rows to be upserted:
-{/* Rust: rust/sdk/cocoindex/tests/doris_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/doris_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -456,7 +456,7 @@ The row type is a struct that derives `SchemaFields` (and `Serialize`). Per-colu
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/schema_from_row.rs, examples/rust/sec_edgar_analytics/src/main.rs (with_vector_schema) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/schema_from_row.rs, examples/rust/sec_edgar_analytics/src/main.rs (with_vector_schema) */}
<LangTabs>
<Fragment slot="python">
@@ -644,7 +644,7 @@ impl VectorIndexDef {
Doris supports inverted indexes for full-text search. Define them with `InvertedIndexDef`:
-{/* Rust: rust/sdk/cocoindex/tests/doris_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/doris_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -687,7 +687,7 @@ let target =
Build a vector similarity search SQL query:
-{/* Rust: rust/sdk/cocoindex/tests/doris_target.rs, rust/sdk/SHOWCASE.md (verified against doris.rs) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/doris_target.rs, rust/sdk/SHOWCASE.md (verified against doris.rs) */}
<LangTabs>
<Fragment slot="python">
@@ -783,7 +783,7 @@ There is no `connect_async`: queries run on the pool of the `DorisConnection` it
### Example
-{/* Rust: rust/sdk/cocoindex/tests/doris_target.rs (shape of the inverted-index test, with a vector index from doris.rs) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/doris_target.rs (shape of the inverted-index test, with a vector index from doris.rs) */}
<LangTabs>
<Fragment slot="python">
@@ -894,7 +894,7 @@ app.run(move |ctx| async move {
.await?;
```
-`examples/rust/sec_edgar_analytics` is a runnable project: one Doris table with a vector index and an inverted index, fed per file through `mount_each!`. `rust/sdk/cocoindex/tests/doris_target.rs` is the end-to-end test.
+`examples/rust/sec_edgar_analytics` is a runnable project: one Doris table with a vector index and an inverted index, fed per file through `mount_each!`. `rust/sdk/cocoindex/tests/it/doris_target.rs` is the end-to-end test.
</Fragment>
</LangTabs>
diff --git a/docs/src/content/docs/connectors/falkordb.mdx b/docs/src/content/docs/connectors/falkordb.mdx
index 8e34184d..6721596a 100644
--- a/docs/src/content/docs/connectors/falkordb.mdx
+++ b/docs/src/content/docs/connectors/falkordb.mdx
@@ -448,7 +448,7 @@ An edge id names one edge. When the endpoints of an edge with an explicit id cha
Declares a vector index on a column of a node table. Vector indexes are an [attachment](../advanced_topics/custom_target_connector#implementing-attachment-providers) to a <Lang only="python">`NodeTarget`</Lang><Lang only="rust">`TableTarget`</Lang>:
-{/* Rust: rust/sdk/cocoindex/src/cypher_graph.rs (graph_target_api! macro); usage in rust/sdk/cocoindex/tests/graph_vector_index.rs */}
+{/* Rust: rust/sdk/cocoindex/src/cypher_graph.rs (graph_target_api! macro); usage in rust/sdk/cocoindex/tests/it/graph_vector_index.rs */}
<LangTabs>
<Fragment slot="python">
@@ -534,7 +534,7 @@ Build a `TableSchema` from a struct that derives `SchemaFields`:
</Lang>
-{/* Rust: rust/sdk/cocoindex/src/cypher_graph.rs (TableSchema::from_row doc example); usage in rust/sdk/cocoindex/tests/graph_target.rs */}
+{/* Rust: rust/sdk/cocoindex/src/cypher_graph.rs (TableSchema::from_row doc example); usage in rust/sdk/cocoindex/tests/it/graph_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -626,7 +626,7 @@ Override the default mapping for a single column with a field attribute:
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/graph_target.rs (from_row_matches_explicit_schema) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/graph_target.rs (from_row_matches_explicit_schema) */}
<LangTabs>
<Fragment slot="python">
@@ -666,7 +666,7 @@ struct Row {
To override a column for one schema only, call `with_column_type` on the derived schema. It replaces the column's type and keeps its nullability:
-{/* Rust: rust/sdk/cocoindex/tests/graph_target.rs (from_row_takes_column_type_overrides) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/graph_target.rs (from_row_takes_column_type_overrides) */}
```rust
let schema = TableSchema::from_row::<Row>("id")?.with_column_type("location", "POINT")?;
```
@@ -699,7 +699,7 @@ Mark a vector field `#[coco(vector)]` (or `#[coco(vector = N)]`). The property i
Build a `TableSchema` directly from <Lang only="python">a dict of</Lang><Lang only="rust">a list of</Lang> column definitions when the row type is dynamic:
-{/* Rust: rust/sdk/cocoindex/tests/graph_target.rs (from_row_matches_explicit_schema) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/graph_target.rs (from_row_matches_explicit_schema) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/google_drive.mdx b/docs/src/content/docs/connectors/google_drive.mdx
index 6dc8e92d..70b2428e 100644
--- a/docs/src/content/docs/connectors/google_drive.mdx
+++ b/docs/src/content/docs/connectors/google_drive.mdx
@@ -463,7 +463,7 @@ async fn main() -> Result<()> {
### UserAccount
-{/* Rust: rust/sdk/cocoindex/src/connectors/gdrive.rs; usage in rust/sdk/cocoindex/tests/gdrive_user_account.rs */}
+{/* Rust: rust/sdk/cocoindex/src/connectors/gdrive.rs; usage in rust/sdk/cocoindex/tests/it/gdrive_user_account.rs */}
<LangTabs>
<Fragment slot="python">
@@ -516,7 +516,7 @@ The handle a `GoogleDriveClient` signs with. `GoogleDriveClient::from_user_accou
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/gdrive_user_account.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/gdrive_user_account.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/kafka.mdx b/docs/src/content/docs/connectors/kafka.mdx
index 7736440b..fab5d5da 100644
--- a/docs/src/content/docs/connectors/kafka.mdx
+++ b/docs/src/content/docs/connectors/kafka.mdx
@@ -789,7 +789,7 @@ While the topic is still declared, a message target state that is no longer decl
The callback lives in your process: a run that declares the topic target, or drops the app from a process that did, applies it. `App::drop_state` from a process that never declared the topic target produces tombstones.
</RustNote>
-{/* Rust: rust/sdk/cocoindex/tests/kafka_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/kafka_target.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/lancedb.mdx b/docs/src/content/docs/connectors/lancedb.mdx
index 2ede76fa..fd7be557 100644
--- a/docs/src/content/docs/connectors/lancedb.mdx
+++ b/docs/src/content/docs/connectors/lancedb.mdx
@@ -124,7 +124,7 @@ pub struct ConnectOptions {
**Example:**
-{/* Rust: examples/rust/code_embedding_lancedb/src/main.rs; rust/sdk/cocoindex/tests/lancedb_target.rs (lancedb_connect_with_options) */}
+{/* Rust: examples/rust/code_embedding_lancedb/src/main.rs; rust/sdk/cocoindex/tests/it/lancedb_target.rs (lancedb_connect_with_options) */}
<LangTabs>
<Fragment slot="python">
@@ -315,7 +315,7 @@ def table_target(
A `LanceTableTarget` is `Clone` and `Serialize`. It can be an argument of `mount!`, `use_mount!`, `mount_each!` or a memoized function: it fingerprints by its stable key, the context key name and the table name. The schema and `managed_by` are not part of that identity.
-{/* Rust: rust/sdk/cocoindex/tests/lancedb_target.rs (lancedb_table_target_is_a_mount_argument_keyed_by_its_table) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/lancedb_target.rs (lancedb_table_target_is_a_mount_argument_keyed_by_its_table) */}
```rust
#[cocoindex::function]
@@ -570,7 +570,7 @@ The default FTS index name is `<column>_fts_idx`, not the column name.
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/lancedb_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/lancedb_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -895,7 +895,7 @@ impl ColumnDef {
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/lancedb_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/lancedb_target.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/localfs.mdx b/docs/src/content/docs/connectors/localfs.mdx
index 65fe0e49..2bae0c9a 100644
--- a/docs/src/content/docs/connectors/localfs.mdx
+++ b/docs/src/content/docs/connectors/localfs.mdx
@@ -14,7 +14,7 @@ import LangTabs from '../../../components/LangTabs.astro';
The <Lang only="python">`localfs`</Lang><Lang only="rust">local filesystem</Lang> connector provides utilities for reading files from and writing files to the local file system.
-{/* Rust: rust/sdk/cocoindex/tests/fs_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/fs_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -52,7 +52,7 @@ Declare a `ContextKey<PathBuf>` with `context_key!`; its name is the stable iden
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/fs_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/fs_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -575,7 +575,7 @@ pub struct FileOptions {
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/fs_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/fs_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -728,7 +728,7 @@ target.declare_file_with_options(
Declares a subdirectory target within the directory.
-{/* Rust: rust/sdk/cocoindex/tests/fs_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/fs_target.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/neo4j.mdx b/docs/src/content/docs/connectors/neo4j.mdx
index 15d7ecfd..ebbe3b1d 100644
--- a/docs/src/content/docs/connectors/neo4j.mdx
+++ b/docs/src/content/docs/connectors/neo4j.mdx
@@ -466,7 +466,7 @@ An edge id names one edge. When the endpoints of an edge with an explicit id cha
Declares a vector index on a column of a node table. Vector indexes are an [attachment](../advanced_topics/custom_target_connector#implementing-attachment-providers) to a <Lang only="python">`NodeTarget`</Lang><Lang only="rust">`TableTarget`</Lang>:
-{/* Rust: rust/sdk/cocoindex/src/cypher_graph.rs (graph_target_api! macro); usage in rust/sdk/cocoindex/tests/graph_target.rs */}
+{/* Rust: rust/sdk/cocoindex/src/cypher_graph.rs (graph_target_api! macro); usage in rust/sdk/cocoindex/tests/it/graph_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -552,7 +552,7 @@ Build a `TableSchema` from a row struct:
</Lang>
-{/* Rust: rust/sdk/cocoindex/src/cypher_graph.rs (TableSchema::from_row doc example); usage in rust/sdk/cocoindex/tests/graph_target.rs */}
+{/* Rust: rust/sdk/cocoindex/src/cypher_graph.rs (TableSchema::from_row doc example); usage in rust/sdk/cocoindex/tests/it/graph_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -608,7 +608,7 @@ let schema = cocoindex::connectors::neo4j::TableSchema::from_row::<Person>("id")
To override the type of one column, put a `#[coco(..)]` attribute on the field (see [Column type overrides](#column-type-overrides)), or call `with_column_type` on the derived schema:
-{/* Rust: rust/sdk/cocoindex/tests/graph_target.rs (from_row_takes_column_type_overrides) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/graph_target.rs (from_row_takes_column_type_overrides) */}
```rust
let schema = TableSchema::from_row::<Row>("id")?.with_column_type("location", "POINT")?;
```
@@ -698,7 +698,7 @@ Override the default mapping for a single column with a `#[coco(..)]` field attr
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/graph_target.rs (from_row_matches_explicit_schema) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/graph_target.rs (from_row_matches_explicit_schema) */}
<LangTabs>
<Fragment slot="python">
@@ -760,7 +760,7 @@ Mark a vector field `#[coco(vector)]` (or `#[coco(vector = N)]`). The property i
Build a `TableSchema` directly from <Lang only="python">a dict of</Lang> column definitions when the row type is dynamic:
-{/* Rust: rust/sdk/cocoindex/tests/graph_target.rs (from_row_matches_explicit_schema) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/graph_target.rs (from_row_matches_explicit_schema) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/oci_object_storage.mdx b/docs/src/content/docs/connectors/oci_object_storage.mdx
index f1dd162b..d74b7a69 100644
--- a/docs/src/content/docs/connectors/oci_object_storage.mdx
+++ b/docs/src/content/docs/connectors/oci_object_storage.mdx
@@ -648,7 +648,7 @@ The typical setup uses **OCI Streaming**. Configure an [OCI Events Rule](https:/
</Lang>
-{/* Rust: rust/sdk/SHOWCASE.md (OCI live view), rust/sdk/cocoindex/tests/oci_live.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md (OCI live view), rust/sdk/cocoindex/tests/it/oci_live.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/postgres.mdx b/docs/src/content/docs/connectors/postgres.mdx
index 7515cdda..e28c4595 100644
--- a/docs/src/content/docs/connectors/postgres.mdx
+++ b/docs/src/content/docs/connectors/postgres.mdx
@@ -214,7 +214,7 @@ Name the row type on the result, or as `read_table::<T>`. Select fewer columns w
</Lang>
-{/* Rust: examples/rust/postgres_source/src/main.rs, rust/sdk/cocoindex/tests/postgres_source.rs */}
+{/* Rust: examples/rust/postgres_source/src/main.rs, rust/sdk/cocoindex/tests/it/postgres_source.rs */}
<LangTabs>
<Fragment slot="python">
@@ -1061,7 +1061,7 @@ postgres::TableSchema::from_row::<DocEmbedding>(["id"])?
Define columns directly using `ColumnDef`:
-{/* Rust: rust/sdk/cocoindex/tests/postgres_source.rs, tests/schema_from_row.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/postgres_source.rs, tests/schema_from_row.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/qdrant.mdx b/docs/src/content/docs/connectors/qdrant.mdx
index d8609df2..2277a429 100644
--- a/docs/src/content/docs/connectors/qdrant.mdx
+++ b/docs/src/content/docs/connectors/qdrant.mdx
@@ -112,7 +112,7 @@ impl QdrantConnection {
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/qdrant_target.rs, rust/sdk/cocoindex/src/connectors/qdrant.rs (from_client doctest) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/qdrant_target.rs, rust/sdk/cocoindex/src/connectors/qdrant.rs (from_client doctest) */}
<LangTabs>
<Fragment slot="python">
@@ -151,7 +151,7 @@ Create a <Lang only="python">`ContextKey[QdrantClient]`</Lang><Lang only="rust">
The key name is load-bearing across runs β€” it's the stable identity CocoIndex uses to track managed collections. See [ContextKey as stable identity](../programming_guide/context#contextkey-as-stable-identity) before renaming.
:::
-{/* Rust: examples/rust/text_embedding_qdrant/src/main.rs, rust/sdk/cocoindex/tests/qdrant_target.rs */}
+{/* Rust: examples/rust/text_embedding_qdrant/src/main.rs, rust/sdk/cocoindex/tests/it/qdrant_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -519,7 +519,7 @@ Sparse vectors use Qdrant's native sparse-vector storage and dot-product scoring
For collections with a single unnamed vector:
-{/* Rust: rust/sdk/cocoindex/tests/qdrant_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/qdrant_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -698,7 +698,7 @@ Points put both vectors in the named-vector list. The sparse vector is a native
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/qdrant_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/qdrant_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -1162,7 +1162,7 @@ let payload = json!({
The connector focuses on writing points to Qdrant. For vector search, use the Qdrant client directly<Lang only="rust"> or the connector's search helpers</Lang>:
-{/* Rust: examples/rust/text_embedding_qdrant/src/main.rs, rust/sdk/cocoindex/tests/qdrant_target.rs */}
+{/* Rust: examples/rust/text_embedding_qdrant/src/main.rs, rust/sdk/cocoindex/tests/it/qdrant_target.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/snowflake.mdx b/docs/src/content/docs/connectors/snowflake.mdx
index c256ae7f..3b3c86b0 100644
--- a/docs/src/content/docs/connectors/snowflake.mdx
+++ b/docs/src/content/docs/connectors/snowflake.mdx
@@ -426,7 +426,7 @@ Use `#[coco(type = "…")]` to specify a custom Snowflake type:
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/snowflake_target.rs; #[coco(type)] from rust/sdk/cocoindex_macros/src/lib.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/snowflake_target.rs; #[coco(type)] from rust/sdk/cocoindex_macros/src/lib.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/sqlite.mdx b/docs/src/content/docs/connectors/sqlite.mdx
index d12b2366..d7ac3729 100644
--- a/docs/src/content/docs/connectors/sqlite.mdx
+++ b/docs/src/content/docs/connectors/sqlite.mdx
@@ -686,7 +686,7 @@ For a `Vec<f32>` field marked `#[coco(vector)]`, pass a [`VectorSchemaProvider`]
Define columns directly using `ColumnDef`:
-{/* Rust: rust/sdk/cocoindex/tests/schema_from_row.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/schema_from_row.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/surrealdb.mdx b/docs/src/content/docs/connectors/surrealdb.mdx
index 0f3d5f24..2e087421 100644
--- a/docs/src/content/docs/connectors/surrealdb.mdx
+++ b/docs/src/content/docs/connectors/surrealdb.mdx
@@ -118,7 +118,7 @@ async fn main() -> Result<()> {
To sign in as another kind of user, use `Graph::connect_with_credentials(url, ns, db, credentials)`:
-{/* Rust: rust/sdk/cocoindex/tests/surrealdb_target.rs (surrealdb_connects_with_a_database_user_when_available) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/surrealdb_target.rs (surrealdb_connects_with_a_database_user_when_available) */}
```rust
let graph = Graph::connect_with_credentials(
&url,
@@ -441,7 +441,7 @@ pub async fn mount_relation_target_unconstrained(
Once a `RelationTarget` is resolved, declare relation records:
-{/* Rust: rust/sdk/cocoindex/src/connectors/surrealdb.rs; usage in rust/sdk/cocoindex/tests/surrealdb_target.rs */}
+{/* Rust: rust/sdk/cocoindex/src/connectors/surrealdb.rs; usage in rust/sdk/cocoindex/tests/it/surrealdb_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -513,7 +513,7 @@ statement_mentions.declare_relation_between(
Declare a vector index on a field of the table. CocoIndex tracks the index spec and automatically creates, recreates, or drops the index as needed.
-{/* Rust: rust/sdk/cocoindex/src/connectors/surrealdb.rs; usage in rust/sdk/cocoindex/tests/surrealdb_target.rs */}
+{/* Rust: rust/sdk/cocoindex/src/connectors/surrealdb.rs; usage in rust/sdk/cocoindex/tests/it/surrealdb_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -775,7 +775,7 @@ For `NDArray` fields, a [`VectorSchemaProvider`](../common_resources/vector_sche
Or override a column of the derived schema. `with_column_type(field, surreal_type)` replaces the type of one column and keeps its nullability. `with_vector_schema(field, provider)` types a `#[coco(vector)]` column as `array<float, N>` from a [`VectorSchemaProvider`](../common_resources/vector_schema#vectorschemaprovider), typically the embedder that fills it (for an embedder held in the context, pass `ctx.get_key(&EMBEDDER)?`):
-{/* Rust: rust/sdk/cocoindex/tests/surrealdb_target.rs (surrealdb_from_row_takes_column_overrides) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/surrealdb_target.rs (surrealdb_from_row_takes_column_overrides) */}
```rust
#[derive(cocoindex::SchemaFields)]
struct Doc {
@@ -864,7 +864,7 @@ let schema = TableSchema::new([
### Example: Normal tables
-{/* Rust: examples/rust/conversation_to_knowledge/src/pipeline.rs and src/models.rs; vector index from rust/sdk/cocoindex/tests/surrealdb_target.rs */}
+{/* Rust: examples/rust/conversation_to_knowledge/src/pipeline.rs and src/models.rs; vector index from rust/sdk/cocoindex/tests/it/surrealdb_target.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/turbopuffer.mdx b/docs/src/content/docs/connectors/turbopuffer.mdx
index ed51b7e4..05e3c767 100644
--- a/docs/src/content/docs/connectors/turbopuffer.mdx
+++ b/docs/src/content/docs/connectors/turbopuffer.mdx
@@ -109,7 +109,7 @@ Create a <Lang only="python">`ContextKey[AsyncTurbopuffer]`</Lang><Lang only="ru
The key name is load-bearing across runs β€” it's the stable identity CocoIndex uses to track managed namespaces. See [ContextKey as stable identity](../programming_guide/context#contextkey-as-stable-identity) before renaming.
:::
-{/* Rust: examples/rust/text_embedding_turbopuffer/src/main.rs, rust/sdk/cocoindex/tests/turbopuffer_target.rs */}
+{/* Rust: examples/rust/text_embedding_turbopuffer/src/main.rs, rust/sdk/cocoindex/tests/it/turbopuffer_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -421,7 +421,7 @@ The `schema` field is an explicit `VectorSchema`. Its dtype controls turbopuffer
For namespaces with a single unnamed vector:
-{/* Rust: rust/sdk/cocoindex/tests/turbopuffer_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/turbopuffer_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -713,7 +713,7 @@ Reserved attribute names depend on the schema; putting any reserved name in <Lan
The connector focuses on writing rows. For vector search, use the turbopuffer client directly<Lang only="rust"> or the connector's search helpers</Lang>:
-{/* Rust: rust/sdk/cocoindex/tests/turbopuffer_target.rs, examples/rust/text_embedding_turbopuffer/src/main.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/turbopuffer_target.rs, examples/rust/text_embedding_turbopuffer/src/main.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/connectors/valkey.mdx b/docs/src/content/docs/connectors/valkey.mdx
index 386ed786..85021c66 100644
--- a/docs/src/content/docs/connectors/valkey.mdx
+++ b/docs/src/content/docs/connectors/valkey.mdx
@@ -9,7 +9,7 @@ The `valkey` connector provides utilities for writing documents to Valkey with v
import LangTabs from '../../../components/LangTabs.astro';
-{/* Rust: rust/sdk/cocoindex/tests/valkey_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/valkey_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -132,7 +132,7 @@ The handle's `state_id()` is the server's address and database number as a URI,
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/valkey_target.rs, rust/sdk/cocoindex/src/connectors/valkey.rs (ClientConfig doctest) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/valkey_target.rs, rust/sdk/cocoindex/src/connectors/valkey.rs (ClientConfig doctest) */}
<LangTabs>
<Fragment slot="python">
@@ -185,7 +185,7 @@ Declare a context key for a `valkey::Valkey` to identify your Valkey connection,
The key name is load-bearing across runs β€” it's the stable identity CocoIndex uses to track managed indexes. See [ContextKey as stable identity](../programming_guide/context#contextkey-as-stable-identity) before renaming.
:::
-{/* Rust: rust/sdk/cocoindex/tests/valkey_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/valkey_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -285,7 +285,7 @@ pub async fn mount_index_target_with_options(
<Lang only="rust">
-{/* Rust: rust/sdk/cocoindex/tests/valkey_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/valkey_target.rs */}
```rust
let index = valkey::mount_index_target_with_options(
@@ -390,7 +390,7 @@ index.declare_document(
Define vector configuration for an index using `IndexSchema`.
-{/* Rust: rust/sdk/cocoindex/tests/valkey_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/valkey_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -541,7 +541,7 @@ A batch of document changes is sent in pipelines: one `DEL` for every deleted ke
### Example
-{/* Rust: rust/sdk/cocoindex/tests/valkey_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/valkey_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -639,7 +639,7 @@ index.declare_document(&ctx, doc("d1", vec![0.1, 0.2, 0.3], "hello"))?;
index.declare_document(&ctx, doc("d2", vec![0.4, 0.5, 0.6], "world"))?;
```
-There is no example program for Valkey yet; `rust/sdk/cocoindex/tests/valkey_target.rs` is the end-to-end reference.
+There is no example program for Valkey yet; `rust/sdk/cocoindex/tests/it/valkey_target.rs` is the end-to-end reference.
</Fragment>
</LangTabs>
diff --git a/docs/src/content/docs/connectors/zvec.mdx b/docs/src/content/docs/connectors/zvec.mdx
index c6c54aed..cb54f9b7 100644
--- a/docs/src/content/docs/connectors/zvec.mdx
+++ b/docs/src/content/docs/connectors/zvec.mdx
@@ -14,7 +14,7 @@ The `zvec` connector writes documents to [zvec](https://zvec.org), an embedded,
import LangTabs from '../../../components/LangTabs.astro';
-{/* Rust: rust/sdk/cocoindex/tests/zvec_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/zvec_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -147,7 +147,7 @@ Declare a context key for a `ManagedConnection` to identify your connection, the
The key name is load-bearing across runs β€” it's the stable identity CocoIndex uses to track managed documents. See [ContextKey as stable identity](../programming_guide/context#contextkey-as-stable-identity) before renaming.
:::
-{/* Rust: rust/sdk/cocoindex/tests/zvec_target.rs, rust/sdk/SHOWCASE.md (verified against zvec.rs) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/zvec_target.rs, rust/sdk/SHOWCASE.md (verified against zvec.rs) */}
<LangTabs>
<Fragment slot="python">
@@ -374,7 +374,7 @@ zvec is a vector database: every collection must declare at least one vector fie
**Example:**
-{/* Rust: rust/sdk/cocoindex/tests/zvec_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/zvec_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -474,7 +474,7 @@ There is no array of strings (`ARRAY_STRING`): a `Vec<String>` is stored as a JS
Override the scalar type, encoder, or indexing for a field:
-{/* Rust: rust/sdk/cocoindex/tests/zvec_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/zvec_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -533,7 +533,7 @@ struct ArrayDoc {
Mark a string field as full-text (FTS) indexed. The field is stored as a `STRING` field with a zvec FTS index, so you can run full-text match queries against it directly through zvec. Requires zvec >= 0.5.
-{/* Rust: rust/sdk/cocoindex/tests/zvec_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/zvec_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -603,7 +603,7 @@ A `Vec<f32>` field marked `#[coco(vector)]` becomes a dense vector (`VECTOR_FP32
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/zvec_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/zvec_target.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/ops/entity_resolution.mdx b/docs/src/content/docs/ops/entity_resolution.mdx
index 376c96da..73db3907 100644
--- a/docs/src/content/docs/ops/entity_resolution.mdx
+++ b/docs/src/content/docs/ops/entity_resolution.mdx
@@ -147,7 +147,7 @@ pub async fn resolve_entities(
`resolve_entities` returns a `ResolvedEntities` object β€” a read-only wrapper around the dedup map with safe chain-walking:
-{/* Rust: rust/sdk/cocoindex/src/entity_resolution.rs (ResolvedEntities), rust/sdk/cocoindex/tests/entity_resolution.rs */}
+{/* Rust: rust/sdk/cocoindex/src/entity_resolution.rs (ResolvedEntities), rust/sdk/cocoindex/tests/it/entity_resolution.rs */}
<LangTabs>
<Fragment slot="python">
@@ -237,7 +237,7 @@ Pass a predicate that returns `true` for names you consider already-established
Existing canonicals are immutable. They are seeded directly as canonicals without consulting the resolver. Two existings never merge. Non-existing entities are resolved in a second pass; if they match an existing canonical, the existing always wins.
-{/* Rust: rust/sdk/cocoindex/tests/entity_resolution.rs (resolve helper) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/entity_resolution.rs (resolve helper) */}
<LangTabs>
<Fragment slot="python">
@@ -284,7 +284,7 @@ let result = entity_resolution::resolve_entities(
A softer policy: existing-canonical status breaks ties, but the resolver is always consulted. When exactly one side of a match is existing-canonical, that side wins regardless of the resolver's verdict. When both or neither are existing, the resolver decides.
-{/* Rust: rust/sdk/cocoindex/tests/entity_resolution.rs (preferred_existing_can_repoint_non_existing_candidate) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/entity_resolution.rs (preferred_existing_can_repoint_non_existing_candidate) */}
<LangTabs>
<Fragment slot="python">
@@ -336,7 +336,7 @@ Call `resolve_entities_with_events` with an `on_resolution` callback to receive
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/entity_resolution.rs (on_resolution_delivers_one_event_per_entity_in_order) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/entity_resolution.rs (on_resolution_delivers_one_event_per_entity_in_order) */}
<LangTabs>
<Fragment slot="python">
@@ -441,7 +441,7 @@ The resolver does not use litellm or `instructor`: it asks the endpoint for a JS
### Usage
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs (LlmPairResolver builders), examples/rust/conversation_to_knowledge/src/pipeline.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs (LlmPairResolver builders), examples/rust/conversation_to_knowledge/src/pipeline.rs */}
<LangTabs>
<Fragment slot="python">
@@ -518,7 +518,7 @@ The resolver takes the bare model name the endpoint expects (`gpt-4o-mini`), wit
Pass <Lang only="python">`entity_type`</Lang><Lang only="rust">`with_entity_type`</Lang> to tailor the prompt for specific entity categories:
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs (with_entity_type) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs (with_entity_type) */}
<LangTabs>
<Fragment slot="python">
@@ -585,7 +585,7 @@ After each LLM call, the response is validated:
The default retry budget is 2. If exhausted, no match is returned.
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs (with_retries) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs (with_retries) */}
<LangTabs>
<Fragment slot="python">
@@ -652,7 +652,7 @@ Each unique `(entity, candidates)` pair's decision is [memoized](../programming_
For cases where the built-in `LlmPairResolver` doesn't fit (rule-based matching, different LLM framework, etc.), implement the `PairResolver` <Lang only="python">protocol</Lang><Lang only="rust">trait</Lang>:
-{/* Rust: rust/sdk/cocoindex/tests/entity_resolution.rs (ScriptedResolver), PairDecision constructors from rust/sdk/cocoindex/src/entity_resolution.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/entity_resolution.rs (ScriptedResolver), PairDecision constructors from rust/sdk/cocoindex/src/entity_resolution.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/ops/model_apis.mdx b/docs/src/content/docs/ops/model_apis.mdx
index f4af5eae..b22627b0 100644
--- a/docs/src/content/docs/ops/model_apis.mdx
+++ b/docs/src/content/docs/ops/model_apis.mdx
@@ -18,7 +18,7 @@ The `cocoindex::ops::api` module calls hosted models over an OpenAI-compatible H
Each client defaults to the OpenAI base URL (`https://api.openai.com/v1`) and reads the API key from the `OPENAI_API_KEY` environment variable. Point a client at any compatible endpoint (OpenAI, Together, vLLM, Ollama, ...) with `with_base_url`, and give the model name that endpoint expects, with no provider prefix.
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs */}
```rust
use cocoindex::ops::api::{ApiChatClient, ApiEmbedder, ApiTranscriber, ChatMessage, LlmPairResolver};
```
@@ -42,7 +42,7 @@ cocoindex = { version = "...", features = ["embed_api"] }
### Creating an embedder
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs (ApiEmbedder builders) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs (ApiEmbedder builders) */}
```rust
use std::time::Duration;
@@ -72,7 +72,7 @@ The embedder is cheap to clone. Clones share the in-flight cap and the probed di
### Embedding text
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs (embed, embed_with_input_type, embed_batch) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs (embed, embed_with_input_type, embed_batch) */}
```rust
// In a CocoIndex function: memoized per text, batched across concurrent calls.
let embedding = embedder.embed(&ctx, "Hello, world!").await?;
@@ -113,7 +113,7 @@ async fn embed_chunks(ctx: &Ctx, chunks: Vec<String>) -> Result<Vec<Vec<f32>>> {
Concurrent `embed` calls are batched into requests of up to 64 texts, and the embedder sends as many such requests in parallel as there is work queued. `with_max_inflight_requests` caps how many requests the embedder keeps open against the backend at once. Use it for a self-hosted endpoint (Infinity, TEI, Ollama, vLLM, ...) that rejects bursts with 429s:
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs (with_max_inflight_requests) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs (with_max_inflight_requests) */}
```rust
let embedder = ApiEmbedder::new("bge-m3")
.with_base_url("http://localhost:7997")
@@ -167,7 +167,7 @@ The embedder finds its dimension by embedding a probe text (`"hello"`) once, and
### Creating a transcriber
-{/* Rust: examples/rust/audio_to_text/src/main.rs, rust/sdk/cocoindex/tests/ops_api.rs (ApiTranscriber builders) */}
+{/* Rust: examples/rust/audio_to_text/src/main.rs, rust/sdk/cocoindex/tests/it/ops_api.rs (ApiTranscriber builders) */}
```rust
use std::time::Duration;
@@ -229,7 +229,7 @@ The client has `new(model)`, `with_base_url` and `with_api_key`. Two methods sen
- `extract::<T>(&ctx, &messages)` deserializes the answer into `T` and memoizes it through the engine, keyed by the model, the endpoint and the messages. This is the way to extract structured data with an LLM inside an update.
- `chat_json(&messages)` returns the raw JSON string of the answer, with no memoization.
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs (chat_client_extract_deserializes_and_memoizes) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs (chat_client_extract_deserializes_and_memoizes) */}
```rust
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
struct Person {
@@ -248,7 +248,7 @@ The endpoint's JSON mode guarantees JSON, not a shape: the prompt has to describ
The client's memo key is the model and the endpoint (the base URL). So a `detect_change` context key that holds a client invalidates memoized work when the model or the endpoint changes:
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs */}
```rust
cocoindex::context_key!(static CHAT: ApiChatClient, detect_change);
```
@@ -259,7 +259,7 @@ Complete pipelines that extract with `ApiChatClient` are in [`examples/rust/prod
`LlmPairResolver` implements the `PairResolver` trait of [entity resolution](./entity_resolution). Given a new entity name and a list of canonical candidates, it asks the LLM whether the new name refers to one of them, and which name stays canonical.
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs (LlmPairResolver builders); with_client from examples/rust/conversation_to_knowledge/src/pipeline.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs (LlmPairResolver builders); with_client from examples/rust/conversation_to_knowledge/src/pipeline.rs */}
```rust
use cocoindex::ops::api::LlmPairResolver;
@@ -293,7 +293,7 @@ All four clients reach their endpoint the same way.
A request is bounded end to end, retries included. The default bound is 10 minutes. `ApiEmbedder` and `ApiTranscriber` take `with_timeout(Duration)`; `ApiChatClient` and `LlmPairResolver` use the default.
-{/* Rust: rust/sdk/cocoindex/tests/ops_api.rs (with_timeout) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_api.rs (with_timeout) */}
```rust
let embedder = ApiEmbedder::new("text-embedding-3-small").with_timeout(Duration::from_secs(30 * 60));
let transcriber = ApiTranscriber::new("whisper-1").with_timeout(Duration::from_secs(30 * 60));
diff --git a/docs/src/content/docs/ops/text.mdx b/docs/src/content/docs/ops/text.mdx
index c1ffbda3..d3887a30 100644
--- a/docs/src/content/docs/ops/text.mdx
+++ b/docs/src/content/docs/ops/text.mdx
@@ -8,7 +8,7 @@ description: >
The <Lang only="python">`cocoindex.ops.text`</Lang><Lang only="rust">`cocoindex::ops::text`</Lang> module provides operations for text processing.
-{/* Rust: rust/sdk/cocoindex/tests/ops_text.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_text.rs */}
<LangTabs>
<Fragment slot="python">
@@ -53,7 +53,7 @@ Detect the programming language from a filename.
**Usage:**
-{/* Rust: rust/sdk/cocoindex/src/ops/text.rs (doctest), rust/sdk/cocoindex/tests/ops_text.rs */}
+{/* Rust: rust/sdk/cocoindex/src/ops/text.rs (doctest), rust/sdk/cocoindex/tests/it/ops_text.rs */}
<LangTabs>
<Fragment slot="python">
@@ -92,7 +92,7 @@ Split text by regex separators.
**Usage:**
-{/* Rust: rust/sdk/cocoindex/tests/ops_text.rs (separator_splitter_basic, separator_splitter_keep_separator_left) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_text.rs (separator_splitter_basic, separator_splitter_keep_separator_left) */}
<LangTabs>
<Fragment slot="python">
@@ -149,7 +149,7 @@ Advanced text chunking with language awareness and syntax-aware splitting for co
**Usage:**
-{/* Rust: examples/rust/text_embedding/src/main.rs, rust/sdk/cocoindex/tests/ops_text.rs */}
+{/* Rust: examples/rust/text_embedding/src/main.rs, rust/sdk/cocoindex/tests/it/ops_text.rs */}
<LangTabs>
<Fragment slot="python">
@@ -210,7 +210,7 @@ let chunks = splitter.split("Short text.", 100);
**Language-aware code splitting:**
-{/* Rust: examples/rust/code_embedding/src/main.rs, rust/sdk/cocoindex/tests/ops_text.rs (recursive_splitter_with_languages) */}
+{/* Rust: examples/rust/code_embedding/src/main.rs, rust/sdk/cocoindex/tests/it/ops_text.rs (recursive_splitter_with_languages) */}
<LangTabs>
<Fragment slot="python">
@@ -260,7 +260,7 @@ When the same code is passed to several parse-consuming APIs (e.g. splitting *an
structural pattern matching), wrap it in a `CodeSource` so it is parsed at most once.
The `CodeSource` carries its own language, so <Lang only="python">the `language=` argument must be omitted</Lang><Lang only="rust">`config.language` is ignored</Lang>:
-{/* Rust: CodeSource::with_language and RecursiveSplitter::split_source from rust/sdk/cocoindex/src/ops/text.rs (signatures); CodePattern::compile from rust/sdk/cocoindex/tests/code.rs */}
+{/* Rust: CodeSource::with_language and RecursiveSplitter::split_source from rust/sdk/cocoindex/src/ops/text.rs (signatures); CodePattern::compile from rust/sdk/cocoindex/tests/it/code.rs */}
<LangTabs>
<Fragment slot="python">
@@ -353,7 +353,7 @@ Define custom language splitting rules.
**Usage:**
-{/* Rust: rust/sdk/cocoindex/tests/ops_text.rs (custom_language_config_and_alias) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/ops_text.rs (custom_language_config_and_alias) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/programming_guide/app.mdx b/docs/src/content/docs/programming_guide/app.mdx
index 7af49df5..491c878c 100644
--- a/docs/src/content/docs/programming_guide/app.mdx
+++ b/docs/src/content/docs/programming_guide/app.mdx
@@ -131,7 +131,7 @@ The main function is always an `async fn`. See [Async only](/docs/rust/programmi
<Lang only="python">Call `update()` to execute the pipeline. It returns an `UpdateHandle` that is also `Awaitable`, so the simplest usage stays the same:</Lang><Lang only="rust">Call `run()` or `update()` with the main function to execute the pipeline:</Lang>
-{/* Rust: rust/sdk/SHOWCASE.md "Run apps with the `cocoindex` CLI", examples/rust/text_embedding/src/main.rs, rust/sdk/cocoindex/tests/pipeline.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md "Run apps with the `cocoindex` CLI", examples/rust/text_embedding/src/main.rs, rust/sdk/cocoindex/tests/it/pipeline.rs */}
<LangTabs>
<Fragment slot="python">
@@ -192,7 +192,7 @@ let result = app.update_blocking(app_main)?;
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/fs_live.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/fs_live.rs */}
<LangTabs>
<Fragment slot="python">
@@ -235,7 +235,7 @@ Given the same logic and inputs, updates are repeatable. When logic or inputs ch
Pass `component_selector` to run a slice of the app: the components at the given paths and what it takes to reach them. Every other component stays exactly as it is. This is what you want to inspect or debug a few components without processing the rest, for example the rows on one page of an observability UI.
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/programming_guide/function.mdx b/docs/src/content/docs/programming_guide/function.mdx
index acc26d85..caf14aba 100644
--- a/docs/src/content/docs/programming_guide/function.mdx
+++ b/docs/src/content/docs/programming_guide/function.mdx
@@ -113,7 +113,7 @@ CocoIndex detects three kinds of changes:
With <Lang only="python">`memo=True`</Lang><Lang only="rust">`memo`</Lang>, the function's result is cached. On subsequent calls, if no logic, input, or read context values have changed, the cached result is reused without executing the function body β€” it carries over [target states](./target_state) declared during the function's previous invocation and returns its previous return value.
-{/* Rust: rust/sdk/SHOWCASE.md "Define functions", verified against rust/sdk/cocoindex/tests/memo_deps.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md "Define functions", verified against rust/sdk/cocoindex/tests/it/memo_deps.rs */}
<LangTabs>
<Fragment slot="python">
@@ -170,7 +170,7 @@ A memoized function:
When a memoized function's cache hits, its **body does not run** β€” and neither do any nested <Lang only="python">`@coco.fn`</Lang><Lang only="rust">`#[cocoindex::function]`</Lang> calls inside it. The cached output is replayed directly: the previous return value is returned, and any target states the function declared on its previous run are carried over.
-{/* Rust: rust/sdk/cocoindex/tests/pipeline.rs (`read_version`, `outer_read_version`) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/pipeline.rs (`read_version`, `outer_read_version`) */}
<LangTabs>
<Fragment slot="python">
@@ -291,7 +291,7 @@ A memo entry records only the logic fingerprints its writer offered when it was
The `version` <Lang only="python">parameter</Lang><Lang only="rust">argument</Lang> lets you explicitly invalidate dependent memos by bumping an integer:
-{/* Rust: rust/sdk/cocoindex_macros/src/lib.rs (`#[cocoindex::function]` doc), rust/sdk/cocoindex/tests/memo_deps.rs */}
+{/* Rust: rust/sdk/cocoindex_macros/src/lib.rs (`#[cocoindex::function]` doc), rust/sdk/cocoindex/tests/it/memo_deps.rs */}
<LangTabs>
<Fragment slot="python">
@@ -321,7 +321,7 @@ Setting `version` makes the integer the function's logic **instead of** its sour
The `deps` <Lang only="python">parameter</Lang><Lang only="rust">argument</Lang> declares external value(s) the function logic depends on but that aren't visible in its body β€” for example a prompt string or a model identifier defined at <Lang only="python">module scope</Lang><Lang only="rust">item level</Lang>. When the value changes, the function's logic fingerprint changes and dependent memos are invalidated, exactly as if the function body had been edited.
-{/* Rust: rust/sdk/SHOWCASE.md "Declare dependencies beyond the arguments", verified against rust/sdk/cocoindex/tests/memo_deps.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md "Declare dependencies beyond the arguments", verified against rust/sdk/cocoindex/tests/it/memo_deps.rs */}
<LangTabs>
<Fragment slot="python">
@@ -352,7 +352,7 @@ async fn summarize(_ctx: &Ctx, text: &str) -> Result<String> {
For multiple dependencies, pass a <Lang only="python">tuple or dict</Lang><Lang only="rust">tuple</Lang>:
-{/* Rust: rust/sdk/cocoindex/tests/memo_deps.rs (`deps = (PROMPT, ...)`) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/memo_deps.rs (`deps = (PROMPT, ...)`) */}
<LangTabs>
<Fragment slot="python">
@@ -416,7 +416,7 @@ The value is fingerprinted through its [`MemoInput`](../advanced_topics/memoizat
</Lang>
-{/* Rust: rust/sdk/SHOWCASE.md "Declare dependencies beyond the arguments", verified against rust/sdk/cocoindex/tests/memo_deps.rs (`LogicDep::new`, `ctx.use_logic_dep`) */}
+{/* Rust: rust/sdk/SHOWCASE.md "Declare dependencies beyond the arguments", verified against rust/sdk/cocoindex/tests/it/memo_deps.rs (`LogicDep::new`, `ctx.use_logic_dep`) */}
<LangTabs>
<Fragment slot="python">
@@ -497,7 +497,7 @@ Logic, arguments and context values are all known before a body runs. Some bodie
</Lang>
-{/* Rust: rust/sdk/SHOWCASE.md "Declare dependencies beyond the arguments", verified against rust/sdk/cocoindex/tests/memo_deps.rs (`DataDep::new`, `MemoStateDecision::new`, `ctx.use_data_dep`) */}
+{/* Rust: rust/sdk/SHOWCASE.md "Declare dependencies beyond the arguments", verified against rust/sdk/cocoindex/tests/it/memo_deps.rs (`DataDep::new`, `MemoStateDecision::new`, `ctx.use_data_dep`) */}
<LangTabs>
<Fragment slot="python">
@@ -602,7 +602,7 @@ The rules for an entry that recorded data dependencies:
Call it at the entry point that hands a callback down. The function that calls `logic_propagated_to_callers` is the callback's **owner**. The returned wrapper runs <Lang only="python">`fn`</Lang><Lang only="rust">`f`</Lang> as usual; afterwards the logic <Lang only="python">`fn`</Lang><Lang only="rust">`f`</Lang> offered (by its own `logic_tracking`) is recorded in **every** memo entry between the call site and the owner's frame (the owner's own entry included) whatever their `logic_tracking`. The owner's mode only decides what goes further up: with `"full"` (the default) the owner offers the callback's logic to its callers like any other dependency; with `"self"` or <Lang only="python">`None`</Lang><Lang only="rust">`"none"`</Lang> it stops there.
-{/* Rust: rust/sdk/cocoindex/tests/memo_deps.rs (`traverse`, `logic_propagated_to_callers`) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/memo_deps.rs (`traverse`, `logic_propagated_to_callers`) */}
<LangTabs>
<Fragment slot="python">
@@ -729,7 +729,7 @@ These arguments can be set on any `#[cocoindex::function]` β€” not just memoized
**Fully automatic (default)** β€” use <Lang only="python">`logic_tracking="full"`</Lang><Lang only="rust">`logic_tracking = "full"`</Lang> (or omit it) without setting `version`. Any logic change in the function or its callees invalidates dependent memos.
-{/* Rust: rust/sdk/cocoindex/tests/logic_tracking.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/logic_tracking.rs */}
<LangTabs>
<Fragment slot="python">
@@ -757,7 +757,7 @@ async fn full_explicit(_ctx: &Ctx, x: &i64) -> Result<i64> { /* ... */ }
**Manual, precise control** β€” use <Lang only="python">`logic_tracking="self"`</Lang><Lang only="rust">`logic_tracking = "self"`</Lang> with `version`. You decide what counts as a behavior change by bumping `version`, without being affected by implementation detail changes (performance optimizations, logging tweaks, refactoring, etc.).
-{/* Rust: rust/sdk/cocoindex/tests/memo_deps.rs (`caller_self`) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/memo_deps.rs (`caller_self`) */}
<LangTabs>
<Fragment slot="python">
@@ -784,7 +784,7 @@ async fn caller_self(ctx: &Ctx, test: &str, value: &str) -> Result<String> {
**Opt out of tracking** β€” use <Lang only="python">`logic_tracking=None`</Lang><Lang only="rust">`logic_tracking = "none"`</Lang> for functions with a stable contract (where logic changes don't affect output), or functions whose changes don't affect behavior (e.g., logging, performance hints). This prevents unnecessary reprocessing when only internals change.
-{/* Rust: rust/sdk/cocoindex/tests/logic_tracking.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/logic_tracking.rs */}
<LangTabs>
<Fragment slot="python">
@@ -939,7 +939,7 @@ When batching is enabled:
</Lang>
-{/* Rust: rust/sdk/SHOWCASE.md "Batch item-shaped calls", verified against rust/sdk/cocoindex_macros/src/lib.rs and rust/sdk/cocoindex/tests/batching_runner.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md "Batch item-shaped calls", verified against rust/sdk/cocoindex_macros/src/lib.rs and rust/sdk/cocoindex/tests/it/batching_runner.rs */}
<LangTabs>
<Fragment slot="python">
@@ -1085,7 +1085,7 @@ The parameter after the `&Ctx` is the batched one. Every other parameter is pass
Some batch failures depend on the batch's composition rather than any single input β€” e.g. a provider's per-request token or payload limit, or one input the provider rejects. No fixed `max_batch_size` can rule these out. <Lang only="python">When the function body hits such a failure, raise `coco.RetryWithSmallerBatch` from it: CocoIndex halves the batch and retries each half, recursing down to single items. At size 1, the wrapped original error is raised as that item's own failure β€” so one bad input fails only its own caller, while the rest of the batch still succeeds. There is no need to check the batch size before raising: at size 1 the engine simply unwraps the signal and raises the original error.</Lang><Lang only="rust">When the function body hits such a failure, return `Error::retry_with_smaller_batch(cause)` from it: CocoIndex halves the batch and retries each half, recursing down to single items. At size 1, `cause` becomes that item's own failure β€” so one bad input fails only its own caller, while the rest of the batch still succeeds. There is no need to check the batch size before returning it: at size 1 the engine simply unwraps the signal and fails that caller with `cause`.</Lang>
-{/* Rust: rust/sdk/SHOWCASE.md "Batch item-shaped calls", verified against rust/sdk/cocoindex/tests/batching_runner.rs (`Error::retry_with_smaller_batch`) */}
+{/* Rust: rust/sdk/SHOWCASE.md "Batch item-shaped calls", verified against rust/sdk/cocoindex/tests/it/batching_runner.rs (`Error::retry_with_smaller_batch`) */}
<LangTabs>
<Fragment slot="python">
@@ -1145,7 +1145,7 @@ Like batching, a runner requires an async interface, so it is always set with `@
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/batching_runner.rs (`runner = GPU`, `GPURunner::fraction`) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/batching_runner.rs (`runner = GPU`, `GPURunner::fraction`) */}
<LangTabs>
<Fragment slot="python">
@@ -1241,7 +1241,7 @@ Python's GPU subprocess mode (`COCOINDEX_RUN_GPU_IN_SUBPROCESS`) and its dedicat
You can combine batching with a runner:
-{/* Rust: rust/sdk/cocoindex/tests/batching_runner.rs (`gpu_batch`) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/batching_runner.rs (`gpu_batch`) */}
<LangTabs>
<Fragment slot="python">
diff --git a/docs/src/content/docs/programming_guide/live_mode.mdx b/docs/src/content/docs/programming_guide/live_mode.mdx
index de505df2..9abdd511 100644
--- a/docs/src/content/docs/programming_guide/live_mode.mdx
+++ b/docs/src/content/docs/programming_guide/live_mode.mdx
@@ -24,7 +24,7 @@ Two things are needed for live mode to work: the app must be **enabled** to stay
<Lang only="python">Pass `live=True` when updating the app:</Lang><Lang only="rust">Set `live: true` in the `UpdateOptions` of the update:</Lang>
-{/* Rust: examples/rust/kafka_consume/src/main.rs, rust/sdk/cocoindex/tests/fs_live.rs */}
+{/* Rust: examples/rust/kafka_consume/src/main.rs, rust/sdk/cocoindex/tests/it/fs_live.rs */}
<LangTabs>
<Fragment slot="python">
@@ -169,7 +169,7 @@ When the source isn't change-aware but you still want fresh data (say, polling a
</Lang>
-{/* Rust: rust/sdk/cocoindex/tests/live_component.rs (`ctx.auto_refresh`), verified against rust/sdk/cocoindex/src/ctx.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/live_component.rs (`ctx.auto_refresh`), verified against rust/sdk/cocoindex/src/ctx.rs */}
<LangTabs>
<Fragment slot="python">
@@ -233,7 +233,7 @@ When one part of your pipeline produces keyed data and another consumes it (with
`LiveMap<K, V>` takes any `LiveMapKey` as `K` (`String`, `i64`, `u64` or a `StableKey`):
-{/* Rust: rust/sdk/SHOWCASE.md "In-memory `LiveMap`", verified against rust/sdk/cocoindex/tests/live_map.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md "In-memory `LiveMap`", verified against rust/sdk/cocoindex/tests/it/live_map.rs */}
```rust
let lm: LiveMap<i64, String> = LiveMap::create(&ctx).await?;
lm.declare_entry(&ctx, 7, "seven".to_string())?; // producer side
diff --git a/docs/src/content/docs/programming_guide/processing_component.mdx b/docs/src/content/docs/programming_guide/processing_component.mdx
index ce67a12f..826a0120 100644
--- a/docs/src/content/docs/programming_guide/processing_component.mdx
+++ b/docs/src/content/docs/programming_guide/processing_component.mdx
@@ -24,7 +24,7 @@ A **component path** is the stable identifier for a processing component across
Component paths are hierarchical and form a tree structure. You specify child paths <Lang only="python">using `coco.component_subpath()`</Lang><Lang only="rust">as the key of each mount</Lang> with stable identifiers like string literals, file names, row keys, or entity IDs:
-{/* Rust: rust/sdk/cocoindex/tests/mount.rs (`mount!("b.md", ..)`, `ctx.with_subpath(&"process").mount(&"x", ..)`) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/mount.rs (`mount!("b.md", ..)`, `ctx.with_subpath(&"process").mount(&"x", ..)`) */}
<LangTabs>
<Fragment slot="python">
@@ -131,7 +131,7 @@ The Python API names map to the Rust forms as follows:
### Automatic subpath derivation
<Lang only="python">`mount()`, `use_mount()`, and `mount_each()` all accept an optional `ComponentSubpath` as their first argument. When omitted, the subpath is **auto-derived** from the function name using `Symbol(fn.__name__)`.</Lang><Lang only="rust">`mount!`, `use_mount!`, `mount_each!` and `use_mount_each!` all accept an optional key as their first argument. When omitted, the subpath is **auto-derived** from the function name, as a plain string key.</Lang>
-{/* Rust: rust/sdk/cocoindex_macros/src/lib.rs (`mount!` doc), rust/sdk/cocoindex/tests/mount.rs */}
+{/* Rust: rust/sdk/cocoindex_macros/src/lib.rs (`mount!` doc), rust/sdk/cocoindex/tests/it/mount.rs */}
<LangTabs>
<Fragment slot="python">
@@ -181,7 +181,7 @@ Since sibling component paths must not collide, you need an explicit key when:
Use <Lang only="python">`mount()`</Lang><Lang only="rust">`mount!`</Lang> when you don't need a return value from the processing component. It schedules the processing component to run and returns a handle:
-{/* Rust: rust/sdk/SHOWCASE.md "Mount processing components", verified against rust/sdk/cocoindex/tests/mount.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md "Mount processing components", verified against rust/sdk/cocoindex/tests/it/mount.rs */}
<LangTabs>
<Fragment slot="python">
@@ -201,7 +201,7 @@ let handle = mount!(process_file(ctx, file, target)).await?;
With an explicit subpath, for example when mounting multiple components of the same function:
-{/* Rust: rust/sdk/SHOWCASE.md "Nested component paths", verified against rust/sdk/cocoindex/tests/mount.rs (`with_subpath_nests_child_paths`) */}
+{/* Rust: rust/sdk/SHOWCASE.md "Nested component paths", verified against rust/sdk/cocoindex/tests/it/mount.rs (`with_subpath_nests_child_paths`) */}
<LangTabs>
<Fragment slot="python">
@@ -230,7 +230,7 @@ The macro reads the parent context from the `ctx` argument of the call, so bind
The handle provides a method you can call if you need to wait until the processing component is fully ***ready*** β€” meaning all its target states have been applied to external systems and all components in its sub-paths are ready:
-{/* Rust: rust/sdk/cocoindex/tests/mount.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/mount.rs */}
<LangTabs>
<Fragment slot="python">
@@ -258,7 +258,7 @@ You usually only need to call `ready()` when you have logic that depends on the
Use <Lang only="python">`use_mount()`</Lang><Lang only="rust">`use_mount!`</Lang> when you need the processing component's return value. It mounts the component, waits until it's ready, and returns the value directly:
-{/* Rust: rust/sdk/SHOWCASE.md "Mount processing components", verified against rust/sdk/cocoindex/tests/memo_deps.rs (`use_mount!`) */}
+{/* Rust: rust/sdk/SHOWCASE.md "Mount processing components", verified against rust/sdk/cocoindex/tests/it/memo_deps.rs (`use_mount!`) */}
<LangTabs>
<Fragment slot="python">
@@ -515,7 +515,7 @@ You can use `ctx.with_subpath()` to create nested paths without repeating common
</Lang>
-{/* Rust: rust/sdk/SHOWCASE.md "Nested component paths", verified against rust/sdk/cocoindex/tests/mount.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md "Nested component paths", verified against rust/sdk/cocoindex/tests/it/mount.rs */}
<LangTabs>
<Fragment slot="python">
@@ -732,7 +732,7 @@ This pattern ensures that CocoIndex can track component relationships and target
The component context is the `Ctx` value your function receives, so it goes wherever you pass it. A `Ctx` is `Clone`: pass a clone into a spawned task, and CocoIndex still tracks component relationships and target state ownership there:
-{/* Rust: rust/sdk/cocoindex/tests/batching_runner.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/batching_runner.rs */}
```rust
let ctx = ctx.clone();
tokio::spawn(async move { limited(&ctx, item).await })
diff --git a/docs/src/content/docs/programming_guide/sdk_overview.mdx b/docs/src/content/docs/programming_guide/sdk_overview.mdx
index 58dd1312..39a94b64 100644
--- a/docs/src/content/docs/programming_guide/sdk_overview.mdx
+++ b/docs/src/content/docs/programming_guide/sdk_overview.mdx
@@ -228,7 +228,7 @@ app.update_blocking(report_to_stdout=True)
The Rust API is async and runs on Tokio. There are no sync variants of the orchestration APIs: `ctx.mount`, `ctx.scope`, `ctx.mount_each`, `ctx.map` and the mount macros are all `async`, and a `#[cocoindex::function]` body is an `async fn`. The entry points have `_blocking` forms for code that owns no runtime: `App::open_blocking`, `app.update_blocking`, `app.drop_state_blocking`, `EnvironmentBuilder::build_blocking`. They build a runtime of their own and panic inside one, so use the async forms inside `#[tokio::main]` or `#[cocoindex::main]`:
-{/* Rust: rust/sdk/SHOWCASE.md "Open and run an app" (verified against rust/sdk/cocoindex/src/app.rs), rust/sdk/cocoindex/tests/pipeline.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md "Open and run an app" (verified against rust/sdk/cocoindex/src/app.rs), rust/sdk/cocoindex/tests/it/pipeline.rs */}
```rust
use cocoindex::prelude::*;
diff --git a/docs/src/content/docs/programming_guide/serialization.mdx b/docs/src/content/docs/programming_guide/serialization.mdx
index b406a353..f531b14d 100644
--- a/docs/src/content/docs/programming_guide/serialization.mdx
+++ b/docs/src/content/docs/programming_guide/serialization.mdx
@@ -183,7 +183,7 @@ Memo keys (function arguments, `deps` values, change-detected context values) ar
Connector rows are `serde::Serialize` structs with `#[derive(SchemaFields)]`. The connector's `TableSchema::from_row::<Row>(primary_key)` derives the columns from the struct: an `Option<T>` field is a nullable column, every other field is `NOT NULL`.
-{/* Rust: rust/sdk/cocoindex/tests/schema_from_row.rs (`postgres_from_row_matches_explicit_schema`), rust/sdk/SHOWCASE.md "Derive connector schemas from row types" (verified) */}
+{/* Rust: rust/sdk/cocoindex/tests/it/schema_from_row.rs (`postgres_from_row_matches_explicit_schema`), rust/sdk/SHOWCASE.md "Derive connector schemas from row types" (verified) */}
```rust
use cocoindex::SchemaFields;
use cocoindex::connectors::postgres::TableSchema;
diff --git a/docs/src/content/docs/programming_guide/target_state.mdx b/docs/src/content/docs/programming_guide/target_state.mdx
index 42a99b88..00b86027 100644
--- a/docs/src/content/docs/programming_guide/target_state.mdx
+++ b/docs/src/content/docs/programming_guide/target_state.mdx
@@ -71,7 +71,7 @@ Connectors provide convenience methods that mount the container and return a rea
For simple cases where each processing component writes a single file, you can declare the file directly:
-{/* Rust: rust/sdk/cocoindex/tests/fs_target.rs */}
+{/* Rust: rust/sdk/cocoindex/tests/it/fs_target.rs */}
<LangTabs>
<Fragment slot="python">
@@ -272,7 +272,7 @@ The state database records every tracked target state with the component that ow
From code, `cocoindex::inspect` reads the same records from an `App`, or from an `Environment` and an app name with the `_by_name` functions:
-{/* Rust: rust/sdk/SHOWCASE.md "Inspect stored state", verified against rust/sdk/cocoindex/tests/inspect.rs */}
+{/* Rust: rust/sdk/SHOWCASE.md "Inspect stored state", verified against rust/sdk/cocoindex/tests/it/inspect.rs */}
```rust
use cocoindex::inspect;
use futures::TryStreamExt;
@@ -301,4 +301,4 @@ For cases where connector-specific APIs don't cover your needs, CocoIndex provid
- `declare_target_state()` β€” declare a leaf target state
- `declare_target_state_with_child()` β€” declare a target state that provides child target states
-These are exported from `cocoindex` and used internally by connectors.<Lang only="rust"> A leaf declaration reads `declare_target_state(ctx, provider.target_state(key, value))`. `register_root_target_states_provider(ctx, name, handler)` registers a `TargetHandler` and returns the provider; the tests in `rust/sdk/cocoindex/tests/mount.rs` show a minimal handler.</Lang> For defining custom targets, see [Custom Target States Connector](../advanced_topics/custom_target_connector).
+These are exported from `cocoindex` and used internally by connectors.<Lang only="rust"> A leaf declaration reads `declare_target_state(ctx, provider.target_state(key, value))`. `register_root_target_states_provider(ctx, name, handler)` registers a `TargetHandler` and returns the provider; the tests in `rust/sdk/cocoindex/tests/it/mount.rs` show a minimal handler.</Lang> For defining custom targets, see [Custom Target States Connector](../advanced_topics/custom_target_connector).
diff --git a/rust/sdk/cocoindex/Cargo.toml b/rust/sdk/cocoindex/Cargo.toml
index 31ee26dd..d5cb35cd 100644
--- a/rust/sdk/cocoindex/Cargo.toml
+++ b/rust/sdk/cocoindex/Cargo.toml
@@ -353,28 +353,13 @@ required-features = ["bench-support"]
name = "entity_resolution"
harness = false
-# These tests build their environment with `cocoindex::testing`, so they need
-# the `testing` feature; without it Cargo skips them instead of failing to
-# compile (`cargo check --all-targets` with no features). A self
-# dev-dependency would enable the feature too, but it links the crate twice
-# into its own unit tests and breaks the `linkme` registry (duplicate
+# `deadline` builds its environment with `cocoindex::testing`, so it needs the
+# `testing` feature; without it Cargo skips the test instead of failing to
+# compile (`cargo check --all-targets` with no features). The modules of
+# `tests/it` that need the feature say so themselves, with `#![cfg(...)]`. A
+# self dev-dependency would enable the feature too, but it links the crate
+# twice into its own unit tests and breaks the `linkme` registry (duplicate
# `COCO_FN_LOGIC`).
-[[test]]
-name = "batching_runner"
-required-features = ["testing"]
-
-[[test]]
-name = "batching_edges"
-required-features = ["testing"]
-
[[test]]
name = "deadline"
required-features = ["testing"]
-
-[[test]]
-name = "detailed_stats"
-required-features = ["testing"]
-
-[[test]]
-name = "mount"
-required-features = ["testing"]
diff --git a/rust/sdk/cocoindex/tests/admission.rs b/rust/sdk/cocoindex/tests/it/admission.rs
similarity index 90%
rename from rust/sdk/cocoindex/tests/admission.rs
rename to rust/sdk/cocoindex/tests/it/admission.rs
index c092ae49..33bebb63 100644
--- a/rust/sdk/cocoindex/tests/admission.rs
+++ b/rust/sdk/cocoindex/tests/it/admission.rs
@@ -2,11 +2,9 @@
//! Python, or the builder's `max_inflight_components`. The environment
//! variable is covered by `admission_env.rs`, which owns its process.
//!
-//! cargo test -p cocoindex --test admission
+//! cargo test -p cocoindex --test it admission::
-mod admission_common;
-
-use admission_common::assert_admits;
+use crate::admission_common::assert_admits;
use cocoindex::Environment;
#[tokio::test]
diff --git a/rust/sdk/cocoindex/tests/amazon_s3_source.rs b/rust/sdk/cocoindex/tests/it/amazon_s3_source.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/amazon_s3_source.rs
rename to rust/sdk/cocoindex/tests/it/amazon_s3_source.rs
index d5c154aa..68c04c72 100644
--- a/rust/sdk/cocoindex/tests/amazon_s3_source.rs
+++ b/rust/sdk/cocoindex/tests/it/amazon_s3_source.rs
@@ -5,7 +5,7 @@
//! localhost (and the standard AWS env for creds/region):
//! AWS_ENDPOINT_URL=http://localhost:9000 AWS_REGION=us-east-1 \
//! AWS_ACCESS_KEY_ID=minioadmin AWS_SECRET_ACCESS_KEY=minioadmin \
-//! cargo test -p cocoindex --features amazon_s3 --test amazon_s3_source
+//! cargo test -p cocoindex --features amazon_s3 --test it amazon_s3_source::
#![cfg(feature = "amazon_s3")]
use std::sync::Arc;
diff --git a/rust/sdk/cocoindex/tests/azure_blob_source.rs b/rust/sdk/cocoindex/tests/it/azure_blob_source.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/azure_blob_source.rs
rename to rust/sdk/cocoindex/tests/it/azure_blob_source.rs
index 87d119a4..bbde1476 100644
--- a/rust/sdk/cocoindex/tests/azure_blob_source.rs
+++ b/rust/sdk/cocoindex/tests/it/azure_blob_source.rs
@@ -10,7 +10,7 @@
//! docker run -d -p 10000:10000 mcr.microsoft.com/azure-storage/azurite \
//! azurite-blob --blobHost 0.0.0.0
//! AZURITE_BLOB_ENDPOINT=http://127.0.0.1:10000/devstoreaccount1 \
-//! cargo test -p cocoindex --features azure_blob --test azure_blob_source
+//! cargo test -p cocoindex --features azure_blob --test it azure_blob_source::
#![cfg(feature = "azure_blob")]
use std::collections::BTreeMap;
diff --git a/rust/sdk/cocoindex/tests/batching_edges.rs b/rust/sdk/cocoindex/tests/it/batching_edges.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/batching_edges.rs
rename to rust/sdk/cocoindex/tests/it/batching_edges.rs
index 24aa1cc3..7073bca0 100644
--- a/rust/sdk/cocoindex/tests/batching_edges.rs
+++ b/rust/sdk/cocoindex/tests/it/batching_edges.rs
@@ -2,6 +2,7 @@
//! `max_batch_size`, bodies that break their contract (wrong output count,
//! panics, errors), callers that go away while their item is queued, and
//! memoization with the same item twice in one batch.
+#![cfg(feature = "testing")]
use std::collections::BTreeSet;
use std::sync::Mutex;
diff --git a/rust/sdk/cocoindex/tests/batching_runner.rs b/rust/sdk/cocoindex/tests/it/batching_runner.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/batching_runner.rs
rename to rust/sdk/cocoindex/tests/it/batching_runner.rs
index 85baf8f1..e1d9b478 100644
--- a/rust/sdk/cocoindex/tests/batching_runner.rs
+++ b/rust/sdk/cocoindex/tests/it/batching_runner.rs
@@ -1,5 +1,6 @@
//! End-to-end tests for batch splitting (`Error::retry_with_smaller_batch`)
//! and the GPU runner (`runner = ...`) in `#[cocoindex::function]`.
+#![cfg(feature = "testing")]
use std::num::NonZeroUsize;
use std::sync::atomic::{AtomicUsize, Ordering};
diff --git a/rust/sdk/cocoindex/tests/bigquery_target.rs b/rust/sdk/cocoindex/tests/it/bigquery_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/bigquery_target.rs
rename to rust/sdk/cocoindex/tests/it/bigquery_target.rs
index 428a9e53..b2d0e199 100644
--- a/rust/sdk/cocoindex/tests/bigquery_target.rs
+++ b/rust/sdk/cocoindex/tests/it/bigquery_target.rs
@@ -11,7 +11,7 @@
//! `BIGQUERY_PROJECT` and `BIGQUERY_DATASET` are set (credentials come from
//! `GOOGLE_APPLICATION_CREDENTIALS` or Application Default Credentials):
//! BIGQUERY_PROJECT=my-proj BIGQUERY_DATASET=cocoindex_test \
-//! cargo test -p cocoindex --features bigquery --test bigquery_target
+//! cargo test -p cocoindex --features bigquery --test it bigquery_target::
#![cfg(feature = "bigquery")]
use std::path::Path;
diff --git a/rust/sdk/cocoindex/tests/code.rs b/rust/sdk/cocoindex/tests/it/code.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/code.rs
rename to rust/sdk/cocoindex/tests/it/code.rs
diff --git a/rust/sdk/cocoindex/tests/code_fuzz.rs b/rust/sdk/cocoindex/tests/it/code_fuzz.rs
similarity index 98%
rename from rust/sdk/cocoindex/tests/code_fuzz.rs
rename to rust/sdk/cocoindex/tests/it/code_fuzz.rs
index e70cb6f0..87f65a43 100644
--- a/rust/sdk/cocoindex/tests/code_fuzz.rs
+++ b/rust/sdk/cocoindex/tests/it/code_fuzz.rs
@@ -4,7 +4,7 @@
//! that agree with its byte range, and `render_match` must partition its text.
//!
//! Seeded, so every run checks the same inputs. Run with:
-//! `cargo test -p cocoindex --features code_match --test code_fuzz`.
+//! `cargo test -p cocoindex --features code_match --test it code_fuzz::`.
#![cfg(feature = "code_match")]
use cocoindex::ops::code::{CodeAst, render_match};
diff --git a/rust/sdk/cocoindex/tests/component_selector.rs b/rust/sdk/cocoindex/tests/it/component_selector.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/component_selector.rs
rename to rust/sdk/cocoindex/tests/it/component_selector.rs
index bb22cc0b..9b0dae61 100644
--- a/rust/sdk/cocoindex/tests/component_selector.rs
+++ b/rust/sdk/cocoindex/tests/it/component_selector.rs
@@ -526,7 +526,7 @@ impl TargetHandler<()> for TableHandler {
_prev_may_be_missing: bool,
) -> Result<Option<TargetReconcileOutput<TableAction, ()>>> {
// Always emits for a declared table: its action is what readies the
- // rows (as in tests/preview.rs).
+ // rows (as in tests/it/preview.rs).
Ok(desired.map(|()| {
let table = TableAction {
name: key_str(&key),
diff --git a/rust/sdk/cocoindex/tests/component_selector_memo_key.rs b/rust/sdk/cocoindex/tests/it/component_selector_memo_key.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/component_selector_memo_key.rs
rename to rust/sdk/cocoindex/tests/it/component_selector_memo_key.rs
diff --git a/rust/sdk/cocoindex/tests/detailed_stats.rs b/rust/sdk/cocoindex/tests/it/detailed_stats.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/detailed_stats.rs
rename to rust/sdk/cocoindex/tests/it/detailed_stats.rs
index 8758ac7d..78e06075 100644
--- a/rust/sdk/cocoindex/tests/detailed_stats.rs
+++ b/rust/sdk/cocoindex/tests/it/detailed_stats.rs
@@ -1,5 +1,6 @@
//! Tests for the detailed per-component stats surface (`ComponentStats`,
//! `UpdateStats`, `UpdateStatus`) β€” Python parity with `cocoindex.UpdateStats`.
+#![cfg(feature = "testing")]
use cocoindex::testing::TestEnv;
use cocoindex::{App, ComponentStats, UpdateStats, UpdateStatus};
diff --git a/rust/sdk/cocoindex/tests/doris_target.rs b/rust/sdk/cocoindex/tests/it/doris_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/doris_target.rs
rename to rust/sdk/cocoindex/tests/it/doris_target.rs
index c1e681e8..a561dc95 100644
--- a/rust/sdk/cocoindex/tests/doris_target.rs
+++ b/rust/sdk/cocoindex/tests/it/doris_target.rs
@@ -5,7 +5,7 @@
//! pre-created database:
//! DORIS_FE_HOST=localhost DORIS_HTTP_PORT=8030 DORIS_QUERY_PORT=9030 \
//! DORIS_DATABASE=cocoindex_test \
-//! cargo test -p cocoindex --features doris --test doris_target
+//! cargo test -p cocoindex --features doris --test it doris_target::
//!
//! These exercise the full reconcile lifecycle against a real cluster: table
//! DDL (DUPLICATE KEY model), Stream Load row ingestion (with the FE→BE 307
diff --git a/rust/sdk/cocoindex/tests/drop_state.rs b/rust/sdk/cocoindex/tests/it/drop_state.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/drop_state.rs
rename to rust/sdk/cocoindex/tests/it/drop_state.rs
diff --git a/rust/sdk/cocoindex/tests/entity_resolution.rs b/rust/sdk/cocoindex/tests/it/entity_resolution.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/entity_resolution.rs
rename to rust/sdk/cocoindex/tests/it/entity_resolution.rs
diff --git a/rust/sdk/cocoindex/tests/fs_live.rs b/rust/sdk/cocoindex/tests/it/fs_live.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/fs_live.rs
rename to rust/sdk/cocoindex/tests/it/fs_live.rs
diff --git a/rust/sdk/cocoindex/tests/fs_live_battle.rs b/rust/sdk/cocoindex/tests/it/fs_live_battle.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/fs_live_battle.rs
rename to rust/sdk/cocoindex/tests/it/fs_live_battle.rs
index e8e49981..078e897b 100644
--- a/rust/sdk/cocoindex/tests/fs_live_battle.rs
+++ b/rust/sdk/cocoindex/tests/it/fs_live_battle.rs
@@ -8,7 +8,7 @@
//! directory through a `DirTarget`, so a test checks the end state on disk:
//! what the pipeline wrote, updated and removed.
//!
-//! cargo test -p cocoindex --features fs_live --test fs_live_battle
+//! cargo test -p cocoindex --features fs_live --test it fs_live_battle::
#![cfg(feature = "fs_live")]
use std::collections::BTreeMap;
diff --git a/rust/sdk/cocoindex/tests/fs_live_restart.rs b/rust/sdk/cocoindex/tests/it/fs_live_restart.rs
similarity index 98%
rename from rust/sdk/cocoindex/tests/fs_live_restart.rs
rename to rust/sdk/cocoindex/tests/it/fs_live_restart.rs
index 64b254b1..908fe004 100644
--- a/rust/sdk/cocoindex/tests/fs_live_restart.rs
+++ b/rust/sdk/cocoindex/tests/it/fs_live_restart.rs
@@ -14,7 +14,7 @@
//! with `write_committed_state`, is read with `read_committed_state` on the
//! next run.
//!
-//! cargo test -p cocoindex --features fs_live --test fs_live_restart
+//! cargo test -p cocoindex --features fs_live --test it fs_live_restart::
#![cfg(all(feature = "fs_live", unix))]
use std::collections::BTreeMap;
@@ -173,7 +173,7 @@ async fn killed_live_app_restarts_without_lost_or_duplicated_work() {
let mut child = std::process::Command::new(std::env::current_exe().unwrap())
.args([
"--exact",
- "restart_child_process",
+ "fs_live_restart::restart_child_process",
"--ignored",
"--nocapture",
])
diff --git a/rust/sdk/cocoindex/tests/fs_target.rs b/rust/sdk/cocoindex/tests/it/fs_target.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/fs_target.rs
rename to rust/sdk/cocoindex/tests/it/fs_target.rs
diff --git a/rust/sdk/cocoindex/tests/gdrive_source.rs b/rust/sdk/cocoindex/tests/it/gdrive_source.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/gdrive_source.rs
rename to rust/sdk/cocoindex/tests/it/gdrive_source.rs
diff --git a/rust/sdk/cocoindex/tests/gdrive_user_account.rs b/rust/sdk/cocoindex/tests/it/gdrive_user_account.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/gdrive_user_account.rs
rename to rust/sdk/cocoindex/tests/it/gdrive_user_account.rs
diff --git a/rust/sdk/cocoindex/tests/graph_target.rs b/rust/sdk/cocoindex/tests/it/graph_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/graph_target.rs
rename to rust/sdk/cocoindex/tests/it/graph_target.rs
index 4bd0c5a7..4d5f945d 100644
--- a/rust/sdk/cocoindex/tests/graph_target.rs
+++ b/rust/sdk/cocoindex/tests/it/graph_target.rs
@@ -5,7 +5,7 @@
//! is unset. Run with:
//! NEO4J_URI=bolt://localhost:7687 NEO4J_PASSWORD=cocoindex \
//! FALKORDB_URI=falkor://localhost:6379 \
-//! cargo test -p cocoindex --features neo4j,falkordb --test graph_target
+//! cargo test -p cocoindex --features neo4j,falkordb --test it graph_target::
//!
//! The live tests verify that the server accepts what the targets emit, and the
//! Neo4j one reads the result back; the exact Cypher is asserted by the unit
diff --git a/rust/sdk/cocoindex/tests/graph_vector_index.rs b/rust/sdk/cocoindex/tests/it/graph_vector_index.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/graph_vector_index.rs
rename to rust/sdk/cocoindex/tests/it/graph_vector_index.rs
index b497d69c..e00554a8 100644
--- a/rust/sdk/cocoindex/tests/graph_vector_index.rs
+++ b/rust/sdk/cocoindex/tests/it/graph_vector_index.rs
@@ -4,7 +4,7 @@
//! server is unreachable. Run with:
//! NEO4J_URI=bolt://localhost:7687 NEO4J_PASSWORD=cocoindex \
//! FALKORDB_URI=falkor://localhost:6379 \
-//! cargo test -p cocoindex --features neo4j,falkordb --test graph_vector_index
+//! cargo test -p cocoindex --features neo4j,falkordb --test it graph_vector_index::
//!
//! Verifies that `declare_vector_index` emits Cypher the real server accepts:
//! a node table + vector index is created on the first run, and the index is
diff --git a/rust/sdk/cocoindex/tests/iggy_target.rs b/rust/sdk/cocoindex/tests/it/iggy_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/iggy_target.rs
rename to rust/sdk/cocoindex/tests/it/iggy_target.rs
index 70c36001..7e418f4f 100644
--- a/rust/sdk/cocoindex/tests/iggy_target.rs
+++ b/rust/sdk/cocoindex/tests/it/iggy_target.rs
@@ -3,7 +3,7 @@
//! Skips gracefully when `IGGY_CONNECTION_STRING` is unset. Run with an Apache
//! Iggy server on localhost:
//! IGGY_CONNECTION_STRING=iggy://iggy:iggy@localhost:8090 \
-//! cargo test -p cocoindex --features iggy --test iggy_target
+//! cargo test -p cocoindex --features iggy --test it iggy_target::
//!
//! Strategy: an Iggy topic is an append-only log, so "did we re-send?" is
//! observable by polling the topic back and counting messages. We run a real
diff --git a/rust/sdk/cocoindex/tests/inspect.rs b/rust/sdk/cocoindex/tests/it/inspect.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/inspect.rs
rename to rust/sdk/cocoindex/tests/it/inspect.rs
diff --git a/rust/sdk/cocoindex/tests/kafka_target.rs b/rust/sdk/cocoindex/tests/it/kafka_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/kafka_target.rs
rename to rust/sdk/cocoindex/tests/it/kafka_target.rs
index 6756dae3..57e386ab 100644
--- a/rust/sdk/cocoindex/tests/kafka_target.rs
+++ b/rust/sdk/cocoindex/tests/it/kafka_target.rs
@@ -3,7 +3,7 @@
//! Skips gracefully when `KAFKA_BOOTSTRAP_SERVERS` is unset. Run with a broker
//! (Apache Kafka or Redpanda) on localhost:
//! KAFKA_BOOTSTRAP_SERVERS=localhost:9092 \
-//! cargo test -p cocoindex --features kafka --test kafka_target
+//! cargo test -p cocoindex --features kafka --test it kafka_target::
//!
//! Strategy: because a Kafka topic is an append-only log, "did we re-produce?"
//! is observable via the high-watermark / record count. We run a real
diff --git a/rust/sdk/cocoindex/tests/lancedb_battle.rs b/rust/sdk/cocoindex/tests/it/lancedb_battle.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/lancedb_battle.rs
rename to rust/sdk/cocoindex/tests/it/lancedb_battle.rs
index 24539ec1..59adf618 100644
--- a/rust/sdk/cocoindex/tests/lancedb_battle.rs
+++ b/rust/sdk/cocoindex/tests/it/lancedb_battle.rs
@@ -5,7 +5,7 @@
//!
//! Hermetic (a LanceDB database in a temp directory):
//!
-//! cargo test -p cocoindex --features lancedb,testing --test lancedb_battle
+//! cargo test -p cocoindex --features lancedb,testing --test it lancedb_battle::
#![cfg(feature = "lancedb")]
use std::sync::Arc;
@@ -541,7 +541,7 @@ async fn batches_around_the_chunk_boundaries() -> Result<()> {
/// A large run: 100 000 rows inserted, half updated, half deleted. Slow, so
/// ignored by default:
///
-/// cargo test -p cocoindex --features lancedb,testing --test lancedb_battle \
+/// cargo test -p cocoindex --features lancedb,testing --test it lancedb_battle:: \
/// -- --ignored large_run
#[tokio::test]
#[ignore = "soak: 100k rows"]
diff --git a/rust/sdk/cocoindex/tests/lancedb_target.rs b/rust/sdk/cocoindex/tests/it/lancedb_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/lancedb_target.rs
rename to rust/sdk/cocoindex/tests/it/lancedb_target.rs
index 92c15a33..b854ce32 100644
--- a/rust/sdk/cocoindex/tests/lancedb_target.rs
+++ b/rust/sdk/cocoindex/tests/it/lancedb_target.rs
@@ -5,7 +5,7 @@
//! managed-target reconcile semantics (create, upsert, skip-unchanged, search,
//! delete-orphan).
//!
-//! cargo test -p cocoindex --features lancedb --test lancedb_target
+//! cargo test -p cocoindex --features lancedb --test it lancedb_target::
#![cfg(feature = "lancedb")]
use cocoindex::connectors::lancedb::{self, ColumnDef, ColumnType, LanceDatabase, TableSchema};
diff --git a/rust/sdk/cocoindex/tests/live_battle.rs b/rust/sdk/cocoindex/tests/it/live_battle.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/live_battle.rs
rename to rust/sdk/cocoindex/tests/it/live_battle.rs
index 41e79d4d..957d5f46 100644
--- a/rust/sdk/cocoindex/tests/live_battle.rs
+++ b/rust/sdk/cocoindex/tests/it/live_battle.rs
@@ -8,7 +8,7 @@
//! hands it out through a channel and then waits, so each test can issue
//! exactly the sequence of operations it wants to probe.
//!
-//! cargo test -p cocoindex --test live_battle
+//! cargo test -p cocoindex --test it live_battle::
use std::collections::BTreeMap;
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
diff --git a/rust/sdk/cocoindex/tests/live_component.rs b/rust/sdk/cocoindex/tests/it/live_component.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/live_component.rs
rename to rust/sdk/cocoindex/tests/it/live_component.rs
index c84f6a96..8a5948ea 100644
--- a/rust/sdk/cocoindex/tests/live_component.rs
+++ b/rust/sdk/cocoindex/tests/it/live_component.rs
@@ -5,7 +5,7 @@
//! `Ctx::mount_live_with_handler`, `Ctx::mount_each_live`,
//! `LiveComponentOperator`, `LiveMapView` / `LiveMapSubscriber`).
//!
-//! cargo test -p cocoindex --test live_component
+//! cargo test -p cocoindex --test it live_component::
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
@@ -20,7 +20,7 @@ use cocoindex::{
use tokio::sync::Notify;
// ---------------------------------------------------------------------------
-// Shared helpers (mirrors tests/target_state.rs)
+// Shared helpers (mirrors tests/it/target_state.rs)
// ---------------------------------------------------------------------------
type Log = Arc<Mutex<Vec<String>>>;
diff --git a/rust/sdk/cocoindex/tests/live_map.rs b/rust/sdk/cocoindex/tests/it/live_map.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/live_map.rs
rename to rust/sdk/cocoindex/tests/it/live_map.rs
diff --git a/rust/sdk/cocoindex/tests/live_soak.rs b/rust/sdk/cocoindex/tests/it/live_soak.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/live_soak.rs
rename to rust/sdk/cocoindex/tests/it/live_soak.rs
index e7ea145d..4f6b9d78 100644
--- a/rust/sdk/cocoindex/tests/live_soak.rs
+++ b/rust/sdk/cocoindex/tests/it/live_soak.rs
@@ -1,7 +1,7 @@
//! Long live-mode runs, behind `#[ignore]` (minutes, and they measure the
//! process's memory, so run them one at a time in release mode):
//!
-//! cargo test -p cocoindex --features fs_live --release --test live_soak \
+//! cargo test -p cocoindex --features fs_live --release --test it live_soak:: \
//! -- --ignored --test-threads=1 --nocapture
//!
//! * `soak_100k_events_keep_memory_and_queue_bounded`: 100k change events
diff --git a/rust/sdk/cocoindex/tests/live_stream.rs b/rust/sdk/cocoindex/tests/it/live_stream.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/live_stream.rs
rename to rust/sdk/cocoindex/tests/it/live_stream.rs
diff --git a/rust/sdk/cocoindex/tests/logic_tracking.rs b/rust/sdk/cocoindex/tests/it/logic_tracking.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/logic_tracking.rs
rename to rust/sdk/cocoindex/tests/it/logic_tracking.rs
diff --git a/rust/sdk/cocoindex/tests/it/main.rs b/rust/sdk/cocoindex/tests/it/main.rs
new file mode 100644
index 00000000..615fa6c0
--- /dev/null
+++ b/rust/sdk/cocoindex/tests/it/main.rs
@@ -0,0 +1,154 @@
+//! The SDK's integration tests, as one test binary with a module per area.
+//!
+//! Cargo builds every file directly under `tests/` as a test binary of its
+//! own, and each of them links the whole SDK with every enabled connector:
+//! several GB of memory per link, and Cargo runs as many links at a time as
+//! the machine has cores. As modules of one crate, the tests link once.
+//!
+//! Run one area by its module name:
+//!
+//! cargo test -p cocoindex --features lancedb --test it lancedb_target::
+//!
+//! A new test file goes here, with its `mod` line below. It is a binary of
+//! its own, directly under `tests/`, only when it needs a process of its own;
+//! [`OWN_PROCESS_TESTS`] lists those, each with what it needs one for.
+
+mod admission;
+// Shared with `tests/admission_env.rs`, which is a binary of its own.
+#[path = "../admission_common/mod.rs"]
+mod admission_common;
+mod amazon_s3_source;
+mod azure_blob_source;
+mod batching_edges;
+mod batching_runner;
+mod bigquery_target;
+mod code;
+mod code_fuzz;
+mod component_selector;
+mod component_selector_memo_key;
+mod detailed_stats;
+mod doris_target;
+mod drop_state;
+mod entity_resolution;
+mod fs_live;
+mod fs_live_battle;
+mod fs_live_restart;
+mod fs_target;
+mod gdrive_source;
+mod gdrive_user_account;
+mod graph_target;
+mod graph_vector_index;
+mod iggy_target;
+mod inspect;
+mod kafka_target;
+mod lancedb_battle;
+mod lancedb_target;
+mod live_battle;
+mod live_component;
+mod live_map;
+mod live_soak;
+mod live_stream;
+mod logic_tracking;
+mod memo_clone;
+mod memo_deps;
+mod model_based;
+mod mount;
+mod mount_each;
+mod oci_live;
+mod ops_api;
+mod ops_text;
+mod ops_text_fuzz;
+mod pipeline;
+mod postgres_source;
+mod preview;
+mod qdrant_target;
+mod schema_from_row;
+mod snowflake_target;
+mod surrealdb_scenarios;
+mod surrealdb_target;
+mod target_state;
+mod turbopuffer_target;
+mod user_state;
+mod valkey_target;
+mod zvec_battle;
+mod zvec_target;
+
+/// The test files that are binaries of their own, directly under `tests/`.
+/// Each one changes or reads something the whole process shares, so it cannot
+/// run beside the other tests.
+const OWN_PROCESS_TESTS: &[&str] = &[
+ // Sets `COCOINDEX_MAX_INFLIGHT_COMPONENTS`.
+ "admission_env",
+ // Sets the `AZURE_*` variables of the credential it resolves.
+ "azure_blob_token",
+ // Drives the engine's deadline test clock.
+ "deadline",
+ // Stop their live runs through the engine's cancellation of every run.
+ "iggy_source",
+ "kafka_source",
+ // Sets `HF_ENDPOINT` and `HF_HOME`.
+ "ops_sentence_transformers",
+ // Record the SQL statements `sqlx` runs through the process's `tracing`
+ // subscriber, which is the engine's once any other test has started the
+ // engine.
+ "postgres_target",
+ "postgres_target_edge",
+ // Reads the registries of every `#[cocoindex::app]` and
+ // `#[cocoindex::lifespan]` linked into the binary, and sets `COCOINDEX_DB`.
+ "registered",
+ // Registers two apps with one name, which no other binary may hold.
+ "registered_dup",
+ // Needs a binary that registers no lifespan; sets `COCOINDEX_DB` and the
+ // working directory.
+ "registered_nodb",
+ // Record the SQL statements `sqlx` runs, as `postgres_target` does.
+ "sqlite_target",
+ "sqlite_target_edge",
+];
+
+/// A module under `tests/it/` that no `mod` line names is never compiled, and a
+/// new test directly under `tests/` is one more binary to link; neither shows
+/// up as a failure by itself.
+#[test]
+fn every_test_file_is_a_module_here_or_a_listed_binary() {
+ use std::path::{Path, PathBuf};
+
+ let tests = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests");
+ let entries = |dir: &Path| -> Vec<PathBuf> {
+ let mut paths: Vec<PathBuf> = std::fs::read_dir(dir)
+ .unwrap()
+ .map(|entry| entry.unwrap().path())
+ .collect();
+ paths.sort();
+ paths
+ };
+ let is_rust_file = |path: &Path| path.extension().is_some_and(|ext| ext == "rs");
+ let name = |path: &Path| path.file_stem().unwrap().to_str().unwrap().to_owned();
+
+ // A module of this crate is `x.rs` or `x/mod.rs`.
+ let main = include_str!("main.rs");
+ let unnamed: Vec<String> = entries(&tests.join("it"))
+ .iter()
+ .filter(|path| is_rust_file(path) || path.join("mod.rs").exists())
+ .map(|path| name(path))
+ .filter(|module| module != "main")
+ .filter(|module| !main.lines().any(|line| line == format!("mod {module};")))
+ .collect();
+ assert!(
+ unnamed.is_empty(),
+ "tests/it/main.rs has no `mod` line for {unnamed:?}, so their tests never run"
+ );
+
+ // A test binary is `x.rs` or `x/main.rs` directly under `tests/`.
+ let binaries: Vec<String> = entries(&tests)
+ .iter()
+ .filter(|path| is_rust_file(path) || path.join("main.rs").exists())
+ .map(|path| name(path))
+ .filter(|binary| binary != "it")
+ .collect();
+ assert_eq!(
+ binaries, OWN_PROCESS_TESTS,
+ "a test directly under tests/ is a binary of its own: move it to tests/it/ as a module, \
+ or list it in OWN_PROCESS_TESTS with what it needs its own process for"
+ );
+}
diff --git a/rust/sdk/cocoindex/tests/memo_clone.rs b/rust/sdk/cocoindex/tests/it/memo_clone.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/memo_clone.rs
rename to rust/sdk/cocoindex/tests/it/memo_clone.rs
index 077002c2..904ad591 100644
--- a/rust/sdk/cocoindex/tests/memo_clone.rs
+++ b/rust/sdk/cocoindex/tests/it/memo_clone.rs
@@ -2,7 +2,7 @@
//! and moves them into the body only on a miss, and `MemoInput::has_memo_state`
//! lets a plain-data argument skip the state call.
//!
-//! cargo test -p cocoindex --test memo_clone
+//! cargo test -p cocoindex --test it memo_clone::
use std::sync::atomic::{AtomicUsize, Ordering};
diff --git a/rust/sdk/cocoindex/tests/memo_deps.rs b/rust/sdk/cocoindex/tests/it/memo_deps.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/memo_deps.rs
rename to rust/sdk/cocoindex/tests/it/memo_deps.rs
diff --git a/rust/sdk/cocoindex/tests/model_based.rs b/rust/sdk/cocoindex/tests/it/model_based.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/model_based.rs
rename to rust/sdk/cocoindex/tests/it/model_based.rs
index 156e8b91..a9efa2ef 100644
--- a/rust/sdk/cocoindex/tests/model_based.rs
+++ b/rust/sdk/cocoindex/tests/it/model_based.rs
@@ -14,11 +14,11 @@
//! with how many the model expects: unchanged inputs hit the memo, changed
//! inputs miss.
//!
-//! cargo test -p cocoindex --features sqlite --test model_based
+//! cargo test -p cocoindex --features sqlite --test it model_based::
//!
//! The soak variant runs many more seeds and steps, and a 10k-file source:
//!
-//! cargo test -p cocoindex --features sqlite --test model_based -- --ignored
+//! cargo test -p cocoindex --features sqlite --test it model_based:: -- --ignored
#![cfg(feature = "sqlite")]
use std::collections::{BTreeMap, BTreeSet};
@@ -1012,7 +1012,7 @@ async fn random_operation_sequences_match_the_model() {
}
/// Many seeds and long sequences. Run with
-/// `cargo test -p cocoindex --features sqlite --test model_based -- --ignored`.
+/// `cargo test -p cocoindex --features sqlite --test it model_based:: -- --ignored`.
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore = "soak: minutes"]
async fn random_operation_sequences_match_the_model_soak() {
@@ -1126,7 +1126,12 @@ async fn a_killed_update_converges_after_restart() {
h.env.shutdown().await;
let mut child = std::process::Command::new(std::env::current_exe().unwrap())
- .args(["crash_child", "--exact", "--ignored", "--nocapture"])
+ .args([
+ "model_based::crash_child",
+ "--exact",
+ "--ignored",
+ "--nocapture",
+ ])
.env(CRASH_DIR_ENV, root.path())
.env("COCOINDEX_MAX_INFLIGHT_COMPONENTS", "4")
.stdout(std::process::Stdio::null())
@@ -1482,7 +1487,7 @@ async fn a_source_of_a_thousand_files() {
large_source(1000).await;
}
-/// Run with `cargo test -p cocoindex --features sqlite --test model_based -- --ignored`.
+/// Run with `cargo test -p cocoindex --features sqlite --test it model_based:: -- --ignored`.
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore = "soak: 10k files"]
async fn a_source_of_ten_thousand_files() {
diff --git a/rust/sdk/cocoindex/tests/mount.rs b/rust/sdk/cocoindex/tests/it/mount.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/mount.rs
rename to rust/sdk/cocoindex/tests/it/mount.rs
index 52c99455..b41cf854 100644
--- a/rust/sdk/cocoindex/tests/mount.rs
+++ b/rust/sdk/cocoindex/tests/it/mount.rs
@@ -4,7 +4,8 @@
//! Mirrors the Python `test_exception_handlers.py` family and the
//! `component_subpath` block semantics against the Rust SDK surface.
//!
-//! cargo test -p cocoindex --test mount
+//! cargo test -p cocoindex --features testing --test it mount::
+#![cfg(feature = "testing")]
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
@@ -15,7 +16,7 @@ use cocoindex::{Environment, ExceptionSource};
use tokio::sync::Notify;
// ---------------------------------------------------------------------------
-// Shared helpers (mirrors tests/live_component.rs)
+// Shared helpers (mirrors tests/it/live_component.rs)
// ---------------------------------------------------------------------------
type Log = Arc<Mutex<Vec<String>>>;
diff --git a/rust/sdk/cocoindex/tests/mount_each.rs b/rust/sdk/cocoindex/tests/it/mount_each.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/mount_each.rs
rename to rust/sdk/cocoindex/tests/it/mount_each.rs
index 3c1a1449..11c5dbd4 100644
--- a/rust/sdk/cocoindex/tests/mount_each.rs
+++ b/rust/sdk/cocoindex/tests/it/mount_each.rs
@@ -2,7 +2,7 @@
//! Python `coco.mount_each` shape), `use_mount_each` as their value-returning
//! form, and typed mount keys.
//!
-//! cargo test -p cocoindex --test mount_each
+//! cargo test -p cocoindex --test it mount_each::
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
diff --git a/rust/sdk/cocoindex/tests/oci_live.rs b/rust/sdk/cocoindex/tests/it/oci_live.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/oci_live.rs
rename to rust/sdk/cocoindex/tests/it/oci_live.rs
diff --git a/rust/sdk/cocoindex/tests/ops_api.rs b/rust/sdk/cocoindex/tests/it/ops_api.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/ops_api.rs
rename to rust/sdk/cocoindex/tests/it/ops_api.rs
index 90b5b3f6..e90a9c71 100644
--- a/rust/sdk/cocoindex/tests/ops_api.rs
+++ b/rust/sdk/cocoindex/tests/it/ops_api.rs
@@ -5,7 +5,7 @@
//! Python calls directly; here we stand up a mock HTTP server (wiremock) and
//! point the client at it, exercising the real request/response path.
//!
-//! Run with: `cargo test -p cocoindex --features embed_api --test ops_api`.
+//! Run with: `cargo test -p cocoindex --features embed_api --test it ops_api::`.
#![cfg(feature = "embed_api")]
use std::future::Future;
diff --git a/rust/sdk/cocoindex/tests/ops_text.rs b/rust/sdk/cocoindex/tests/it/ops_text.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/ops_text.rs
rename to rust/sdk/cocoindex/tests/it/ops_text.rs
index 8c4a8f56..49d2f272 100644
--- a/rust/sdk/cocoindex/tests/ops_text.rs
+++ b/rust/sdk/cocoindex/tests/it/ops_text.rs
@@ -1,6 +1,6 @@
//! Port of `python/tests/ops/test_text.py`.
//!
-//! Run with: `cargo test -p cocoindex --features text --test ops_text`.
+//! Run with: `cargo test -p cocoindex --features text --test it ops_text::`.
#![cfg(feature = "text")]
use cocoindex::ops::text::{
diff --git a/rust/sdk/cocoindex/tests/ops_text_fuzz.rs b/rust/sdk/cocoindex/tests/it/ops_text_fuzz.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/ops_text_fuzz.rs
rename to rust/sdk/cocoindex/tests/it/ops_text_fuzz.rs
index 1bf63791..ad15ba63 100644
--- a/rust/sdk/cocoindex/tests/ops_text_fuzz.rs
+++ b/rust/sdk/cocoindex/tests/it/ops_text_fuzz.rs
@@ -5,7 +5,7 @@
//! can be cut.
//!
//! Seeded, so every run checks the same inputs. Run with:
-//! `cargo test -p cocoindex --features text --test ops_text_fuzz`.
+//! `cargo test -p cocoindex --features text --test it ops_text_fuzz::`.
#![cfg(feature = "text")]
use cocoindex::ops::text::{
diff --git a/rust/sdk/cocoindex/tests/pipeline.rs b/rust/sdk/cocoindex/tests/it/pipeline.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/pipeline.rs
rename to rust/sdk/cocoindex/tests/it/pipeline.rs
index 00bcdf01..7bc6c17b 100644
--- a/rust/sdk/cocoindex/tests/pipeline.rs
+++ b/rust/sdk/cocoindex/tests/it/pipeline.rs
@@ -93,7 +93,7 @@ fn update_blocking_missing_context_returns_typed_error() {
let err = ctx.get_or_err::<MissingConfig>().unwrap_err();
assert!(
err.to_string()
- .contains("`pipeline::update_blocking_missing_context_returns_typed_error::MissingConfig` not provided")
+ .contains("`it::pipeline::update_blocking_missing_context_returns_typed_error::MissingConfig` not provided")
);
Ok(())
})
diff --git a/rust/sdk/cocoindex/tests/postgres_source.rs b/rust/sdk/cocoindex/tests/it/postgres_source.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/postgres_source.rs
rename to rust/sdk/cocoindex/tests/it/postgres_source.rs
index 0bda06d2..0d48afec 100644
--- a/rust/sdk/cocoindex/tests/postgres_source.rs
+++ b/rust/sdk/cocoindex/tests/it/postgres_source.rs
@@ -2,7 +2,7 @@
//!
//! Skips gracefully when `POSTGRES_URL` is unset. Run with:
//! POSTGRES_URL=postgres://cocoindex:cocoindex@localhost:5544/cocoindex \
-//! cargo test -p cocoindex --features postgres --test postgres_source
+//! cargo test -p cocoindex --features postgres --test it postgres_source::
#![cfg(feature = "postgres")]
use std::sync::atomic::{AtomicUsize, Ordering};
diff --git a/rust/sdk/cocoindex/tests/preview.rs b/rust/sdk/cocoindex/tests/it/preview.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/preview.rs
rename to rust/sdk/cocoindex/tests/it/preview.rs
index 33770b02..01202e4e 100644
--- a/rust/sdk/cocoindex/tests/preview.rs
+++ b/rust/sdk/cocoindex/tests/it/preview.rs
@@ -1,7 +1,7 @@
//! Preview mode + stdout progress reporting (P1 parity with Python's
//! `App.update(preview=True)` / `update_blocking(report_to_stdout=True)`).
//!
-//! cargo test -p cocoindex --test preview
+//! cargo test -p cocoindex --test it preview::
use std::sync::{Arc, Mutex};
diff --git a/rust/sdk/cocoindex/tests/qdrant_target.rs b/rust/sdk/cocoindex/tests/it/qdrant_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/qdrant_target.rs
rename to rust/sdk/cocoindex/tests/it/qdrant_target.rs
index 89885105..f35d4867 100644
--- a/rust/sdk/cocoindex/tests/qdrant_target.rs
+++ b/rust/sdk/cocoindex/tests/it/qdrant_target.rs
@@ -2,7 +2,7 @@
//!
//! Skips gracefully when `QDRANT_URL` is unset. Run with a Qdrant server:
//! QDRANT_URL=http://localhost:6334 \
-//! cargo test -p cocoindex --features qdrant --test qdrant_target
+//! cargo test -p cocoindex --features qdrant --test it qdrant_target::
//!
//! Exercises the full managed-target reconcile path over the public target-state
//! collection create, point upsert, skip-unchanged, vector search,
@@ -976,7 +976,7 @@ async fn qdrant_batches_around_chunk_boundaries_when_available() -> Result<()> {
/// A very large batch: 100k 128-dimension points in one run, then all of them
/// deleted. Slow; run with
/// QDRANT_URL=http://localhost:6334 cargo test -p cocoindex --features qdrant,testing \
-/// --test qdrant_target qdrant_very_large_batch -- --ignored
+/// --test it qdrant_target::qdrant_very_large_batch -- --ignored
#[tokio::test]
#[ignore]
async fn qdrant_very_large_batch_when_available() -> Result<()> {
diff --git a/rust/sdk/cocoindex/tests/schema_from_row.rs b/rust/sdk/cocoindex/tests/it/schema_from_row.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/schema_from_row.rs
rename to rust/sdk/cocoindex/tests/it/schema_from_row.rs
diff --git a/rust/sdk/cocoindex/tests/snowflake_target.rs b/rust/sdk/cocoindex/tests/it/snowflake_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/snowflake_target.rs
rename to rust/sdk/cocoindex/tests/it/snowflake_target.rs
index 7f53984a..83fdc910 100644
--- a/rust/sdk/cocoindex/tests/snowflake_target.rs
+++ b/rust/sdk/cocoindex/tests/it/snowflake_target.rs
@@ -14,7 +14,7 @@
//! (`SNOWFLAKE_ROLE` is optional):
//! SNOWFLAKE_ACCOUNT=org-acct SNOWFLAKE_USER=me SNOWFLAKE_PASSWORD=... \
//! SNOWFLAKE_WAREHOUSE=wh SNOWFLAKE_DATABASE=db SNOWFLAKE_SCHEMA=public \
-//! cargo test -p cocoindex --features snowflake --test snowflake_target
+//! cargo test -p cocoindex --features snowflake --test it snowflake_target::
#![cfg(feature = "snowflake")]
use std::path::Path;
diff --git a/rust/sdk/cocoindex/tests/surrealdb_scenarios.rs b/rust/sdk/cocoindex/tests/it/surrealdb_scenarios.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/surrealdb_scenarios.rs
rename to rust/sdk/cocoindex/tests/it/surrealdb_scenarios.rs
index 75772a46..3bf0082c 100644
--- a/rust/sdk/cocoindex/tests/surrealdb_scenarios.rs
+++ b/rust/sdk/cocoindex/tests/it/surrealdb_scenarios.rs
@@ -739,7 +739,7 @@ async fn surrealdb_batches_at_chunk_boundaries_when_available() {
}
/// A large declaration, written twice (soak). Run with
-/// `SURREALDB_URL=127.0.0.1:8000 cargo test -p cocoindex --features surrealdb,testing --test surrealdb_scenarios -- --ignored`.
+/// `SURREALDB_URL=127.0.0.1:8000 cargo test -p cocoindex --features surrealdb,testing --test it surrealdb_scenarios:: -- --ignored`.
#[tokio::test]
#[ignore = "soak: needs a SurrealDB server and takes tens of seconds"]
async fn surrealdb_very_large_batch_soak() {
diff --git a/rust/sdk/cocoindex/tests/surrealdb_target.rs b/rust/sdk/cocoindex/tests/it/surrealdb_target.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/surrealdb_target.rs
rename to rust/sdk/cocoindex/tests/it/surrealdb_target.rs
diff --git a/rust/sdk/cocoindex/tests/target_state.rs b/rust/sdk/cocoindex/tests/it/target_state.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/target_state.rs
rename to rust/sdk/cocoindex/tests/it/target_state.rs
index 0662cdba..7d5dc1a0 100644
--- a/rust/sdk/cocoindex/tests/target_state.rs
+++ b/rust/sdk/cocoindex/tests/it/target_state.rs
@@ -4,7 +4,7 @@
//! attachments, provider generations, and mounted targets without external
//! services.
//!
-//! cargo test -p cocoindex --test target_state
+//! cargo test -p cocoindex --test it target_state::
use std::collections::BTreeMap;
use std::sync::{Arc, Mutex};
diff --git a/rust/sdk/cocoindex/tests/turbopuffer_target.rs b/rust/sdk/cocoindex/tests/it/turbopuffer_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/turbopuffer_target.rs
rename to rust/sdk/cocoindex/tests/it/turbopuffer_target.rs
index 09da20bb..f9f2fc3c 100644
--- a/rust/sdk/cocoindex/tests/turbopuffer_target.rs
+++ b/rust/sdk/cocoindex/tests/it/turbopuffer_target.rs
@@ -5,7 +5,7 @@
//! unique namespace and deletes it at the end.
//!
//! TURBOPUFFER_API_KEY=... TURBOPUFFER_REGION=gcp-us-central1 \
-//! cargo test -p cocoindex --features turbopuffer --test turbopuffer_target
+//! cargo test -p cocoindex --features turbopuffer --test it turbopuffer_target::
#![cfg(feature = "turbopuffer")]
use std::time::{SystemTime, UNIX_EPOCH};
diff --git a/rust/sdk/cocoindex/tests/user_state.rs b/rust/sdk/cocoindex/tests/it/user_state.rs
similarity index 100%
rename from rust/sdk/cocoindex/tests/user_state.rs
rename to rust/sdk/cocoindex/tests/it/user_state.rs
diff --git a/rust/sdk/cocoindex/tests/valkey_target.rs b/rust/sdk/cocoindex/tests/it/valkey_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/valkey_target.rs
rename to rust/sdk/cocoindex/tests/it/valkey_target.rs
index b34a11e4..5d6d35cd 100644
--- a/rust/sdk/cocoindex/tests/valkey_target.rs
+++ b/rust/sdk/cocoindex/tests/it/valkey_target.rs
@@ -1,6 +1,6 @@
//! Live Valkey (RediSearch) target e2e. Skips when no server is reachable. Run:
//! VALKEY_URI=redis://localhost:6379 \
-//! cargo test -p cocoindex --features valkey --test valkey_target
+//! cargo test -p cocoindex --features valkey --test it valkey_target::
#![cfg(feature = "valkey")]
use std::collections::BTreeMap;
@@ -860,7 +860,7 @@ async fn valkey_batches_around_pipeline_chunks_when_available() {
/// A very large batch: 50k documents in one run, then all deleted. Slow; run
/// with
/// VALKEY_URI=redis://localhost:6379 cargo test -p cocoindex --features valkey \
-/// --test valkey_target valkey_very_large_batch -- --ignored
+/// --test it valkey_target::valkey_very_large_batch -- --ignored
#[tokio::test]
#[ignore]
async fn valkey_very_large_batch_when_available() {
diff --git a/rust/sdk/cocoindex/tests/zvec_battle.rs b/rust/sdk/cocoindex/tests/it/zvec_battle.rs
similarity index 98%
rename from rust/sdk/cocoindex/tests/zvec_battle.rs
rename to rust/sdk/cocoindex/tests/it/zvec_battle.rs
index 511dd7ae..5a4052f9 100644
--- a/rust/sdk/cocoindex/tests/zvec_battle.rs
+++ b/rust/sdk/cocoindex/tests/it/zvec_battle.rs
@@ -5,7 +5,7 @@
//!
//! Hermetic (zvec is embedded; collections live in a temp directory):
//!
-//! cargo test -p cocoindex --features zvec,testing --test zvec_battle
+//! cargo test -p cocoindex --features zvec,testing --test it zvec_battle::
#![cfg(feature = "zvec")]
use std::sync::Arc;
@@ -288,7 +288,7 @@ async fn batches_around_the_chunk_boundaries() -> Result<()> {
/// A large run: 100 000 documents inserted, then half deleted. Slow, so
/// ignored by default:
///
-/// cargo test -p cocoindex --features zvec,testing --test zvec_battle \
+/// cargo test -p cocoindex --features zvec,testing --test it zvec_battle:: \
/// -- --ignored large_run
#[tokio::test]
#[ignore = "soak: 100k documents"]
diff --git a/rust/sdk/cocoindex/tests/zvec_target.rs b/rust/sdk/cocoindex/tests/it/zvec_target.rs
similarity index 99%
rename from rust/sdk/cocoindex/tests/zvec_target.rs
rename to rust/sdk/cocoindex/tests/it/zvec_target.rs
index ab7a85f2..aeb7b38d 100644
--- a/rust/sdk/cocoindex/tests/zvec_target.rs
+++ b/rust/sdk/cocoindex/tests/it/zvec_target.rs
@@ -4,7 +4,7 @@
//! temp directory (zvec is embedded, no external services), then reads them
//! back through the zvec API to assert the reconcile semantics.
//!
-//! cargo test -p cocoindex --features zvec --test zvec_target
+//! cargo test -p cocoindex --features zvec --test it zvec_target::
#![cfg(feature = "zvec")]
use std::future::Future;