wg-html-publish

wg html publish: default rsync flags should include --mkpath

Metadata

Statusdone
Assignedagent-1366
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-05-01T15:33:37.762278983+00:00
Started2026-05-01T15:34:15.664674749+00:00
Completed2026-05-01T16:00:56.150799651+00:00
Tagsfix,html,deploy,polish, eval-scheduled
Eval score0.63
└ blocking impact0.65
└ completeness0.80
└ constraint fidelity0.70
└ coordination overhead0.50
└ correctness0.55
└ downstream usability0.45
└ efficiency0.75
└ intent fidelity0.76
└ style adherence0.80

Description

Description

wg html publish add defaults rsync flags to -avz --delete. Missing --mkpath means the deployment fails on the first run if the destination directory doesn't exist on the remote (rsync exit code 11 = path doesn't exist). User has to either pre-create the remote dir manually OR edit the deployment to add the flag.

User report 2026-05-01 (after first deployment failure with exit 11): 'why not --mkpath?'

--mkpath was added in rsync 3.2.3 (2020). Universally available on modern systems. Failure to use it produces the exact symptom the user just hit — silent rsync 11 with no actionable hint.

Spec

  • Default rsync_flags for new deployments: -avz --delete --mkpath
  • Existing deployments without explicit rsync_flags field: get the new default at runtime (no migration needed; the absent-field path uses the new default)
  • Existing deployments WITH explicit rsync_flags field: respect user's setting (don't override)
  • If rsync version doesn't support --mkpath: fail with a clear pre-flight error suggesting --rsync-flags='-avz --delete' to opt out, OR upgrade rsync. Don't silently strip the flag — that's how regressions happen.

Validation

  • wg html publish add my-test --rsync user@host:/new-path/ defaults to flags including --mkpath
  • Live smoke: register a deployment with a non-existent remote path, run, observe that --mkpath creates the path (instead of exit 11)
  • Existing deployments without rsync_flags field auto-pick up --mkpath on next run
  • Pre-flight check: detect rsync version; if < 3.2.3, error with actionable message at add time
  • cargo build + cargo test pass
  • Permanent smoke scenario added: run a deployment against a freshly-created tmpdir target with NO pre-existing subdir, assert --mkpath creates it
  • cargo install --path . was run before claiming done

Depends on

Required by

Messages 2 messages (2 unread)

  1. #1user2026-05-01T15:35:33.698611740+00:00read
    USER REDIRECT 2026-05-01: do NOT change the default rsync flags. rsync compat with older versions matters; we shouldn't force --mkpath on everyone. Keep default = '-avz --delete' as it is.
    
    REVISED SCOPE:
    1. Add an OPTIONAL `--mkpath` flag to `wg html publish add`. When set, appends '--mkpath' to the new deployment's rsync_flags. When not set, deployment uses the safe default.
    2. Also add `--rsync-flags <STRING>` as a general-purpose override so users can pass any custom flag set (e.g., `--rsync-flags '-avz --delete --mkpath -P'`). When set, completely replaces the default flags. Mutually exclusive with --mkpath (which only adds one flag to the default).
    3. Document both flags in --help text with a clear note: '--mkpath requires rsync >= 3.2.3'
    4. DO NOT change behavior for existing deployments — they keep their stored rsync_flags as-is. No migration. No silent default-change.
    
    Updated validation:
    - [ ] `wg html publish add --help` lists --mkpath and --rsync-flags as options
    - [ ] `wg html publish add foo --rsync ... --mkpath` produces a deployment with rsync_flags='-avz --delete --mkpath'
    - [ ] `wg html publish add foo --rsync ... --rsync-flags '-avzP'` produces deployment with rsync_flags='-avzP' (full override)
    - [ ] `wg html publish add foo --rsync ...` (no flag) → rsync_flags='-avz --delete' (current default unchanged)
    - [ ] `--mkpath` and `--rsync-flags` are mutually exclusive (error at add time if both provided)
    - [ ] Existing deployments unchanged — no auto-rewrite of stored rsync_flags
    
    Drop the 'pre-flight rsync version check' from the original spec — not needed if --mkpath is opt-in. User opting in implies they have new-enough rsync.
    
    This way: power users opt in with one flag (`--mkpath`), users on old rsync are unaffected, no surprise breakage.
  2. #2wg-html-publish2026-05-01T15:51:22.833777887+00:00read
    Acknowledged — pivoting now. Reverting default flags to '-avz --delete', dropping the pre-flight rsync version check, adding --mkpath as an opt-in bool, --rsync-flags as a full override, mutex error if both. Existing deployments untouched. Will rewrite tests + smoke to match.

Log