verify-correct-wg-2

Verify + correct wg-html-publish: --mkpath must be opt-in flag, not default

Metadata

Statusdone
Assignedagent-1371
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-05-01T15:41:07.562107310+00:00
Started2026-05-01T16:03:39.112891129+00:00
Completed2026-05-01T16:09:23.798117263+00:00
Tagspriority-high,fix,verify,html,deploy, eval-scheduled
Eval score0.94
└ blocking impact0.95
└ completeness0.95
└ constraint fidelity0.85
└ coordination overhead0.95
└ correctness0.95
└ downstream usability0.90
└ efficiency0.90
└ intent fidelity0.91
└ style adherence0.95

Description

Description

Safety task that runs after wg-html-publish lands. Verifies the implementation matches the user's revised scope (live redirect via wg msg send) and corrects if the agent didn't pick up the message.

Background

wg-html-publish was originally specced to make -avz --delete --mkpath the default rsync flag set. User redirected via wg msg send after the agent had started: keep default UNCHANGED (-avz --delete), make --mkpath an opt-in CLI flag on wg html publish add, plus add --rsync-flags <STR> for full override.

The agent may or may not have read the redirect before committing. This task ensures the right outcome regardless.

What to do

Step 1: verify current state after wg-html-publish lands

Test against the freshly-built binary:

  • wg html publish add --help — list of flags. Should include --mkpath AND --rsync-flags.
  • wg html publish add testverify --rsync /tmp/wgtest-default/ (no --mkpath flag). Inspect resulting toml: rsync_flags should be -avz --delete (NOT include --mkpath). If it includes --mkpath, agent shipped the wrong scope.
  • wg html publish add testverify-mkpath --rsync /tmp/wgtest-mkpath/ --mkpath. Inspect toml: rsync_flags should be -avz --delete --mkpath.
  • wg html publish add testverify-custom --rsync /tmp/wgtest-custom/ --rsync-flags '-avzP'. Inspect toml: rsync_flags should be -avzP (full override).
  • wg html publish add testverify-conflict --rsync /tmp/x/ --mkpath --rsync-flags '-avz'. Should ERROR (mutually exclusive).
  • Existing deployments (e.g., the user's 'public-mirror') should have UNCHANGED rsync_flags from before this fix landed — no auto-migration.

Step 2 (only if needed): correct the implementation

If wg-html-publish shipped with default = '-avz --delete --mkpath' instead of as an opt-in flag:

  1. Revert the default change: rsync_flags default returns to '-avz --delete'
  2. Add the --mkpath flag if missing (appends '--mkpath' to default when set)
  3. Add the --rsync-flags flag if missing (full override; mutually exclusive with --mkpath)
  4. Add the validation that they're mutually exclusive
  5. Drop any pre-flight rsync version check that may have been added
  6. Confirm existing deployments aren't migrated automatically (their stored rsync_flags stay as-is)

If wg-html-publish ALREADY shipped this correctly: this task does nothing substantive. Posts a 'verified clean — no corrections needed' note in the log and exits.

Step 3: cleanup test deployments

Whichever path Step 2 took, remove the test deployments created in Step 1: wg html publish remove testverify testverify-mkpath testverify-custom

Validation

  • wg html publish add --help shows --mkpath and --rsync-flags as options
  • Default behavior (no flag): rsync_flags = -avz --delete (unchanged from pre-task)
  • --mkpath flag appends to default; --rsync-flags overrides; mutually exclusive
  • User's existing 'public-mirror' deployment unchanged
  • Test deployments cleaned up
  • cargo build + cargo test pass
  • cargo install --path . was run before claiming done

Process note

This is a safety net for live-redirect uncertainty. Same pattern as verify-correct-wg (earlier today, which also turned out to be a no-op verification because the agent did pick up its redirect). Either outcome is fine — verify-clean is a few hundred K tokens; correct-on-miss is medium work. The cost is small relative to shipping the wrong default rsync flag.

Depends on

Required by

Log