Skip to content

pr-pipeline: branch cleanup matches keep markers by author and lists deleted tips in the step summary #8960

Closed

Description

@kyle-sexton

Refs: #8959

Follow-ups from the S&C review of #8959 (security OK at e8cc272 under the ship-unless-critical posture):

  1. Match the keep markers by author. The branch-cleanup job reads the issue lane's stop and resume markers (parseOutcomeMarker from report-outcome.mjs) to decide which branches are never deleted. Match them only on comments the lanes App authored (by its sender id, as other lane readers do), not by text, so a human-posted fake marker (for example a branch=resumed one) cannot change which branch is eligible.
  2. Put the ledger in the step summary. List each deleted branch with its tip SHA in the run's step summary, so a restore (gh api -X POST repos/<o>/<r>/git/refs -f ref=refs/heads/<name> -f sha=<sha>) needs no artifact download.

Each with a test that fails before the change.

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 22, 2026
  2. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor

    Proposed work class: none

    Thanks for the report. Automated triage handed this issue to a maintainer.

    Unconfirmed model suggestion: work-class: scoped
    Basis: automated intake triage; a maintainer confirms or changes it.

    Automated triage. A maintainer reviews it.

  3. added
    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.
    and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 22, 2026
  4. kyle-sexton commented on Oct 22, 2026

    @kyle-sexton
    MemberAuthor

    Item 1 no longer applies: #8976 (which replaced #8959) removed the stopped-run keep, so branch cleanup no longer reads lane markers (S&C, 9c20bb6). Item 2 (deleted tips in the step summary) stands.

  5. kyle-sexton commented on Oct 22, 2026

    @kyle-sexton
    MemberAuthor

    Closing as done. Item 1 was withdrawn (comment): branch cleanup no longer reads lane markers. #8976 delivers item 2. .github/scripts/branch-cleanup/cleanup.mjs on main writes each deleted branch's ledger entry, full SHA included, to the step summary (:264-272) and adds a Deleted table (:228-240).

    Posted by AI during an attended triage session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions