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.
During cleanup on 2026-06-25,
studio wp datamachine-code workspace cleanup run --mode=artifacts --dry-run --limit=100 --format=jsonreturned an artifact cleanup plan with a top-levelrun_idand recommended apply command, but the nestedplans.artifact_cleanup.apply_commandwas the same dry-run command:studio wp datamachine-code workspace cleanup run --mode=artifacts --dry-run --format=jsonThe actual destructive command was only available later under
summary.recommended_commands[].commandas:studio wp datamachine-code workspace cleanup apply <run-id>Why this slows cleanup:
apply_commanddoes not apply anything.Desired shape:
apply_commandnear the top-level summary.preview_commandorrerun_preview_command.Evidence from this run:
cleanup-run-20260625114143-lXj1EJEmNVz5was applied successfully withworkspace cleanup apply cleanup-run-20260625114143-lXj1EJEmNVz5 --format=json.apply_command.AI assistance: filed from an OpenCode cleanup session using openai/gpt-5.5.