test(tui): status_write_is_atomic_under_concurrent_reads fails on Windows with NotFound (rename over a file being read)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
Piste de recherche
Start with crates/atlas-tui/src/runtime/manager/health_check.rs around the failing test and trace write_status_atomic to atlas_core::fs::write_atomic. Then inspect the .tui-status.json readers used by atlas dev --status and the MCP status tools to see how they handle NotFound. Done means the Windows race is addressed consistently for the test and production readers.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
What fails
atlas-tui runtime::manager::health_check::tests::status_write_is_atomic_under_concurrent_reads failed once on Windows with a NotFound from the reader:
FAIL [ 5.473s] (2651/3095) atlas-tui runtime::manager::health_check::tests::status_write_is_atomic_under_concurrent_reads
thread '<unnamed>' (968) panicked at crates\atlas-tui\src\runtime\manager\health_check.rs:653:66:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
thread 'runtime::manager::health_check::tests::status_write_is_atomic_under_concurrent_reads' panicked at health_check.rs:664:31:
called `Result::unwrap()` on an `Err` value: Any { .. }
Evidence: run 44087317372 (a throwaway workflow_dispatch matrix, 2026-11-17), job 134053020665, windows-2022 (image 20261112.366.7), runner GitHub Actions 1000025870, Test step of commit 8019de2f-based branch; 1 failure in 10 jobs of that run (the other 9, 5 of them on windows-2025-vs2026, passed). Not a runner loss: the step ended normally with 3094 passed, 1 failed.
Why it fails
The test has one thread rewrite .tui-status.json 300 times with write_status_atomic (atlas_core::fs::write_atomic: temp file + sync_all + fs::rename over the target) while another thread loops std::fs::read_to_string(path).unwrap() and expects the old or the new content, "never a partial file". On Windows the rename over an existing file that a reader has just opened or is opening can make the target momentarily not resolvable, so the reader gets NotFound (os error 2), which the test's .unwrap() turns into a panic. The Unix rename(2) never has that window.
Why it matters beyond the test
If the cause is the rename, any Windows reader of .tui-status.json (the atlas dev --status / MCP status tools read it while the runner rewrites it) can see a transient NotFound and may report "atlas dev is not running" for an instant. Worth checking the readers' handling together with the fix.
Not done here
No fix attempted (asked to file it). Candidates: make the test retry on NotFound (what the fix of #484/#485 did for similar fsync-speed races) only if the readers in production already tolerate it, or make write_atomic robust on Windows (ReplaceFileW, or a retry of the open in the shared reader).
Found while investigating #520 (runner losses); unrelated to them.
- Langage dominant
- Rust
- Étoiles
- 3
- Forks
- 1
- Merge moyen
- 9 h 51 min
- PR mergées (30 j)
- 310
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de codeatlasdev/atlas
-
type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
codeatlasdev/atlas#597 ·
Les mainteneurs répondent en général sous 1 jour
-
area: ci os: linux type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
codeatlasdev/atlas#496 ·
Les mainteneurs répondent en général sous 1 jour
-
area: ci type: bug
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
codeatlasdev/atlas#596 ·
Les mainteneurs répondent en général sous 1 jour
-
os: linux type: bug
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
codeatlasdev/atlas#591 ·
Les mainteneurs répondent en général sous 1 jour
-
flaky: Windows scripts job hits test timeouts (check-dco, i18n runner/translate, check-changed)Ouvertearea: ci os: windows type: bug
Difficulté 3/5 1-2 jours Accessibilité débutants 56/100
codeatlasdev/atlas#550 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de codeatlasdev/atlas
Issues similaires
-
marketing
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
kinqsradio/orbyn-engineering#729 ·
-
Plans page scenario races Shift+Tab against the plan list being drawn again in Firefox and WebKitOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
nledford/Ladderback#1091 ·
Les mainteneurs répondent en général sous 1 jour
-
bug fix packaging ui user-sprint
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Vondor/KassenSturz#1197 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour