Files
tuliprox/backend
knylbyteandGitHub 8921d8d5af fix: make Xtream refresh generations safe and Windows durable (#820)
## Summary

- Keep an Xtream refresh generation protected for its complete lifetime so orphan cleanup cannot delete active staging artifacts between B+Tree batches.
- Hold cleanup ownership through deletion and remove inactive generation artifacts, sidecars, and guards as one coordinated unit.
- Publish Xtream category snapshots on Windows with an atomic write-through rename while preserving the existing Unix parent-directory durability barrier.
- Add deterministic regression coverage for cleanup races, active generations, stale sidecars, atomic category replacement, and partial-publication errors.

## Root cause

The orphan sweep previously used an instantaneous sidecar-lock probe as proof that a refresh generation was inactive. Legitimate unlocked intervals between B+Tree batches created a race in which active staging data could be removed.

The category publisher also reused the Unix directory-sync approach on Windows. The rename could succeed before opening the parent directory failed, causing the refresh to report a misleading partial-publication error.

## Validation

- `make fmt-check`
- `make lint`
- `cargo +stable clippy --workspace --all-targets --all-features -- -D warnings`
- `make test` — 3100 backend tests passed, 5 ignored; integration and documentation tests passed
- `make markdown-lint`
- Focused Xtream cleanup and category-publication regression tests

Closes #817
Closes #818


* **Bug Fixes**
  * Improved cleanup of outdated Xtream refresh data while protecting active refreshes from accidental deletion.
  * Added safer handling for incomplete, invalid, or locked refresh data.
  * Improved reliability when publishing refreshed category data across supported platforms.
  * Added stricter validation to prevent unrelated files from being removed.
2026-08-06 21:36:55 +02:00
..
2025-06-19 12:45:55 +02:00