Skip to content

Artifact cleanup dry-run advertises confusing apply command #802

Description

@chubes4

During cleanup on 2026-06-25, studio wp datamachine-code workspace cleanup run --mode=artifacts --dry-run --limit=100 --format=json returned an artifact cleanup plan with a top-level run_id and recommended apply command, but the nested plans.artifact_cleanup.apply_command was the same dry-run command:

studio wp datamachine-code workspace cleanup run --mode=artifacts --dry-run --format=json

The actual destructive command was only available later under summary.recommended_commands[].command as:

studio wp datamachine-code workspace cleanup apply <run-id>

Why this slows cleanup:

  • The field named apply_command does not apply anything.
  • Agents/operators have to inspect multiple parts of the JSON and decide which command is authoritative.
  • The run output mixes old lower-level ability wording with the newer DB-backed plan/apply flow.

Desired shape:

  • For dry-run/plan output, expose one authoritative apply_command near the top-level summary.
  • Rename nested preview commands to preview_command or rerun_preview_command.
  • Keep command semantics consistent across worktree cleanup and artifact cleanup.

Evidence from this run:

  • Plan cleanup-run-20260625114143-lXj1EJEmNVz5 was applied successfully with workspace cleanup apply cleanup-run-20260625114143-lXj1EJEmNVz5 --format=json.
  • The nested artifact plan still advertised the dry-run command as apply_command.

AI assistance: filed from an OpenCode cleanup session using openai/gpt-5.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions