- Status: Accepted
- Date: 2025-12-24
- Context:
cargo llvm-cov runs tests in parallel and surfaced a flaky asset_sync test.
- The temp directory helper used timestamp-based names that could collide under parallel execution.
- CI requires
just ci (including coverage) to pass reliably without intermittent failures.
- Decision:
- Replace the time-based temp directory naming with a process id + atomic counter.
- Retry on
AlreadyExists to ensure unique per-test directories without new dependencies.
- Consequences:
- Asset sync tests are deterministic under parallel runners and coverage instrumentation.
- No new crates or runtime behavior changes.
- Follow-up:
- Remove flaky coverage failures caused by temporary directory collisions in
asset_sync tests.
- Use a static
AtomicUsize counter plus std::process::id() to generate unique temp roots.
- Loop on
AlreadyExists without introducing external dependencies.
just ci (fmt, lint, udeps, audit, deny, ui-build, test, cov).
- Risk: low; change is test-only.
- Rollback: revert the temp directory helper to its previous implementation.