Skip to content

feat(blaze): maintain automatic warm capacity - #2285

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

feat(blaze): maintain automatic warm capacity#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

Description

This draft will deliver bounded automatic warm capacity through the existing
sandbox create path.

The completed pull request will:

  • prepare independently owned storage slots when storage.pool_size is positive;
  • optionally start a backend and complete its readiness check when
    storage.prefork = true;
  • let a compatible POST /v1/sandboxes request claim one ready slot;
  • preserve one durable owner through build, claim, handoff, cleanup, restart,
    cancellation, and bounded shutdown; and
  • keep incompatible or unavailable capacity on the existing cold-create path.

No management route or internal ownership field is added to the HTTP API.
The four existing /v1/pools compatibility routes remain unsupported.

Draft status: the current public head is still the one-commit
provider-owned slot-inventory foundation
(afde1cd0e21759b110e390ecc55c285b760683bd). It has no daemon production
caller and does not implement automatic warm capacity. Checks and reviews
attached to this head validate only that foundation.

A separate integration-only reconstruction reorganizes the earlier five-commit
development layout into four feature commits: durable cleanup authority;
automatic storage capacity with the provider inventory folded into its first
production consumer; backend preforking; and documentation. This reconstruction
is not the public pull-request head, is not a merge candidate, and cannot make
this pull request Ready while #2290 and #2471 remain open.

The corrected four-commit integration-only reconstruction has now completed
its private per-commit Linux validation matrix. The dependency correction was
limited to stale test-only interfaces; source and tree reconciliation confirmed
that the intended feature and documentation content were unchanged. These
results do not attach to the current public head and do not establish a merge
candidate. Any change to main, #2290, or #2471 makes this matrix historical
evidence.

For the complete feature, documentation will update the existing English and
Chinese component READMEs and runtime user guides, the annotated example
configuration, and the existing bilingual lifecycle-consistency and
storage-artifact-synchronization design documents. It will add no new design
document or changelog entry.

Related Issue

Closes #2460

Refs #2284

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality
    to stop working as expected)
  • Documentation update
  • Refactoring (no functional change)
  • Performance improvement
  • CI/CD or build changes

Scope

  • blaze (blaze)

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style
  • I have added tests that prove the feature works
  • I have updated the documentation accordingly
  • Lock files are up to date (package-lock.json / Cargo.lock)

Testing

The current public foundation-only head has the following public results:

These results validate only the provider-inventory foundation. They do not
validate automatic warm capacity.

The corrected integration-only reconstruction completed a fresh native Linux
x86_64 matrix with Rust and Cargo 1.88, locked and offline dependencies, and
fresh source and build directories at every commit boundary. Its
integration-only dependency base passed both default and all-feature builds.
Each of the four feature commits passed formatting; locked and offline metadata;
default and all-feature workspace builds for all targets; strict default and
all-feature Clippy; serial default and all-feature workspace tests; strict
default and all-feature rustdoc; focused tests; and source and tree
reconciliation.

Feature commit Default tests All-feature tests Focused tests
Durable cleanup authority 349 384 24
Automatic storage capacity 361 406 24
Backend preforking 362 416 21
Documentation 362 416 64

The documentation commit also passed bilingual documentation lint and link
checks. Its documentation content and the intended feature trees were unchanged
by the dependency-only test correction. Every recorded command completed
normally; no result depends on a skipped command or an infrastructure failure.

This is private integration evidence only. It is not attached to the public
head and is not a merge candidate. Any change to main, #2290, or #2471 makes
this matrix historical evidence.

Before this draft can become ready, the published final head and its
current-main merge candidate must repeat the complete Linux contract, including
a real daemon smoke test for storage-only and preforked capacity.

Dependencies

The startup inventory prerequisite from #2113 is already in main.

The complete feature depends on:

The unpublished integration-only reconstruction used these exact historical
inputs:

Both dependency pull requests remain open. This Draft must not be merged or
marked Ready on the strength of that integration-only reconstruction.

After both dependencies merge, the four feature commits must be reconstructed
on the then-current exact main. The new public head and its newly generated
merge candidate must repeat the complete exact-head Linux validation, all
GitHub-hosted workflows, the public CLA status, and a fresh exact-head Codex
review before this Draft can be marked Ready.

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

@WeissonHan
WeissonHan force-pushed the feature/blaze/owned-file-slot-inventory branch from 49d9441 to 1c99a7b Compare August 10, 2026 08:26

Copy link
Copy Markdown
Collaborator Author

@codex review This PR adds an optional storage-provider inventory for complete and partial owned slots, with strict file-provider classification and idempotent release by stable ID. Please review the complete pull request: every commit, the cumulative diff against the base branch, and the implementation, tests, and documentation as one submitted change.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c99a7b558

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

Comment thread src/blaze/crates/blaze-core/src/storage.rs
@WeissonHan
WeissonHan force-pushed the feature/blaze/owned-file-slot-inventory branch from 1c99a7b to 84e4521 Compare August 10, 2026 09:01

Copy link
Copy Markdown
Collaborator Author

@codex review This PR adds an optional storage-provider inventory for complete and partial owned slots, with strict file-provider classification, retryable release by stable ID, and matching English and Chinese protocol documentation. Please review the complete pull request: every commit, the cumulative diff against the base branch, and the implementation, tests, and documentation as one submitted change.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 84e452117d

ℹ️ 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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 84e452117d

ℹ️ 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 marked this pull request as ready for review August 12, 2026 02:27
@WeissonHan
WeissonHan requested a review from casparant as a code owner August 12, 2026 02:27

@qoderai qoderai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本次审查范围内未发现需要修改的问题。


🤖 Generated by QoderView workflow run

@WeissonHan
WeissonHan force-pushed the feature/blaze/owned-file-slot-inventory branch from 84e4521 to 9a96680 Compare August 12, 2026 06:44
@WeissonHan

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 9a96680574

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

This enables `StorageProvider` callers to enumerate complete and partially
created slots under the configured root and release them by stable ID through
an optional provider contract.

Previously, release by ID could clean up a known slot, but no provider-neutral
inventory exposed residual directories. The file provider now validates every
direct entry, returns IDs in stable order, and refuses linked, non-directory,
invalid, or unrepresentable entries instead of silently skipping them.

The inventory is point-in-time, so a future caller that needs a stable boundary
must serialize it with acquire and release operations. This is a provider
foundation; no daemon consumer or restart reconciliation policy is wired here.

Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
Signed-off-by: Weisson Han <wenshu.hx@linux.alibaba.com>
@WeissonHan

Copy link
Copy Markdown
Collaborator Author

@codex review

@WeissonHan
WeissonHan force-pushed the feature/blaze/owned-file-slot-inventory branch from 9a96680 to afde1cd Compare August 12, 2026 08:02
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 9a96680574

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

Copy link
Copy Markdown
Collaborator Author

@codex review

This PR adds an internal storage capability for discovering and cleaning
file-backed sandbox directories by stable identifier. Please review the complete
pull request: every commit, the cumulative diff against the base branch, and the
implementation and tests as one submitted change.

The earlier reader-facing design-document additions have been removed because
this change has no CLI, HTTP, configuration, persisted-format, or daemon behavior
impact.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: afde1cd0e2

ℹ️ 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 marked this pull request as draft August 12, 2026 12:39

Copy link
Copy Markdown
Collaborator Author

This PR has been returned to Draft while it is reorganized around its first production caller.

The current head provides the internal storage inventory contract and file-backed implementation, but it does not yet change daemon behavior. The same foundation will remain as the first commit of a cohesive automatic warm-runtime feature. Later commits in this PR will directly consume it for bounded background preparation, compatible create-time claims, restart reconciliation, and cleanup.

This avoids merging an internal contract without a live caller. The branch will be rebased onto the current main after the startup-inventory prerequisite in #2113 lands, then every final commit will receive exact-SHA Linux validation and a complete-PR review before the PR is marked ready again.

Dependency: #2113

@WeissonHan WeissonHan changed the title feat(blaze): inventory provider-owned slots feat(blaze): maintain automatic warm capacity Aug 13, 2026
@WeissonHan
WeissonHan marked this pull request as ready for review August 14, 2026 02:44
@WeissonHan
WeissonHan marked this pull request as draft August 15, 2026 06:18
@WeissonHan
WeissonHan marked this pull request as ready for review August 16, 2026 08:58
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: maintain automatic warm runtime capacity

1 participant