feat(blaze): capture sandbox checkpoints - #2472
Conversation
cc02562 to
c7aa317
Compare
|
@codex review Please review the generic full-checkpoint capture and listing workflow, with particular attention to durable publication boundaries, cancellation and restart recovery, and retained filesystem ownership. |
c7aa317 to
56bc391
Compare
|
@codex review Please review the updated exact head. The only change since the previous request is a test-only feature gate required by the default-feature Rust 1.88 Clippy job; please focus on the generic checkpoint capture/list workflow and its durable publication, cancellation, restart, and retained-ownership behavior. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56bc391ed7
ℹ️ 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".
56bc391 to
995bab7
Compare
|
@codex review Please review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 995bab7ebb
ℹ️ 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".
995bab7 to
93cbdb9
Compare
|
Addressed the exact-head Codex permission finding in Checkpoint catalog, sandbox, staging, and committed directories are now created with owner-only Focused coverage verifies the complete tree under a permissive umask, rejects external hard links without permission side effects, and preserves cleanup of an interrupted internal rootfs link. The two storage artifact synchronization documents remain unchanged. Exact-head hosted and native Linux validation are running now. |
|
@codex review Verify that checkpoint directories and published artifacts remain private under the packaged service defaults, including hard-link failure behavior. |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
There was a problem hiding this comment.
[P1] 沙箱检查点生命周期和 journal 设计整体合理,当前审查重点是并发保护与补偿路径是否始终与持久化边界一致。下面三点是本次审查中相对更重要的细节建议,均已通过行内评论标注。
- 检查点操作在并发下对
operationjournal 的保护需要严格约束所有调用路径使用同一锁,并在 API 层明确拒绝重复 checkpoint 请求。 - 失败补偿与恢复路径目前主要根据状态和 staging id 区分,建议进一步利用
OperationPhase的 durable 边界信息,以保证 journal 与目录真实状态持续同步。 - 文件存储检查点目标目录在 Linux 与其他平台的 retained adapter 语义存在差异,建议在能力探测和错误处理上做显式约束,并在设计文档中标明跨平台行为差异。
🤖 Generated by Qoder • View workflow run
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93cbdb994d
ℹ️ 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".
93cbdb9 to
39b9446
Compare
|
@codex review Add generic full-checkpoint capture and listing with durable publication boundaries and retained staging ownership. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39b9446d7b
ℹ️ 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".
39b9446 to
dcc2284
Compare
|
@codex review Add generic full-checkpoint capture and listing while preserving sparse storage and bounded capture-time lineage validation. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dcc2284322
ℹ️ 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".
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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". |
162a9e4 to
e07d50c
Compare
|
@codex review Please review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e07d50c342
ℹ️ 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".
e07d50c to
27ad45f
Compare
|
@codex review Please review exact head |
e1ca439 to
f53312f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27ad45fa26
ℹ️ 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".
|
@codex review Please review exact head |
Expose lifecycle and guest operations only under /v1/sandboxes. Leave the former /v1/instances namespace unregistered so requests return 404 without reading or changing sandbox state. Remove the reset and placeholder checkpoint handlers together with their now-unused server-state accessors. Keep existing JSON field names unchanged; checkpoint capture follows separately. Signed-off-by: Weisson <Weisson@linux.alibaba.com>
|
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". |
c951f78 to
caa05a1
Compare
|
@codex review Please review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: caa05a1a07
ℹ️ 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".
caa05a1 to
c115f2c
Compare
Add checkpoint creation and history queries under the sandbox API. Capture backend state, guest memory, and the provider-owned writable root into a self-contained, integrity-checked catalog. Journal each durable boundary so cancellation and restart retain ownership until publication, HEAD movement, state persistence, and backend resume have converged. Unsupported providers fail before mutation. Keep the former instance namespace unregistered. Restore, checkpoint deletion, pruning, and Firecracker capture remain outside this change. Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> Signed-off-by: Weisson <Weisson@linux.alibaba.com>
c115f2c to
6f2234d
Compare
|
@codex review Please review exact head |
Description
Blaze can now create and inspect self-contained checkpoints through the
sandbox API:
POST /v1/sandboxes/{id}/checkpointGET /v1/sandboxes/{id}/checkpointsA successful capture pauses the sandbox backend, records backend state and
guest memory, copies the provider-owned writable root, publishes an
integrity-checked manifest, advances the checkpoint HEAD, and resumes the
sandbox. The response retains the existing
checkpoint_idandinstance_idJSON fields.The former
/v1/instancesnamespace is not restored. Requests below thatnamespace continue to return
404without reading or changing sandboxstate.
Behavior and failure boundary
support. Unsupported combinations return
501before state mutation.ownership and require recovery instead of guessing or deleting data.
HEAD status, and HEAD reachability.
checkpoint history. If that cleanup cannot be proven complete, destruction
records
RecoveryRequiredand retains the sandbox's storage ownership.A retry synchronizes the checkpoint catalog even when the sandbox namespace
was already unlinked.
Relationship to #2585
This draft is based on the exact #2585 head
e0ebb106b963ba4784c0daba7a3370b1ddf3e508, which removes the legacy instanceroutes and establishes
/v1/sandboxesas the only lifecycle namespace. Thecheckpoint implementation itself is the single following commit
6f2234d998658727bd20b27ece2e857dfff7dcbf.The PR does not depend on #2293, #2296, or #2471. It remains a draft until
#2585 is merged. After that merge, this one checkpoint commit will be replayed
onto the then-current
main, revalidated, and presented without #2585'schanges in this PR's own diff.
Scope
Included:
Not included:
/v1/instancescompatibility route.Validation
Exact revision:
6f2234d998658727bd20b27ece2e857dfff7dcbfbea101768daadb02ddf062fd838bce47235aaa4ee0ebb106b963ba4784c0daba7a3370b1ddf3e508Author-run validation used Linux x86_64 with Rust and Cargo 1.88, locked and
offline dependencies, a fresh source tree, a fresh Cargo home, and separate
empty target directories for each major stage.
Passed:
cargo fmt --all -- --check;-D warnings, default and all features;precedence, routing, cancellation, recovery, catalog, storage, and backend
regression tests;
Evidence archive SHA-256:
1863cf0bcd2d3df01612e0a58d4b78e9f977833a679939ed672c1c307527fbe4.The exact Linux gate passed. Hosted checks and an exact-head Codex review are
still required for this rewritten draft. All validation will be repeated after
#2585 merges and the commit is replayed onto the current
main.Related issue
Closes #2444