Skip to content

Pre-flight under --conflict=stop lists only file targets: a directory target that is occupied is missed, so the refusal is incomplete and the run fails later #831

Open

Description

@David-Noble-at-work

Feature: #463 — writ command surface: layers, segments, adoption. Found: 2026-09-05 on DANOBLE-WD11-3.

The contract

--conflict=stop (the default) means: if anything exists at any target the deploy will write, refuse before
writing, and tell me every such target.
The user reads the list, decides, and reruns with skip or replace.

The defect

Pre-flight builds its target list from the plan's file entries — the paths that get a link or a copy. The
directories the deploy creates for them are targets too, claimed in the resource catalog like everything else, but
they are not in that list. So:

On DANOBLE-WD11-3 the stop run listed 32 occupied targets. ~\.config\git, a directory target occupied by a stale
symlink, was not among them, and the replace run then failed on it.

The fix

Pre-flight reads every planned target — file and directory — from the same source the planner used (the catalog's
claimed entries, or the plan's units), and the stop refusal lists all of them.

Acceptance

  • an occupied directory target appears in the stop refusal list alongside the file targets
  • a unit test: a plan with one link under an occupied directory path refuses under stop naming the directory
  • writ deploy noblefactor on DANOBLE-WD11-3 under stop lists ~\.config\git with the other 32

Not part of this issue

What to do about the 41 dangling links Tuckr left on the machine is the user's housekeeping (Remove-BrokenLinks in
the Personal repository's Install-WindowsUserConfiguration.ps1). Whether writ migrate should sweep them at the
cutover is a separate question for #463, not filed. writ needs no notion of "dangling": under replace an occupant is
replaced, whatever it is (#822).

Related

#822 (file.mkdir ignores the policy), #813 (where the 41 links were first documented), #812, #814, #818, #819,
#820, PR #821.

Activity

  1. changed the title [-]Dangling symlinks left by the previous dotfile manager are treated as occupants to protect; they are debris, and one of them can stop a deploy cold[/-] [+]Pre-flight under --conflict=stop lists only file targets: a directory target that is occupied is missed, so the refusal is incomplete and the run fails later[/+] on Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area:CLICommand-line interfaceEpic:WritDeploymentwrit deployment: layers, adoption, and driftPriority:P1This cycleSeverity:HighA supported path is broken with no workaroundThread:WritDeploydeploying converges the machinebugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions