J387: stale branch, worktree, issue and PR housekeeping #436

Open
opened 2026-11-08 18:46:53 +00:00 by kayg · 4 comments
Owner

Owner-authorized housekeeping: delete only fully merged, inactive remote branches with SHA recovery log; sweep safe stale worktrees and finished-job scratch on compute01 and dev-02; classify issues and PRs without closing them. Protected job branches, recent commits, evidence, production, and uncertain state are preserved.

Owner-authorized housekeeping: delete only fully merged, inactive remote branches with SHA recovery log; sweep safe stale worktrees and finished-job scratch on compute01 and dev-02; classify issues and PRs without closing them. Protected job branches, recent commits, evidence, production, and uncertain state are preserved.
Author
Owner

J387 starting. Branch: none (operations only); control base dc4f590f8a. Plan: inventory both repos and VM process/worktree state; log and delete eligible merged branches; dry/apply guarded sweeps and safe finished-job scratch cleanup; write issue and PR classifications on compute01. Estimate: 45 minutes. No code changes planned; no pushes, merges, issue/PR closures or deployments.

J387 starting. Branch: none (operations only); control base dc4f590f8abd59e73bcbd0c90651ef7b4e2b75ac. Plan: inventory both repos and VM process/worktree state; log and delete eligible merged branches; dry/apply guarded sweeps and safe finished-job scratch cleanup; write issue and PR classifications on compute01. Estimate: 45 minutes. No code changes planned; no pushes, merges, issue/PR closures or deployments.
Author
Owner

Inventory finding: 251 infraternal remote branches, 41 fork branches; infraternal has no open PRs. Fork metadata has has_pull_requests=false, and both pull-list endpoints return 404 (PR feature disabled). Existing VM wtsweep.sh omits owner-protected paths/branches, so J387 will apply an explicitly guarded task-local copy after dry runs. Evidence: compute01/dev-02 ~/infraternal-ops/j387-wtsweep-initial-dry.log; repository snapshots will be saved with the final report.

Inventory finding: 251 infraternal remote branches, 41 fork branches; infraternal has no open PRs. Fork metadata has has_pull_requests=false, and both pull-list endpoints return 404 (PR feature disabled). Existing VM wtsweep.sh omits owner-protected paths/branches, so J387 will apply an explicitly guarded task-local copy after dry runs. Evidence: compute01/dev-02 ~/infraternal-ops/j387-wtsweep-initial-dry.log; repository snapshots will be saved with the final report.
Author
Owner

Cleanup finding: atomic SHA-lease deletion removed 49 fully merged infraternal branches (fork: 0); fresh process checks retained two further candidates. Worktree sweeps removed 22 on compute01 and 9 on dev-02; scratch cleanup removed 2 and 1 respectively. All unmerged refs remain. Initial host verification flagged /home/claude/worktrees/orch-merge disappearing after the initial busy inventory; it is absent from both guarded dry/apply sweep logs and from before/results removal candidates. It was not selected by J387 and is recorded as a concurrent change, without recreating another job checkout. Evidence: compute01 ~/infraternal-ops/j387-inventory-before.json, j387-wtsweep-dry.log, j387-wtsweep-apply.log, j387-worktree-before.json, j387-worktree-results.json, j387-verification-initial.{json,log}; remote verification and final lists will accompany the finish record.

Cleanup finding: atomic SHA-lease deletion removed 49 fully merged infraternal branches (fork: 0); fresh process checks retained two further candidates. Worktree sweeps removed 22 on compute01 and 9 on dev-02; scratch cleanup removed 2 and 1 respectively. All unmerged refs remain. Initial host verification flagged /home/claude/worktrees/orch-merge disappearing after the initial busy inventory; it is absent from both guarded dry/apply sweep logs and from before/results removal candidates. It was not selected by J387 and is recorded as a concurrent change, without recreating another job checkout. Evidence: compute01 ~/infraternal-ops/j387-inventory-before.json, j387-wtsweep-dry.log, j387-wtsweep-apply.log, j387-worktree-before.json, j387-worktree-results.json, j387-verification-initial.{json,log}; remote verification and final lists will accompany the finish record.
Author
Owner

J387 finished. No repository code changed; branch: none; control HEAD dc4f590f8a unchanged. Ancestry bases: infraternal dev 9965911c8a; fork main 2a867b3f322d95dc08043498d34eb91fb4266590.

  • Branches deleted: 49 infraternal, 0 gotatun. Atomic SHA leases; recovery log was saved before deletion and all deleted refs verified absent. Protected/recent/unmerged refs remain. Two additional merged candidates retained by fresh process checks. Recovery log: compute01 /home/claude/infraternal-ops/j387-branches-deleted.tsv.
  • compute01: 22 worktrees and 2 finished-job scratch directories removed, 5.179331 GB of allocated paths removed. Observed free-space increase during the worktree sweep: +0.460018 GB.
  • dev-02: 9 worktrees and 1 scratch directory removed, 0.598647 GB of allocated paths removed. Observed free-space increase during worktree sweep: +0.601006 GB.
  • Allocations were measured with du before removal and paths confirmed absent afterward. Shared hardlinks and concurrent builds mean this is not an exact block-reclamation estimate; both allocation and observed free-space measures are preserved. No processes were killed; production, /var/lib, primary checkouts, mockups and evidence were not selected.
  • Lists on compute01: /home/claude/infraternal-ops/j387-issues.md (45 confirmed landed-head/merge-reference/finish-note candidates, plus partial-landings section and 141 issues inactive 7+ days); /home/claude/infraternal-ops/j387-prs.md (infraternal: no open PRs; fork: PR feature disabled, endpoints 404); /home/claude/infraternal-ops/j387-unmerged-branches.md (112 unmerged branches inactive 7+ days, with tip dates/SHAs and referenced issue states). No issue or PR was closed.
  • Summary and accounting: /home/claude/infraternal-ops/j387-summary.{md,json}. Source snapshots, ancestry bases, deletion output and branch verification are in j387-data/. Per-host dry/apply, scratch, inventory and verification receipts remain in ~/infraternal-ops/j387-*. Temporary Git object caches were removed.
  • Concurrent change recorded: compute01 orch-merge disappeared between initial busy inventory and guarded dry pass; it was absent from both sweep logs and removal candidates. Initial FAIL and final scoped PASS receipts are retained. No other-job checkout was recreated.

Gate status, verbatim (BRIEF-COMMON.md, “Planning/research jobs and the gate”):

no code changed, gate not applicable

Housekeeping verification output, verbatim:

J387 remote branch verification: PASS
{"deleted_count": 49, "deleted_by_repo": {"infraternal": 49, "gotatun": 0}, "current_branch_counts": {"infraternal": 206, "gotatun": 41}, "errors": []}
J387 cleanup verification: PASS (compute01)
{"concurrent_changes": [{"in_apply_log": false, "in_dry_log": false, "note": "absent after initial inventory; not selected by J387; guarded dry/apply logs contain no entry for this path", "path": "/home/claude/worktrees/orch-merge"}], "errors": [], "observed_worktree_free_delta_bytes": 460017664, "protected_worktrees_verified": 93, "scratch_allocated_bytes": 4890624, "scratch_removed": 2, "worktree_allocated_bytes": 5174439936, "worktrees_removed": 22}
J387 cleanup verification: PASS (dev-02)
{"errors": [], "observed_worktree_free_delta_bytes": 601006080, "protected_worktrees_verified": 139, "scratch_allocated_bytes": 151552, "scratch_removed": 1, "worktree_allocated_bytes": 598495232, "worktrees_removed": 9}
J387 artifact verification: PASS

No push of new code, merge, deployment, issue closure or PR closure. Orchestrator owns the recommendations.

J387 finished. No repository code changed; branch: none; control HEAD dc4f590f8abd59e73bcbd0c90651ef7b4e2b75ac unchanged. Ancestry bases: infraternal dev 9965911c8ac2848168f5947f623488c75631c320; fork main 2a867b3f322d95dc08043498d34eb91fb4266590. - Branches deleted: 49 infraternal, 0 gotatun. Atomic SHA leases; recovery log was saved before deletion and all deleted refs verified absent. Protected/recent/unmerged refs remain. Two additional merged candidates retained by fresh process checks. Recovery log: compute01 /home/claude/infraternal-ops/j387-branches-deleted.tsv. - compute01: 22 worktrees and 2 finished-job scratch directories removed, 5.179331 GB of allocated paths removed. Observed free-space increase during the worktree sweep: +0.460018 GB. - dev-02: 9 worktrees and 1 scratch directory removed, 0.598647 GB of allocated paths removed. Observed free-space increase during worktree sweep: +0.601006 GB. - Allocations were measured with du before removal and paths confirmed absent afterward. Shared hardlinks and concurrent builds mean this is not an exact block-reclamation estimate; both allocation and observed free-space measures are preserved. No processes were killed; production, /var/lib, primary checkouts, mockups and evidence were not selected. - Lists on compute01: /home/claude/infraternal-ops/j387-issues.md (45 confirmed landed-head/merge-reference/finish-note candidates, plus partial-landings section and 141 issues inactive 7+ days); /home/claude/infraternal-ops/j387-prs.md (infraternal: no open PRs; fork: PR feature disabled, endpoints 404); /home/claude/infraternal-ops/j387-unmerged-branches.md (112 unmerged branches inactive 7+ days, with tip dates/SHAs and referenced issue states). No issue or PR was closed. - Summary and accounting: /home/claude/infraternal-ops/j387-summary.{md,json}. Source snapshots, ancestry bases, deletion output and branch verification are in j387-data/. Per-host dry/apply, scratch, inventory and verification receipts remain in ~/infraternal-ops/j387-*. Temporary Git object caches were removed. - Concurrent change recorded: compute01 orch-merge disappeared between initial busy inventory and guarded dry pass; it was absent from both sweep logs and removal candidates. Initial FAIL and final scoped PASS receipts are retained. No other-job checkout was recreated. Gate status, verbatim (BRIEF-COMMON.md, “Planning/research jobs and the gate”): ```text no code changed, gate not applicable ``` Housekeeping verification output, verbatim: ```text J387 remote branch verification: PASS {"deleted_count": 49, "deleted_by_repo": {"infraternal": 49, "gotatun": 0}, "current_branch_counts": {"infraternal": 206, "gotatun": 41}, "errors": []} J387 cleanup verification: PASS (compute01) {"concurrent_changes": [{"in_apply_log": false, "in_dry_log": false, "note": "absent after initial inventory; not selected by J387; guarded dry/apply logs contain no entry for this path", "path": "/home/claude/worktrees/orch-merge"}], "errors": [], "observed_worktree_free_delta_bytes": 460017664, "protected_worktrees_verified": 93, "scratch_allocated_bytes": 4890624, "scratch_removed": 2, "worktree_allocated_bytes": 5174439936, "worktrees_removed": 22} J387 cleanup verification: PASS (dev-02) {"errors": [], "observed_worktree_free_delta_bytes": 601006080, "protected_worktrees_verified": 139, "scratch_allocated_bytes": 151552, "scratch_removed": 1, "worktree_allocated_bytes": 598495232, "worktrees_removed": 9} J387 artifact verification: PASS ``` No push of new code, merge, deployment, issue closure or PR closure. Orchestrator owns the recommendations.
Sign in to join this conversation.
No labels
launch-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/infraternal#436
No description provided.