Problem
cargo test on develop fails intermittently (about 1 in 3 full runs locally, passes in isolation):
commands::watch::tests::filtered_reindex_touches_only_matching_changed_files
src/commands/watch.rs:479:86: called `Result::unwrap()` on an `Err` value: UNIQUE constraint failed: schema_version.version
Error code 1555: A PRIMARY KEY constraint failed
IndexSession::open_at(root, ConfigSource::ProjectOnlyAt(root)) still opens the shared global index DB, so two tests initialising the schema at the same time race on schema_version. #587/#589 isolated other tests from the real data dir, but this one (added in #584) was not covered. Expected: tests use a per-test CODECORA_HOME/temp data dir, and schema init is idempotent under concurrency (INSERT OR IGNORE / transaction).
Problem
cargo teston develop fails intermittently (about 1 in 3 full runs locally, passes in isolation):IndexSession::open_at(root, ConfigSource::ProjectOnlyAt(root))still opens the shared global index DB, so two tests initialising the schema at the same time race onschema_version. #587/#589 isolated other tests from the real data dir, but this one (added in #584) was not covered. Expected: tests use a per-testCODECORA_HOME/temp data dir, and schema init is idempotent under concurrency (INSERT OR IGNORE/ transaction).