feat(workspace): report worktree disk cleanup pressure#149
Merged
Conversation
4f64a7c to
bd8f988
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Incident context
On 2026-04-29,
/Users/chubes/Developerhad 787 worktree-like directories using about 712.6 GiB.homeboy@*alone accounted for 215 directories and about 592.0 GiB; removing 208 clean Homeboy worktrees freed about 572.7 GiB.This PR makes that kind of pressure visible before cleanup becomes an emergency, without loosening the existing dirty/unpushed safety gates.
Changes
size_bytes,estimated_size_bytes,last_touched_at,age_days,artifact_size_bytes,artifacts, andstale_reason.--staletoworkspace worktree listfor quick old/dirty/missing-metadata review.top_by_size/top_by_ageJSON summaries.--sort=size|agefor cleanup candidate ordering.target, Node build/dependency caches, and Composervendor, with adatamachine_code_worktree_artifact_profilefilter.pr-mergedand closed-unmerged branches getpr-closed.Tests
php -l inc/Workspace/Workspace.php && php -l inc/Cli/Commands/WorkspaceCommand.php && php -l inc/Abilities/WorkspaceAbilities.php && php -l tests/smoke-worktree-cleanup-cli.php && php -l tests/smoke-worktree-cleanup.php && php -l tests/smoke-worktree-cleanup-github-cache.phpphp tests/smoke-worktree-cleanup-cli.phpphp tests/smoke-worktree-cleanup.phpphp tests/smoke-worktree-cleanup-github-cache.phpphp tests/smoke-worktree-lifecycle-metadata.phpgit diff --checkFocused
homeboy lint --fileruns still report existing PHPStan baseline issues in the large touched files; PHPCS formatting is clean for the production files touched by this PR.Closes #144
Refs #142
Refs #145
AI assistance