Skip to content

home/machine identity and project completeness: detect what cannot work - #753

Draft
mengmengmengqiang wants to merge 4 commits into
Ephemeral-AI-Lab:layerfs_v2_0_0from
tokenaissance:fix/project-manifest-detection
Draft

mengmengmengqiang wants to merge 4 commits into
Ephemeral-AI-Lab:layerfs_v2_0_0from
tokenaissance:fix/project-manifest-detection

Conversation

@mengmengmengqiang

@mengmengmengqiang mengmengmengqiang commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Fixes the detection/identity failures from layerfs-project#752 (c2–c8):

  • c2 — machine provider names use the full home id (16 hex); provider_name validates the recorded vm_name against the current home (legacy 8-hex and lfs- names accepted), and NEW_NAME_MAX becomes 38.
  • c3 — data volumes are created with layerfs.home/layerfs.machine labels; doctor reports orphan, wrong-home and unlabeled volumes on the built-in docker node.
  • c4 — home.layout cross-checks the layerfs.json id against machine and sandbox records (three sandbox naming eras), after the scan's stability gate, with no mv advice.
  • c5 — worker roots are detected by content (Layout::WorkerRoot), refused by open/ensure and the doctor, and never adoptable.
  • c6 — a real home that lost layerfs.json is DataWithoutMarker; home init --adopt writes the marker without touching data, deriving the id prefix from records and auditing read-only.
  • c7 — a local SQLite project needs a decodable manifest/installed; project.get/list/doctor show broken/failed and point at project delete.
  • c8 — doctor --fail-on never|error (default never), unreadable workspace records become not_checked, missing-home capacity is unknown, per-check backup deadlines, Init count cross-check, and the new project.prune for a directory with no record.

Verification

  • c2: cargo check -p layerfs-home -p layerfs-machine -p layerfs-sandbox, unit tests.
  • c3: cargo check -p layerfs-platform -p layerfs-control -p layerfs-api --features machine; platform/control tests.
  • c4: doctor_host 17 passed; home/machine tests.
  • c5: home_layout 12 + doctor_host 18 passed; layerfs-home tests.
  • c6: home_layout 21 + doctor_host 19 + home_calls 10 + contract 11 passed.
  • c7: store tests; doctor_targets 7, project_state 8, contract 11.
  • c8: control doctor/prune 59, store 104, api contract/project/calls 42, cli 16 passed.
  • Workspace cargo check --workspace passes; the container cannot run all mount/FUSE/linker-heavy tests (pre-existing environment limits), so the scoped suites above are the evidence.

Notes

  • Branch fix/project-manifest-detection, base layerfs_v2_0_0.
  • Known environment-only failures: privileged mount/fusectl, lima on this host, and full-workspace linking under the container memory limit.

mengmengmengqiang and others added 4 commits November 21, 2026 20:43
…pleteness

c3: label data volumes and report orphan/unlabelled volumes
c4: cross-check home.layout id against machine and sandbox records
c5: detect worker roots by content and refuse adopt
c6: home init --adopt for a data home without a marker
c7: require a decodable project record for local SQLite projects
c8: doctor --fail-on, init count checks and project prune
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.

1 participant