Skip to content

writ repo set refuses a URL layer whose clone directory exists from an earlier, unregistered run: the rerun cannot recover #983

Open

Description

@David-Noble-at-work

writ repo set <layer> <url> refuses when the clone's destination, XDG_DATA_HOME/devlore/writ/repos/<name>, already exists but isn't that layer's current registration (cmd/writ/writ/repo_cmd.go:520-522). A clone that lands and whose registration then fails (repo_cmd.go:240-242) therefore leaves a directory that makes the same command fail on the rerun. The recovery the idempotency ruling promises ("running the same command again is the recovery", ruled 2026-09-26) doesn't hold for that failure.

Read from the code at e2653443, not reproduced. Found drafting #950 (PR B of #949), whose installer calls writ repo set for each layer given.

Resolution

A rerun completes what the first run started: when the destination already holds a clone of the same repository, repo set registers it rather than refusing. A destination holding something else is still refused.

Plan and design documents

Kind Document
Plan Not yet opened

Epic: #447 · Feature: #463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Epic:WritDeploymentwrit deployment: layers, adoption, and driftSeverity:MediumBroken with a workaround, or a narrow pathbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions