Notes tests share a User lock across separate test Homes #944

Open
opened 2026-10-02 19:42:33 +00:00 by kayg · 1 comment
Owner

The #655 verification run found an existing Notes test failure under parallel test execution.

Command: cargo test -p calternal-plugin-notes

---- tests::daily_and_composer_preserve_unrelated_bytes stdout ----
thread 'tests::daily_and_composer_preserve_unrelated_bytes' panicked at crates/plugins/notes/src/lib.rs:9548:9:
assertion `left == right` failed
  left: 404
 right: 200

test result: FAILED. 171 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.83s

The unchanged test passes alone:

test tests::daily_and_composer_preserve_unrelated_bytes ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 171 filtered out; finished in 2.14s

Evidence: tests::setup() uses the same User UUID for separate databases. USER_LOCKS is process-wide. journal_snapshot() tries that User lock once for legacy ID repair and returns Daily note not indexed (404) if it cannot publish a snapshot. Concurrent tests can therefore interfere across separate test Homes. No test expectation was changed in #655. A serial Notes gate is running to verify this inference. Isolate test identities or locks without changing the non-blocking production Journal read contract (#549).

The #655 verification run found an existing Notes test failure under parallel test execution. Command: `cargo test -p calternal-plugin-notes` ``` ---- tests::daily_and_composer_preserve_unrelated_bytes stdout ---- thread 'tests::daily_and_composer_preserve_unrelated_bytes' panicked at crates/plugins/notes/src/lib.rs:9548:9: assertion `left == right` failed left: 404 right: 200 test result: FAILED. 171 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.83s ``` The unchanged test passes alone: ``` test tests::daily_and_composer_preserve_unrelated_bytes ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 171 filtered out; finished in 2.14s ``` Evidence: `tests::setup()` uses the same User UUID for separate databases. `USER_LOCKS` is process-wide. `journal_snapshot()` tries that User lock once for legacy ID repair and returns `Daily note not indexed` (404) if it cannot publish a snapshot. Concurrent tests can therefore interfere across separate test Homes. No test expectation was changed in #655. A serial Notes gate is running to verify this inference. Isolate test identities or locks without changing the non-blocking production Journal read contract (#549).
Author
Owner

The follow-up serial gate passed without changing assertions or fixtures:

Command: cargo test -p calternal-plugin-notes -- --test-threads=1

test result: ok. 172 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 286.49s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 7.80s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

This supports the test-isolation inference. The concurrent failure remains recorded above.

The follow-up serial gate passed without changing assertions or fixtures: Command: `cargo test -p calternal-plugin-notes -- --test-threads=1` ``` test result: ok. 172 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 286.49s test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 7.80s test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ``` This supports the test-isolation inference. The concurrent failure remains recorded above.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#944
No description provided.