PR4: Storage-protocol hygiene & guard - #89
Closed
Diego Colombo (colombod) wants to merge 1 commit into
Closed
Conversation
…on_keys Storage-protocol hygiene, stacked on the schema-version work. Carries only the two storage-agnosticism concerns from the maintenance re-seat -- no maintenance mode, auto-repair, or blob-reclaim (those land later). Writer-lease persistence moves behind a new backend-neutral lease_store package (protocol + filesystem + factory), the fourth storage backend alongside blob_store, queue_manager, and identity_store. The writer-lease detector keeps all policy -- staleness, conflict, the bounded single-thread I/O executor -- and reaches the lease only through the store, so the same detector runs unchanged against any backend. A standing AST tripwire (test_storage_boundary_guard) asserts no module outside the four storage backend packages performs a storage-artifact file operation or reads a storage root path; it is proven red on a planted leak. It also catches a raw queues_dir glob or path-join. QueueManager gains session_keys() -- a backend-neutral way to enumerate every persisted session key. Boot reclaim sweeps through it instead of globbing the queue directory. queues_dir is removed from the QueueManager Protocol: the two main.py consumers now go through session_keys()/the session key, and the single sanctioned exception (registry.queues_dir_path, for the WriterLease boot detector) resolves the directory straight from settings. The Batch docstring now states its offsets are opaque queue-produced cursors, matching Record. Version 7.3.0. 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Diego Colombo (colombod)
force-pushed
the
feat/lease-store-and-storage-guard
branch
from
August 26, 2026 17:06
d39b00c to
5e7c2ca
Compare
Diego Colombo (colombod)
marked this pull request as draft
August 27, 2026 15:30
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.
Fourth of the progressive split of #79. Stacks on PR3 (#88) → PR2 (#87) → PR1 (#85) → #81 → #78.
Delivers
lease_store/package +writer_lease.pyrefactored to moveLeaseRecord+ file I/O behind the store (public surface unchanged —main.pystill reads onlywriter_lease.acquired).tests/test_storage_boundary_guard.py): asserts no non-storage module does rawglob/os.unlink/Pathover a storage directory;_STORAGE_PACKAGEScoversblob_store/identity_store/queue_manager/lease_store.session_keys()on theQueueManagerProtocol + impl;_boot_reclaimuses it (with a new unit test).queues_dir(a filesystemPath) from theQueueManagerProtocol and routed themain.pyconsumers through backend-neutral methods; the one sanctionedregistry.queues_dir_pathWriterLease exception now resolves fromsettings.queues_path.Batchdocstring corrected to matchRecord's opaque-position contract.Scope
Surface
session_keys(), removesqueues_dirfrom the Protocol → version 7.2.0 → 7.3.0 + CHANGELOG.Verification
session_keys()tests; 4 Neo4j reclaim/queue tests pass on a live container; boot smoke green (/version→ 7.3.0,session_keys()returns the live session,queues_dir_pathresolves from settings).