flaky: crash-recovery test reads a note path that has disappeared #955

Open
opened 2026-11-05 08:38:39 +00:00 by kayg · 2 comments
Owner

Observed while validating docs PR #929 on dev-01, through Nix and ~/bin/slot, with CARGO_BUILD_JOBS=4.

cargo test --workspace failed in kill_nine_mid_append_on_a_long_note at crates/calternal/tests/notes_crash.rs:382:54: std::fs::read(path).unwrap() returned OS error 2 (NotFound). This follows a while !path.exists() loop in check; the existence check does not guarantee the path still exists at the read. Investigate whether an asynchronous rename/removal is allowed here, and make the test synchronize with the intended file state. Do not mask a persistence defect by blindly retrying.

Candidate: 35e233dda8. Dev: 9377d71121. The test and implementation tokens are unchanged by the PR. The preceding full workspace run on 38d99d2d passed.

After that first failure, ten separate invocations on candidate and ten on dev all passed:

cargo test -p calternal --test notes_crash kill_nine_mid_append_on_a_long_note -- --exact --nocapture

Run via nix develop -c bash -c 'export CARGO_BUILD_JOBS=4; ~/bin/slot bash ~/pr929-repeat.sh'. The script checks out each pinned revision in the owned VM worktree and loops ten times per role. Full workspace rerun on the final candidate is in progress; its result will be posted on #929. The first-failure log and repeat logs will be attached there. This issue tracks the stability follow-up required by the brief; no test or implementation changes are included in #929.

Observed while validating docs PR #929 on dev-01, through Nix and ~/bin/slot, with CARGO_BUILD_JOBS=4. `cargo test --workspace` failed in `kill_nine_mid_append_on_a_long_note` at `crates/calternal/tests/notes_crash.rs:382:54`: `std::fs::read(path).unwrap()` returned OS error 2 (`NotFound`). This follows a `while !path.exists()` loop in `check`; the existence check does not guarantee the path still exists at the read. Investigate whether an asynchronous rename/removal is allowed here, and make the test synchronize with the intended file state. Do not mask a persistence defect by blindly retrying. Candidate: 35e233dda853836d2922cde00c4d017465eb1628. Dev: 9377d711217532a44973edcf63c2af0b7f7969d8. The test and implementation tokens are unchanged by the PR. The preceding full workspace run on 38d99d2d passed. After that first failure, ten separate invocations on candidate and ten on dev all passed: ```sh cargo test -p calternal --test notes_crash kill_nine_mid_append_on_a_long_note -- --exact --nocapture ``` Run via `nix develop -c bash -c 'export CARGO_BUILD_JOBS=4; ~/bin/slot bash ~/pr929-repeat.sh'`. The script checks out each pinned revision in the owned VM worktree and loops ten times per role. Full workspace rerun on the final candidate is in progress; its result will be posted on #929. The first-failure log and repeat logs will be attached there. This issue tracks the stability follow-up required by the brief; no test or implementation changes are included in #929.
Author
Owner

The final full cargo test --workspace rerun on 35e233dda8 passed (Cargo summaries: 1,474 passed, 0 failed, 22 ignored). The ten candidate and ten dev targeted repeats also all passed. First failure and all repeat/retest logs are in the gate evidence linked on #929. No test or implementation change was made; this stability issue remains open.

The final full `cargo test --workspace` rerun on 35e233dda853836d2922cde00c4d017465eb1628 passed (Cargo summaries: 1,474 passed, 0 failed, 22 ignored). The ten candidate and ten dev targeted repeats also all passed. First failure and all repeat/retest logs are in the [gate evidence linked on #929](https://git.kayg.org/kayg/calternal/pulls/929#issuecomment-79648). No test or implementation change was made; this stability issue remains open.
Author
Owner

Flaky lane (U4): PR #972 makes the next failure say what the Notes folder holds. I could not reproduce this (about 145 runs, including side-by-side copies and a build alongside), and reading the save and adoption code shows no window where the file is missing, so I did not change the test's waiting or its path. Leaving this open until it shows again with the listing.

Flaky lane (U4): PR #972 makes the next failure say what the Notes folder holds. I could not reproduce this (about 145 runs, including side-by-side copies and a build alongside), and reading the save and adoption code shows no window where the file is missing, so I did not change the test's waiting or its path. Leaving this open until it shows again with the listing.
Sign in to join this conversation.
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#955
No description provided.