Skip to content

Prune stale local pr-* refs left behind by closed, merged and superseded PRs #355

Description

@dannymcc

The harness checkout carries twelve local pr-* branches: pr-263, pr-280, pr-281, pr-288, pr-290, pr-291, pr-292, pr-294, pr-336, pr-337, pr-339, pr-346 (plus a mirrored harness/pr-* for each, at the same shas).

All but pr-346 correspond to PRs that are merged, closed or ruled superseded:

These cost real time. A stale pr-346 ref is what produced the ! [rejected] ... (non-fast-forward) fetch error that the desk misread as a merge conflict for several cycles. Stale refs also poison git branch --no-merged readings, which is already flagged in desk memory as a hint-not-evidence trap for exactly this reason.

Scope

  1. Delete the local and harness/-mirrored refs for the eleven PRs listed above. Leave pr-346 alone — it is active this cycle.
  2. Adopt force refspecs as the default for PR fetches: git fetch origin +pull/N/head:pr-N. The + makes a stale ref a non-event and removes the need for a pre-delete step entirely.

Acceptance criteria

  • git branch --list 'pr-*' and git branch --list 'harness/pr-*' list only pr-346 / harness/pr-346.
  • No branch belonging to an unmerged, still-open PR is deleted.
  • The force-refspec convention is written down where the desk's PR-fetch steps live, so this does not recur.

Note for whoever picks this up: the planner shell is read-only git and cannot run git branch -D. This needs an officer with write access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions