Skip to content

writ adopt needs a registered repository and no deployment: on a fresh install it refuses for want of a deployment, and would adopt into self install's placeholder #1018

Open

Description

@David-Noble-at-work

Ruled 2026-10-02 by the owner: adopt needs no deployment, and adopt requires a registered repository.

Today, a first install followed by writ adopt

  1. self install creates ~/.local/share/devlore/writ/layers/base, team and personal as empty placeholder directories, not repositories (initWritLayers, cmd/internal/cli/selfinstall.go:1153; writ self install creates empty layers/base and layers/team, which repo list reads as registrations and repo add refuses #840).
  2. writ adopt --project common ~/.zshrc passes validation, because the placeholder exists (parseAdoptConfig, cmd/writ/writ/config.go), then refuses with 66 for want of a current lifetime (RunBatches, cmd/writ/writ/adopt/batch.go:97). Nothing moves.
  3. The guide's advice, deploy first, is a dead end. The placeholders hold no scope directory, so deploy falls back to writ.repo, which is unset, and refuses: "no layer configured; use 'writ migrate ' ...".

With the deployment requirement lifted alone

Adopt would move the file into the placeholder -- a plain directory in writ's data home, not the user's repository -- link it back, and write the first lifetime. Then:

  • the adopted file is under no version control;
  • writ deploy fails pinning the layer, because git status fails outside a repository;
  • writ repo set personal <repo> refuses to replace the placeholder, which is no longer empty (writeRegistration, cmd/writ/writ/repo_cmd.go: os.Remove on a directory with content). Nothing is lost, and nothing says what to do.

Resolution

  • Adopt requires a registered repository. The layer it adopts into must be a registration: a link writ repo set wrote, to a working tree. A placeholder or a missing layer is refused, with a message naming writ repo set <layer> <working-tree-root>, and writ migrate for an existing dotfiles repository.
  • Adopt needs no deployment. It writes a new lifetime from the current one's runs, or from none on a machine that has never deployed (docs/architecture/5.1-reconciliation.md § Lifetimes are generations), instead of refusing with 66 and instead of appending to the current lifetime. This places adopt's part of the lifetimes ruling, which the closing of lane 14 (writ adopt carries the platform (--platform <token>) and leaves a deployment record: its graph carries the files annotation and its trace appends to the current lifetime #931) left without a lane.
  • The guide (docs/guides/writ/manage-environments.md § Adopt files you already have) and adopt's help say both.

#840 removes the placeholders; this does not depend on it, since a placeholder is not a registration.

Found 2026-10-02, walking a first install for the owner while placing adopt's part of the lifetimes ruling (#926, lane 7 of #916).

Plan and design documents

Kind Document
Plan No plan yet
Design docs/architecture/5.1-reconciliation.md, docs/guides/writ/manage-environments.md

Epic: #447 · Feature: #762

Metadata

Metadata

Labels

Epic:WritDeploymentwrit deployment: layers, adoption, and driftbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions