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

Abierto
#668 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?

Lenguaje dominante
Rust
Estrellas
2.1k
Forks
110
Merge medio
23 h 52 min
PR fusionados (30 d)
138

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Ephemeral-AI-Lab/layerfs

Todos los issues de Ephemeral-AI-Lab/layerfs

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.