Skip to content

fix(finalize): merge on plan-gated branch rules; finish worktree removals Git started (0525) - #393

Merged
danielhanold merged 11 commits into
mainfrom
fix/finalize-stops-on-a-private-repo-without-the-branch-rules-ap
Oct 5, 2026
Merged

danielhanold merged 11 commits into
mainfrom
fix/finalize-stops-on-a-private-repo-without-the-branch-rules-ap

Conversation

@danielhanold

@danielhanold danielhanold commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

↩ Change 0525 — Finalize stops on a private repo without the branch-rules API, and leaves half-removed workspaces

↩ Change 0525 — Finalize stops on a private repo without the branch-rules API, and leaves half-removed workspaces

Summary

  • Plan-gated branch rules: GitHub's "Upgrade to GitHub Pro/Team or make this repository public…" 403 on the branch-rules probe now means "no rules". Finalize merges using the repository settings and adds a branch-rules-unavailable warning, which the skill records in the closeout notes. Every other failed rules read still stops as merge-probe-unknown.
  • Half-finished worktree removal: when git worktree remove fails after Git has already dropped the registration, cleanup finishes deleting the owned .worktrees/<slug> folder, marks the workspace cleaned, and removes the branches. A folder that still can't be deleted is reported in a workspace-remnant warning, which shows on finalize cleanup, its human text, and the maintenance sweep. A Git refusal while the path is still registered stays blocked and untouched. ADR-0140 records this as an exception to ADR-0035.
  • Blocked cleanup: the workspace-blocked message now names what blocked it.
  • The finalize skill (and its embedded copy) and docs/guide/landing-changes.md are updated to match.

Review (deep tier)

# Severity Finding Disposition
1 important The workspace-remnant warning was dropped on the maintenance-sweep path and missing from human text fixed (a6bd8e5)
2 minor The stillRegistered checks were not each mutation-tested fixed (1883b13)
3 minor The skill wording on when the remnant and branch-rules notes appear was imprecise fixed (f83cd1e)
4 minor Stale doc comments on cleanupWarning / FindingWorkspaceRemnant fixed (f83cd1e)

The first post-fix gate run went red on the TempDir fixture guard because the new test used a bare t.TempDir(). A premium repair commit (86f4efc) fixed it, and the next gate run was green.

command: go run ./cmd/docket development test
result: green
head_sha: f4fdb0f
ran_at: 2026-10-05T12:00:34Z

Docket-Plan-Path: docs/superpowers/plans/2026-10-05-finalize-stops-on-a-private-repo-without-the-branch-rules-ap.md
…eanup path

Review finding: a workspace-remnant warning was lost on the safety-net sweep
path because sweepRunCleanup copied only Result/Reason/Message from the
FinalizeCleanup result, and a cleaned result has no reason. The sweep entry now
carries the remnant as its reason and appends the remnant message naming the
leftover folder; CleanupOpResult.HumanText also names the remnant warning.
Review finding (minor): internal/workspace/cleanup.go:stillRegistered's
checks are not each mutation-tested — the only still-registered test left a
registration matching both the feature-ref and the path check. Add a table
unit test whose true rows each match exactly one check (feature ref only,
lexical path only, canonical/symlinked path only) plus false rows for an
unrelated unresolvable registration and a detached registration carrying
the feature ref.
…anup disposition; F4 cleanup warning comments
@danielhanold
danielhanold force-pushed the fix/finalize-stops-on-a-private-repo-without-the-branch-rules-ap branch from 86f4efc to f4fdb0f Compare October 5, 2026 12:00
@danielhanold
danielhanold merged commit 8839804 into main Oct 5, 2026
1 check passed
@danielhanold
danielhanold deleted the fix/finalize-stops-on-a-private-repo-without-the-branch-rules-ap branch October 5, 2026 12:01
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.

1 participant