Skip to content

Fix bounded cleanup run apply batches#551

Merged
chubes4 merged 1 commit into
mainfrom
fix/issue-550-cleanup-apply-progress
Jun 4, 2026
Merged

Fix bounded cleanup run apply batches#551
chubes4 merged 1 commit into
mainfrom
fix/issue-550-cleanup-apply-progress

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented Jun 4, 2026

Summary

  • Bounds DB-backed cleanup apply / resume to a small row batch instead of applying every pending artifact and worktree row synchronously.
  • Marks partially applied runs as needs_resume with a concrete resume command instead of leaving long-running operator sessions silent or stuck in applying.
  • Wires --limit through CLI and ability inputs, and adds smoke coverage for bounded apply/resume sequencing.

Fixes #550.

Verification

  • php -l inc/Workspace/CleanupRunService.php && php -l inc/Abilities/WorkspaceAbilities.php && php -l inc/Cli/Commands/WorkspaceCommand.php && php -l tests/smoke-cleanup-run-storage.php && php -l tests/smoke-worktree-cleanup-cli.php
  • php tests/smoke-cleanup-run-storage.php
  • php tests/smoke-worktree-cleanup-cli.php
  • git diff --check

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Diagnosing the cleanup apply timeout, implementing the bounded apply/resume behavior, and adding targeted smoke coverage. Chris remains responsible for review and testing.

@chubes4 chubes4 merged commit a31d695 into main Jun 4, 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 workspace worktree cleanup fast, bounded, and recoverable

1 participant