Skip to content

Fix retention cleanup plan worktree rows#854

Merged
chubes4 merged 2 commits into
mainfrom
fix/cleanup-retention-plan-removals
Jul 3, 2026
Merged

Fix retention cleanup plan worktree rows#854
chubes4 merged 2 commits into
mainfrom
fix/cleanup-retention-plan-removals

Conversation

@chubes4

@chubes4 chubes4 commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Make bounded retention cleanup planning use the same probed worktree cleanup preview path as lower-level paginated dry-runs, so safe local-merged, remote-tracking-clean, and upstream-gone candidates become DB-backed worktree_removal rows.
  • Add reviewed apply-path evidence to bounded worktree cleanup pagination and update non-dry-run pagination/budget errors to point at the DB-backed plan/apply path.
  • Pass cleanup plan --until-budget through the CLI and cover the contract with a focused test.

Closes #844.

Tests

  • php tests/cleanup-retention-plan-worktree-removals.php && php tests/artifact-cleanup-plan-output-contract.php && php tests/worktree-cleanup-candidate-classifier.php
  • php -l inc/Workspace/WorkspaceCleanupPlan.php && php -l inc/Workspace/WorkspaceWorktreeCleanupEngine.php && php -l inc/Cli/Commands/WorkspaceCommand.php && php -l tests/cleanup-retention-plan-worktree-removals.php
  • for test in tests/*.php; do case "$test" in tests/worktree-metadata-reconciliation-finalizer-contract.php) continue ;; esac; php "$test" || exit 1; done

Full tests/*.php currently fails in existing tests/worktree-metadata-reconciliation-finalizer-contract.php, which asserts a hard-coded source substring unrelated to this cleanup plan change.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenAI gpt-5.5 via OpenCode
  • Used for: Implementing the cleanup plan/apply contract fix, adding focused tests, and preparing the PR.

@homeboy-ci

homeboy-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine-code

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
Deep dive: homeboy lint data-machine-code --changed-since dd9eba5

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/28662431572

Test

test — passed

ℹ️ Auto-fix lint issues: homeboy refactor data-machine-code --from lint --write
ℹ️ Collect coverage: homeboy test data-machine-code --coverage
ℹ️ Save test baseline: homeboy test data-machine-code --baseline
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine-code --changed-since dd9eba5

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/28662431572

Audit

audit — passed

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

Deep dive: homeboy audit data-machine-code --changed-since dd9eba5

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/28662431572
Tooling versions
  • Homeboy CLI: homeboy 0.280.11+736802209663+a8e4990
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 3928b318
  • Action: unknown@unknown

@chubes4 chubes4 merged commit c551383 into main Jul 3, 2026
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.

Cleanup plan/apply contract misses safe rows found by worktree cleanup preview

1 participant