Skip to content

fix: expose scoped artifact cleanup apply command#616

Merged
chubes4 merged 2 commits into
mainfrom
fix/issue-615-cleanup-artifacts-dry-run-apply
Jun 9, 2026
Merged

fix: expose scoped artifact cleanup apply command#616
chubes4 merged 2 commits into
mainfrom
fix/issue-615-cleanup-artifacts-dry-run-apply

Conversation

@chubes4

@chubes4 chubes4 commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a machine-readable apply_command to artifact cleanup dry-run results so JSON callers can apply the same reviewed bounded page.
  • Preserve artifact cleanup page scope in the command with --limit, --offset, or --exhaustive.
  • Update low-level direct-apply refusal and human dry-run output to point at the exact high-level cleanup command.

Closes #615.

Verification

  • php tests/smoke-worktree-cleanup-artifacts.php
  • php tests/smoke-worktree-cleanup-cli.php
  • php -l inc/Workspace/WorkspaceArtifactCleanup.php && php -l inc/Cli/Commands/WorkspaceCommand.php && php -l tests/smoke-worktree-cleanup-artifacts.php && php -l tests/smoke-worktree-cleanup-cli.php

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Drafted the code/test changes and ran targeted verification; Chris remains responsible for review and merge.

@homeboy-ci

homeboy-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine-code

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
ℹ️ Save lint baseline: homeboy lint data-machine-code --baseline
Deep dive: homeboy lint data-machine-code --changed-since 551353d

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-code/actions/runs/27234001375

Test

test — failed

ℹ️ No tests ran — the runner failed before producing results. See raw_output.stderr_tail / raw_output.stdout_tail for the underlying error (bootstrap failure, missing deps, DB connection, etc.).
ℹ️ To run specific tests: homeboy test data-machine-code -- --filter=TestName
ℹ️ Auto-fix lint issues: homeboy refactor data-machine-code --from lint --write
ℹ️ Collect coverage: homeboy test data-machine-code --coverage
ℹ️ Analyze failures: homeboy test data-machine-code --analyze
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine-code --changed-since 551353d

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-code/actions/runs/27234001375

Audit

audit — passed

  • audit — 27 finding(s)
  • Total: 27 finding(s)

Deep dive: homeboy audit data-machine-code --changed-since 551353d

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-code/actions/runs/27234001375
Tooling versions
  • Homeboy CLI: homeboy 0.227.3+ade6a0c
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 7bd871d3
  • Action: unknown@unknown

@chubes4

chubes4 commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

CI homeboy / Test is currently blocked by an upstream WP Codebox generated-runner parse error, not by this DMC change.

Root cause: wordpress.phpunit generated invalid PHP for pg_resolve_runtime_cwd():

str_replace('\', '/', $cwd)

That reproduces the CI failure shape:

PHP Parse error: syntax error, unexpected single-quoted string ") {", expecting ")" in /internal/eval.php on line 287

Upstream fix: Automattic/wp-codebox#860

Local verification with the fixed WP Codebox worktree wired into Homeboy passed:

HOMEBOY_WP_CODEBOX_BIN=/Users/chubes/Developer/wp-codebox@fix-escape-phpunit-cwd-backslash/packages/cli/dist/index.js \
HOMEBOY_WP_CODEBOX_CORE_MODULE=/Users/chubes/Developer/wp-codebox@fix-escape-phpunit-cwd-backslash/packages/runtime-core/dist/index.js \
homeboy --force-hot --allow-local-hot test data-machine-code \
  --path /Users/chubes/Developer/data-machine-code@fix-issue-615-cleanup-artifacts-dry-run-apply \
  --changed-since origin/main

Result: success: true, status: passed.

@chubes4 chubes4 merged commit 235c750 into main Jun 9, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make cleanup-artifacts dry-run/apply workflow symmetric

1 participant