Repository navigation
Fix renewal of persistent files read with the default key - #1814
Merged
Merged
Conversation
Resolve the default key before recording the file's renewal path so a subsequent prune preserves successfully read files. Cover default and explicit keys with compression and expiry controls. Fixes caronc#1800 Assisted-by: OpenAI GPT-6 <noreply@openai.com>
Codecov Reportâ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1814 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 251 252 +1
Lines 40685 40887 +202
Branches 7007 7040 +33
==========================================
+ Hits 40685 40887 +202
ð New features to boost your workflow:
|
caronc
marked this pull request as ready for review
October 18, 2026 20:33
Owner
|
Thank you for this pr! ð |
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.
Description
Fixes #1800.
Resolve an omitted
PersistentStore.read()key toself.base_keybefore opening the file and queuing its renewal. Previously,open(None)readdefault.psdata, but the renewal queue containedNone.psdata. A successful read therefore failed to refresh the actual file, and a later retention prune could remove it.The production change is three lines, following the existing default-key handling in
write()andopen(). Explicit keys, compression, key validation andexpires=Trueretain their behavior. This does not change pending-cache dirty flags; #1813 addresses that separateset()problem.Checklist
tox -e lintpasses with the repository-pinned Ruff 0.15.8 (all 485 files).Testing
Base:
bf4c7234968ea6275aad8cfe0b490f5d1cc01dcc.pytest --disable-socket -q tests/test_persistent_store.py: 32 passed, 1 existing skip. Tests use temporary storage, force the file past the retention cutoff, read it, flush and run a real local prune. Explicit expiry still removes the stale file; explicit default/named reads remain controls.test_plugin_vapid_write_follows_symlink, where this host raises WinError 1314 atos.symlink()because it lacks symlink-creation privileges. I reproduced that same failure in an untouched checkout of the base and on this head. No permission change, test removal or new skip was made.pytest tests -n 4with the same all-plugin dependencies as the qa environment and a pytest-socket policy restricting TCP connections to loopback. Observed warnings include dependency deprecations and blocked external connection attempts. Real service credentials and notifications are not used.No dependency, workflow, permissions, lint rule or security verification changes. No credentials or real notification services are used. The full interpreter/platform matrix and optional compiled AMQP 1.0 dependency were not tested locally.
AI assistance: OpenAI Codex prepared the investigation, patch, tests and this draft description on Dcastroro's behalf. Human review is pending.