Implement atomic run bundle retention - #86
Merged
Merged
Conversation
codeforester
marked this pull request as ready for review
August 5, 2026 00:01
This was referenced Aug 5, 2026
codeforester
added a commit
that referenced
this pull request
Aug 5, 2026
## Summary Add explicit concurrency regression coverage for issue #62: - concurrent metadata writers must always leave a valid JSON snapshot - concurrent pruners must serialize through the retention lock and leave a bounded, valid index ## Validation - `uv run pytest -q tests/test_run_bundle_retention.py` Follow-up to #86; closes the concurrency-test gap in #62.
This was referenced Aug 5, 2026
codeforester
added a commit
that referenced
this pull request
Aug 5, 2026
## Summary Remove the redundant post-replacement permission rewrite from atomic JSON writes. The temporary file is already created with private permissions and synced before replacement, so re-opening the destination by path is unnecessary and could create a symlink-swap window. ## Validation - `.venv/bin/python -m pytest -q tests/test_run_bundle_retention.py tests/test_app_run_metadata.py tests/test_app_log_retention.py` - `git diff --check` Follow-up hardening for #86/#62.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
max_log_filescompatible for legacy flat layouts while routing metadata-backed runs through bundle retentionRetentionPolicysafe defaults, lifecycle preservation metadata, index refresh, documentation, and security/failure testsValidation
uv run pytest -q./tests/validate.shuv run mypy --strict examples/typed_consumer.pyCloses #62