fix-wg-html

Fix: wg html publish remove should fully delete the scheduling task, not just abandon it

Metadata

Statusfailed
Assignedagent-1391
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-05-01T19:22:24.328863456+00:00
Started2026-05-01T19:47:03.291384010+00:00
Tagsfix,html,deploy,ux, eval-scheduled
Tokens4196457 in / 18776 out
Failure reasonrescue eval unavailable after 2 attempts; falling back to terminal failure

Description

Description

wg html publish remove <name> marks the corresponding .html-publish-<name> task as abandoned but doesn't delete it from the graph. As a result, attempting wg html publish add <same-name> fails with 'Task with ID already exists'.

User report 2026-05-01: removed a 'public-mirror' deployment, then tried to re-add with the same name, got error 'Task with ID .html-publish-public-mirror already exists'.

Two acceptable behaviors

A: remove fully deletes the task (recommended)

The user's intent with 'remove' is clear — they want it gone, including the scheduling task. Just abandoning it leaves a footgun for re-add. Make remove perform a full delete (graph entry + any worktree + any associated artifacts).

B: add reuses an abandoned task with the matching ID

If 'remove' must keep the abandoned task around for audit/history, then 'add' should either:

  • Detect an abandoned task with the same ID and reactivate it (status: abandoned → open, replace its config), OR
  • Fail with a clearer hint: 'Task .html-publish-X exists in abandoned state. Pass --force to overwrite, or use a different deployment name.'

Recommend A. 'Remove' should mean remove. The history of 'we had this deployment and removed it' is captured in the graph operation log already.

Validation

  • Failing test: register deployment foo; remove foo; re-add foo — succeeds without conflict
  • If A: wg list after remove shows NO .html-publish-foo task (entirely gone)
  • If B: wg html publish add foo after a prior remove succeeds AND reports 'reactivated previously-abandoned deployment'
  • No regression: deployments that ARE active can't be accidentally removed (require explicit confirmation OR --force)
  • cargo build + cargo test pass
  • cargo install --path . was run before claiming done

Depends on

Required by

Log