backup restore into a new Store: sandbox create fails with no complete project manifest

Đang mở
#668 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend

Hướng nghiên cứu

Start with write_projects in control/crates/layerfs-store/src/backup/restore.rs, then trace how installed() in control/crates/layerfs-sandbox/src/lifecycle.rs reads the project record through project() in project/discovery.rs. Compare the restore and project init records, and check the backup restore and sandbox creation tests. Done means restoring into a fresh Store leaves a project record that lets sandbox create succeed; the issue leaves open whether restore should write the missing fields or sandbox creation should rebuild them.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

On an M3 Max, macOS 26.6.2, I backed up a Store to a local S3 (rclone serve s3) and restored it into a fresh home. branch fork, file write and file read work on the restored Store, but a Sandbox doesn't start:

$ layerfs backup restore vps lab vps
{"store":"vps","bucket":"lab","file":"vps","bytes":217088,...,"projects":["vps"]}
$ layerfs sandbox create vps/vps sr native
{"code":"NoSuchProject","message":"no complete project manifest","detail":null}

Same on layerfs_v2_0_0 (be317c045) and on #663 (2647fc84e), which I was retesting, and the same when restoring under a new Store name in the same home. Restoring over an existing Store works, because the old project record stays

I think the cause is write_projects in control/crates/layerfs-store/src/backup/restore.rs. For a project with no record it writes ProjectRecord::found, which has only name and stack. sandbox create reads the record through installed() in control/crates/layerfs-sandbox/src/lifecycle.rs, which calls project() in project/discovery.rs. project() needs manifest, and installed() then needs installed. project init writes them (discovery::save_project from project/add.rs), restore doesn't. The keys of the two records:

made by project init:    created, installed, manifest, v
made by backup restore:  name, stack, v

This code is the same on the current layerfs_v2_0_0 (03e4c541). I only ran it on macOS native. Should restore write manifest and installed, or should the Sandbox path rebuild them when they're missing?

Ngôn ngữ chính
Rust
Star
2.1k
Fork
110
Merge trung bình
23 giờ 52 phút
Pull request đã merge (30 ngày)
138

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Ephemeral-AI-Lab/layerfs

Tất cả issue của Ephemeral-AI-Lab/layerfs

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.