Skip to content

The conflict policy's vocabulary drifts: writ deploy's Examples and the guide name backup and overwrite, which the flag rejects, and three comments call two different defaults the floor #899

Closed

Description

@David-Noble-at-work

writ's surface (#463); the words are the seam's.

The drift

--conflict has three names — stop, skip, replace — and ParseConflictPolicy
(pkg/op/runtime_environment.go:794) rejects any other: invalid conflict policy %q: must be stop, skip, or replace.
The seam's floor is replace (NewRuntimeEnvironmentConfig, runtime_environment.go:841); writ deploy's flag
default is stop. Six sites say otherwise, enumerated 2026-09-20 at ad2219ef:

Policy names that do not exist

  1. cmd/writ/writ/commands.go:45-46 — the writ deploy Examples: --conflict=backup, --conflict=overwrite.
    docs/cli/writ/deploy.md is generated from that text and carries them into the reference.
  2. docs/guides/writ/manage-environments.md:36-41 — the same two, captioned "Back up conflicting files with
    timestamps" and "Overwrite without backup". Neither describes anything writ does: replace archives the occupant
    to the recovery site, restorable.
  3. pkg/op/runtime_environment.go:58 and :819 — BackupSuffix "appended to back up filenames during conflict
    resolution". Conflict resolution never suffixes; it archives. The field serves file.backup.

The default, said three ways

  1. pkg/op/provider/file/provider.go:2059 — conflictPolicy: "the announced runtime section's floor applies
    (ConflictStop)". The floor is ConflictReplace.
  2. pkg/op/runtime_environment.go:789 — ParseConflictPolicy: "" "parses as the ConflictStop floor". "" is
    the flag's zero value and parses as stop, the command line's default; the seam's floor is replace. Two
    different things called "floor".
  3. docs/architecture/configuration.md:372 — "ConflictPolicy: ConflictStop directly — the floor is a compiled-in
    default". The compiled-in default is ConflictReplace.

Correct as they stand: cmd/writ/writ/deploy/deploy.go:273 ("replace for a cleared default-stop run"), the guide's
"Stop on first conflict (default)" for writ deploy, docs/architecture/3.5.4-file-provider.md §3 and its status
row.

Found planning #822, whose fix puts the same three words into file.mkdir.

The rule

The policy has three names, stop, skip and replace, and no others, everywhere. The seam's floor is replace.
writ deploy's default is stop. "Back up", "overwrite" and "timestamps" are not its vocabulary.

Done when

  • writ deploy --help and docs/guides/writ/manage-environments.md show stop, skip and replace and nothing
    else, each captioned with what it does; docs/cli/writ/deploy.md regenerates to match
  • the three comments say what the code does: "" parses as stop, the command line's default; the seam's floor
    is replace; BackupSuffix serves file.backup, not conflict resolution
  • a search of cmd/, pkg/, docs/guides/ and docs/architecture/ for conflict=(backup|overwrite) finds nothing

's lane 13, under the command line schedule
Ticked 2026-09-21, in lane 12's pull request. Sites 1-6 edited as enumerated; docs/cli/writ/deploy.md is not a
repository file (/docs/cli/ is ignored; docs-publish.yaml generates it from source), and a local make docs shows
its Examples as --conflict=replace and --conflict=skip. The pull request script asserts the search finds nothing.

Plan and design documents

Kind Document
Plan docs/plans/fix/822-mkdir-obeys-conflict.md
Design docs/architecture/3.5.4-file-provider.md
Design docs/architecture/3.4-platform-package-managers.md

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions