feat(blaze): inventory provider-owned slots - #2285
Conversation
|
@codex review Please review exact head |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Storage providers exposed release by stable ID, but callers could not discover every slot owned by the configured provider root, including partially initialized directories. Add an explicit point-in-time inventory capability. The file provider validates each direct entry, returns IDs in stable order, and refuses linked, non-directory, or unrepresentable names. Release by ID remains idempotent for absent and partial directories while rejecting non-directory targets. This lets callers reconcile provider ownership without coupling storage to lifecycle policy. Callers remain responsible for serializing inventory with concurrent acquire and release operations. This commit adds no daemon consumer or restart cleanup policy. Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> Signed-off-by: Weisson Han <wenshu.hx@linux.alibaba.com>
4ab00f8 to
49d9441
Compare
|
@codex review Please review exact head |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Why
The storage contract could release a slot by stable identifier, but callers
could not discover every slot owned by the configured provider root. That left
partially initialized directories outside a provider-neutral reconciliation
path and forced any cleanup caller to understand the file provider's layout.
Before this change, the file provider could reconstruct complete slots or
release a known identifier, but there was no way to obtain the complete set of
identifiers it currently owned. After this change, callers can discover a
strict, point-in-time inventory and then release known complete or partial
slots without depending on provider-specific paths.
What changed
StorageProvidercapability discovery and stable-ID inventory.reject linked, non-directory, invalid, or unrepresentable entries.
refusing non-directory targets.
must serialize it with concurrent acquire and release operations.
linked entries, and idempotent cleanup.
Commit structure
Commit 1,
feat(blaze): inventory provider-owned slots, introduces theprovider contract, the file-provider implementation, and the tests that define
its supported boundary.
These changes belong in one PR because the contract is not reviewable without
an implementation, and the implementation's strict classification and cleanup
rules are defined by the accompanying tests. The PR contains only the storage
provider foundation; it does not add a daemon consumer or a restart cleanup
policy.
Still to do
Related issue
closes #2284
User / Agent impact
No daemon behavior changes yet. Storage-provider implementers can opt into the
new capability; existing providers remain source-compatible through default
trait methods.
Risk and compatibility
The public Rust storage-provider contract gains additive default methods. The
file provider opts in; providers that do not opt in retain their existing
behavior.
Validation
Verified on Linux x86_64 for commit
49d9441f1620a036bdd04d701aea631dce617dc7(treea8dd01984970ffd79b3ecb10d8186dcea337b7b6), fromsrc/blaze:cargo fmt --all -- --checkcargo build --workspace --all-targets --lockedcargo build --workspace --all-targets --all-features --lockedcargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --locked(blaze-core 52, blazed 112)cargo test --workspace --all-features --locked(blaze-core 52, blazed 122)git diff --checkDocumentation and rollback
The trait rustdoc documents capability discovery, inventory completeness, and
the required serialization boundary. Reverting the single commit removes the
additive contract and file-provider implementation together; no persisted data
conversion is required.