You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On main 9d5a06c, the single-process libtest form in test-reusable.yml (cargo test -p openhuman --lib, default threads) fails about 66 tests nondeterministically, and runs take ~600 s. The failing set differs between runs, around a stable core of ~47.
storage::local::backend_for (and every other reader of storage::installed()) prefers the process-wide installed storage slot over the workspace's own backend. Tests that install a backend use test_support::install_for_test / install_backend_for_test, which hold lock_storage_slot(). That serializes the installers only among themselves. While one holds the slot, every concurrently running test that opens storage through backend_for gets the installer's backend instead of its own TempDir workspace's.
As a result, rows from unrelated tests mix (row-count assertions fail), and they vanish when the installer's guard restores or clears the slot.
Evidence
A diagnostic build (eprintln! under cfg(test) when backend_for serves the installed slot, with the thread name and workspace) was run twice with default threads. 53 of 66 and 55 of 69 failing tests show that line in their captured output.
The thread named is the failing test itself, with its own temp workspace. Example: thread=Some("security::approval::gate::tests::forced_tests::forced_approval_denies_without_routable_web_chat_origin") workspace=/tmp/.tmpCjo3xc.
The same holds for store::tests::flow_trust_tests::* and the spawn_subagent tests.
The approval store tests panic at the first insert_pending(...).unwrap() or row-count assertion (store_persistence_tests.rs:5/57/77), which fits a backend that is shared or replaced mid-test.
--test-threads=1 gives 0 failures.
Not explained by this
The flows::builder_tools failures do not carry the installed-slot line, so they may have a second shared resource. To be checked once the slot is fixed.
Re-checked on current main (2b07daf): partly fixed. #8473 (with #8480) hides a test-installed storage slot from other libtest threads, which removes the cross-test mixing for tests that run on libtest's own threads. Two parts remain:
storage::local::backend_for still prefers the process-wide slot (storage/local.rs ~232-233), so runtime worker threads spawned inside a test (whose names don't carry the test path) can still see another test's backend.
test-reusable.yml (~299) still runs the single-process libtest form with default threads. It runs on release and dispatch only, so a regression would show up late.
Next step: give worker threads the owning test's scope (or key the slot by tenant/workspace rather than thread), then re-measure the single-process run.
Activity
fix(composio): serve module_guard's module storage without the proces…
M3gA-Mind commentedon Nov 16, 2026
Re-checked on current main (2b07daf): partly fixed. #8473 (with #8480) hides a test-installed storage slot from other libtest threads, which removes the cross-test mixing for tests that run on libtest's own threads. Two parts remain:
storage::local::backend_forstill prefers the process-wide slot (storage/local.rs~232-233), so runtime worker threads spawned inside a test (whose names don't carry the test path) can still see another test's backend.test-reusable.yml(~299) still runs the single-process libtest form with default threads. It runs on release and dispatch only, so a regression would show up late.Next step: give worker threads the owning test's scope (or key the slot by tenant/workspace rather than thread), then re-measure the single-process run.