Skip to content

fix(pr-pipeline): lift a stale needs-session label once its lane cause is gone #11200

Open

Description

@kyle-sexton

Problem

The needs-session label routes a lane stop to a session (#11175 for ci-fix-escalated, and #10954 for the other reroutes). No lane removes a stale needs-session label once a same-head retry or a new head clears the stop. The pr-pipeline README now tells the session that finds the head green to remove it, which is a manual step. Both the builder's security reviewer and claude-review flagged the gap on #11175.

Proposed fix

Extend .github/scripts/pr-merge/clear-escalations.mjs so it lifts needs-session when the lane cause behind it is gone. This is merge-gate code that already holds the permission it needs, so no new permission is required.

Rejected alternative: grant issues: write to the report-stop-status job in pr-unblock.yml. That widens a permission, which is the owner's decision.

Done when

  • A PR carrying needs-session whose stop is mended on the same head or a new head loses the label on the next clear-escalations pass, with no person or session acting.
  • A test covers both the same-head and the new-head case, and fails before the change.

Refs: #11175, #10954

Activity

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

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: extend clear-escalations.mjs so a stale needs-session label is removed automatically once the lane stop is mended, on the same head or a new head, with a test covering both cases.

    Duplicate of #11114 (remove needs-session when its stop's failing status clears). #11087 (clear needs-session when a same-head fix-ci retry lands) also overlaps, covering the same-head half. Please continue the work there, and add anything this issue has that those lack, such as the new-head case or the rejected issues: write alternative.

    Automated triage, applied by the lanes App.

  3. added
    duplicateTriage suspects an open issue asks for the same thing; admission refuses it (admission-rules.json).
    priority: mediumReal value, no hard deadline; normal backlog flow.
    and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 30, 2026
  4. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    and removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Oct 30, 2026
  5. melodic-automation-lanes commented on Oct 30, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited; it carries duplicate. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  6. melodic-automation-lanes commented on Oct 30, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: confirmed; its comment says why.

  7. melodic-automation-lanes commented on Oct 30, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: clear-escalations.mjs lifts a stale needs-session label once the stop is mended on the same head or a new head, with a test for both cases; this likely continues in #​11114 and #​11087.

    Related work

    Open questions

    1. Should this issue be closed as a duplicate of #​11114, with the new-head case and the rejected issues: write alternative carried over there or into #​11087?
      RECOMMENDED: Yes. Close it as a duplicate and add the new-head case and the rejected alternative to #​11114. Basis: Intake triage comment names #​11114 and #​11087 as overlapping, and the issue carries the duplicate label.
    2. Does #​11114 or #​11087 already include the new-head case? Both are unreadable in this run, so I could not check.
      RECOMMENDED: Assume neither does until an owner confirms, and add it to #​11114's done-when. Basis: judgment
    3. Is the needs-session label and its routing code present on the branch the lane will work from? The checkout I read has no needs-session match.
      RECOMMENDED: Confirm the base branch includes the #​11175 and #​10954 changes before work starts. Basis: judgment

    Sources read

    • /home/runner/work/claude-code-plugins/claude-code-plugins/refine-data/context.json: the issue, the intake triage comment naming #​11114 and #​11087 as duplicates, and the candidate list.
    • /home/runner/work/claude-code-plugins/claude-code-plugins/.base: a grep for needs-session across the checkout found no matches.

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

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

    duplicateTriage suspects an open issue asks for the same thing; admission refuses it (admission-rules.json).priority: mediumReal value, no hard deadline; normal backlog flow.status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.status: needs-decisionAwaiting a human or maintainer judgment call.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions