Skip to content

file.mkdir obeys --conflict, the conflict policy has three names and one floor, and the winget driver reads winget as winget does - #901

Merged
David-Noble-at-work merged 1 commit into
developfrom
fix/822-mkdir-obeys-conflict
Sep 21, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
fix/822-mkdir-obeys-conflict

Conversation

@David-Noble-at-work

@David-Noble-at-work David-Noble-at-work commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Lanes 12 to 14 of #887.

  • file.mkdir obeys --conflict (#822, pulled forward
    from #894) — a non-directory occupant of mkdir's path is
    the write seam's occupied target: stop refuses in the seam's words, skip returns nothing, replace archives the
    occupant to the recovery site and creates, and the receipt restores the occupant on compensation. A directory at the
    path is the idempotent case; every refusal precedes the claim. Nine cells, three round trips, the directory pin;
    the lifecycle scenarios that inject a failure by occupying an mkdir's path select stop.
  • The conflict policy's vocabulary (#899) — six sites:
    writ deploy's Examples and the guide named backup and overwrite, which the flag rejects; three comments called
    two different defaults the floor. Three names and no others, everywhere; the seam's floor is replace;
    writ deploy's default is stop; BackupSuffix is the backup action's. The script asserts the search finds
    nothing.
  • The winget driver reads winget as winget does (#900)
    — version and installed matched the id case-sensitively against winget list's output, which prints the
    catalog's casing, so an installed package read as absent and every install failed the post-state check; one
    parser, wingetListedVersion, compares under strings.EqualFold, tested on every leg with the captured listing.

Test plan

Time

Marker UTC Elapsed
opened (first commit) 2026-09-21T05:14:42Z —
submitted (PR opened) 2026-09-21T05:14:52Z 0 h after opened
merged 2026-09-21T05:27:18Z 0.2 h after submitted; 0.2 h in all

Computed by the algorithm of noblefactor-ops#188 at merge.

https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW

…one floor, and the winget driver reads winget as winget does

--conflict answers one question -- what writ does when something already exists
at a target it is about to write -- and file.link and file.copy answered it while
file.mkdir did not: anything at its path that was not a directory was an error
under every policy, and a real writ deploy stopped there on both virtual machines,
on a stale symlink, invoked with --conflict=replace.

Mkdir now observes the leaf and lets the policy govern a non-directory occupant:
stop refuses in the seam's words, skip returns nothing and changes nothing,
replace discovers the occupant as its kind, archives it to the recovery site,
tells the catalog it is gone, and then claims and creates the directory, with the
receipt carrying the archive id and digest. Every refusal precedes the claim. A
directory at the path is the idempotent case and the policy is never consulted.
compensateMakeDir restores the archived occupant once the directory it gave way
to is gone. Nine cells -- a file, a live symlink, a dangling symlink, by three
policies -- three round trips, and the directory pin prove it; the lifecycle
scenarios that injected a failure by occupying an mkdir's path now select stop,
the policy under which that is a refusal.

The policy's vocabulary was drifting in six places: writ deploy's Examples and
the guide named backup and overwrite, which the flag rejects, and three comments
called two different defaults the floor. The three names are stop, skip and
replace, everywhere; the seam's floor is replace; writ deploy's default is stop;
and BackupSuffix belongs to the backup action, not to conflict resolution.

Running the Windows sequence for the first lane found the winget driver's
post-check matching the package id case-sensitively against winget's
case-insensitive answer: winget prints the catalog's casing, vim.vim for a query
of Vim.Vim, so an installed package read as absent, every install "did not reach
the requested state", and the deploy stopped in the packages subgraph before its
first file unit. One parser, wingetListedVersion, now reads the listing as winget
does, and version and installed share it.

Closes #822
Closes #899
Closes #900
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