Skip to content

feat(blaze): inventory provider-owned slots - #2285

Draft
WeissonHan wants to merge 1 commit into
alibaba:mainfrom
WeissonHan:feature/blaze/owned-file-slot-inventory
Draft

feat(blaze): inventory provider-owned slots#2285
WeissonHan wants to merge 1 commit into
alibaba:mainfrom
WeissonHan:feature/blaze/owned-file-slot-inventory

Conversation

@WeissonHan

@WeissonHan WeissonHan commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

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

  • Add optional StorageProvider capability discovery and stable-ID inventory.
  • Make the file provider enumerate direct slot directories in stable order and
    reject linked, non-directory, invalid, or unrepresentable entries.
  • Keep release by ID idempotent for missing and partial directories while
    refusing non-directory targets.
  • Document the point-in-time boundary: a caller that needs a stable inventory
    must serialize it with concurrent acquire and release operations.
  • Add focused tests for partial slots, deterministic ordering, invalid entries,
    linked entries, and idempotent cleanup.

Commit structure

Commit 1, feat(blaze): inventory provider-owned slots, introduces the
provider 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

  1. Add the production caller that serializes inventory with storage mutations.
  2. Define the caller's reconciliation and retry policy in that focused change.

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

  • Public CLI, API, configuration, or documented behavior changed
  • Privileged or security-sensitive behavior changed
  • Cross-component contract changed
  • Migration or rollback guidance is needed

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 (tree
a8dd01984970ffd79b3ecb10d8186dcea337b7b6), from src/blaze:

  • cargo fmt --all -- --check
  • cargo build --workspace --all-targets --locked
  • cargo build --workspace --all-targets --all-features --locked
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo test --workspace --locked (blaze-core 52, blazed 112)
  • cargo test --workspace --all-features --locked (blaze-core 52, blazed 122)
  • strict rustdoc for default and all-feature workspaces
  • focused file-provider tests (19 passed)
  • commitlint 19.8.1 and git diff --check

Documentation 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.

Copy link
Copy Markdown
Collaborator Author

@codex review Please review exact head 4ab00f828191a23517a5ebc898d7e43bc3819a83. This PR adds a point-in-time provider-owned storage-slot inventory and idempotent release-by-ID support for complete, partial, and missing file-provider slots; it intentionally adds no daemon consumer or reconciliation policy.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 4ab00f8281

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@WeissonHan WeissonHan changed the title feat(blaze): inventory provider-owned storage slots feat(blaze): inventory provider-owned slots Aug 6, 2026
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>
@WeissonHan
WeissonHan force-pushed the feature/blaze/owned-file-slot-inventory branch from 4ab00f8 to 49d9441 Compare August 6, 2026 19:59

Copy link
Copy Markdown
Collaborator Author

@codex review Please review exact head 49d9441f1620a036bdd04d701aea631dce617dc7. This head has the same verified code tree as the prior revision and normalizes the feature sign-off identity; the PR adds a point-in-time provider-owned storage-slot inventory and no daemon consumer or reconciliation policy.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 49d9441f16

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[blaze] feat: expose provider-owned storage slot inventory

1 participant