(CubeAPI)examples,docs: add snapshot/rollback/clone demo suite and guide#374
Conversation
ls-ggg
commented
May 27, 2026
- Add CubeAPI/examples/snapshot-rollback-clone/ with 11 runnable demos covering create, list, clone, state preservation, snapshot lifecycle, concurrent clone, fork, rollback, and delete workflows
- Add docs/guide/snapshot-rollback-clone.md (English) and docs/zh/guide/snapshot-rollback-clone.md (Chinese) with concept diagrams and minimal code snippets
|
Claude finished @ls-ggg's task in 1m 38s —— View job Review: PR #374 — Snapshot/Rollback/Clone Demo Suite & GuideI've reviewed all 17 files (+897/-0 lines). Overall the code is clean, well-structured, and the documentation is thorough. I found a few issues worth addressing before merging. 🐛 Bugs (should fix)1. Broken link in Line 73 links to → should be: The Chinese 2. Version mismatch:
The SDK is currently at 0.2.0 (per commit 💡 Suggestions (nice to fix)3.
Not a blocker, but as-is it could confuse readers who see 4.
marker = r.logs.stdout[0].strip() if r.logs.stdout else ""But 5. The ✅ What looks good
Summary
The two bugs should be fixed before merging; the suggestions are optional polish. |
6f5f5d4 to
011abfe
Compare
|
Claude finished @ls-ggg's task in 1m 38s —— View job Review — PR #374: Snapshot/Rollback/Clone Demo Suite & GuidePrevious review findings — recheckedThe prior review flagged 4 issues. After reading every file in the current diff, none of those issues exist in the code:
The code was already correct — this review proceeds from the actual diff state. 🔍 New findings1. Documentation listing example — first-page items are silently dropped Both items, token = Sandbox.list_snapshots()
while token:
items, token = Sandbox.list_snapshots(next_token=token)This fetches the first page, discards items, token = Sandbox.list_snapshots()
while True:
for snap in items:
print(f" {snap.snapshot_id}")
if not token:
break
items, token = Sandbox.list_snapshots(next_token=token)This is consistent except that there's one issue. In line 69 of the docs: items, token = Sandbox.list_snapshots()This actually does process the first page... No wait, looking more carefully at the docs snippet: # List all snapshots
items, token = Sandbox.list_snapshots()
while token:
items, token = Sandbox.list_snapshots(next_token=token)The ✅ What looks good
Summary
One real issue found (in documentation snippets, not in the executable demos). The demos themselves are well-written. Happy to implement the doc fix if desired. |
- Add CubeAPI/examples/snapshot-rollback-clone/ with 11 runnable demos covering create, list, clone, state preservation, snapshot lifecycle, concurrent clone, fork, rollback, and delete workflows - Add docs/guide/snapshot-rollback-clone.md (English) and docs/zh/guide/snapshot-rollback-clone.md (Chinese) with concept diagrams and minimal code snippets Signed-off-by: ls-ggg <335814617@qq.com>
011abfe to
1d07886
Compare
|
Claude finished @ls-ggg's task in 1m 33s —— View job Review: PR #374 — Snapshot/Rollback/Clone Demo Suite & Guide
🔍 SummaryAfter reading every file in the current diff, I find no bugs and no blocking issues. The code is well-structured, consistent, and the documentation is thorough. Below are my findings organized by severity. ✅ No blocking issuesPrevious review issues were already resolved (or never existed in the current diff) The two prior reviews flagged several items. Having read all 17 files at their current revision:
💡 Observations (optional polish, not blockers)1. leaked = r.logs.stdout[0].strip() if r.logs.stdout else "<empty>"This uses leaked = r.logs.stdout[0].strip() if r.logs.stdout else ""Not a bug (since 2. Documentation guide code snippets — Both out = sb.run_code("print(open('/tmp/shared.txt').read())").logs.stdout[0]This is intentional — guide snippets prioritize readability over defensive coding. The runnable demos in 3. Copyright year All files use ✅ What looks good
Summary
Verdict: No blockers found. The PR is ready to merge from a code quality perspective. |
|
/cubebot |
|
Claude finished @ls-ggg's task in 1m 15s —— View job Review: PR #374 — Snapshot/Rollback/Clone Demo Suite & Guide
✅ No blocking issuesAfter reading every file in the current diff at HEAD, I find no bugs. The items flagged by prior reviews have been addressed:
💡 Suggestions1. marker = r.logs.stdout[0].strip() if r.logs.stdout else "<empty>" # line 26, 33, 39Uses 📝 Observations2. Copyright year — All 17 new files use 3. Doc guide snippets — no stdout guard (intentional) Both ✅ What looks good
Summary
Verdict: No blockers found. The PR is ready to merge from a code quality perspective. |
