Skip to content

fix(pr-pipeline): end pr-merge and intake-triage runs green-neutral on a kill-switch broker deny #10775

Closed

Description

@kyle-sexton

Problem

The lane breaker turns CLAUDE_LANES_REPO_DISABLED on when GITHUB_TOKEN headroom runs low. A run queued before the trip has already read its variables, so its own check-kill-switch step passes, and only the token broker's live read stops it: lane-token-denied: the broker answered 403 with reason kill-switch. That designed stop ends the run red.

Since 2026-10-24 it failed 12 runs: pr-merge 4, intake-triage 5 and work-resolve-issue 3. In run 40747727299, the job's switch read false at 18:51:28Z, the breaker had tripped at 18:47Z, and the broker refused at 18:51:32Z.

Acceptance criteria

  • request-lane-token takes an opt-in kill-switch-ok input. In token mode, a 403 whose reason is kill-switch ends the step green with a lane-token-stopped notice, no token output and skip-reason=kill-switch.
  • Every other status or reason stays red, and check mode refuses the input.
  • pr-merge (merge, enable-auto-merge) and intake-triage (apply-verdict, apply-refinement) opt in.
  • After the mint, no step in an opted-in job writes with GITHUB_TOKEN or reads the token unless token != ''. Dependent jobs read only outputs that token steps set, and intake's refine-select requires apply-verdict's stopped output to be empty.
  • callers.test.mjs pins these rules for every kill-switch-ok caller.

Safety constraints

  • Only a 403 with reason kill-switch ends green. Any other denial stays red.
  • No step after a stopped mint writes with GITHUB_TOKEN.

Not in scope

work-resolve-issue's deny is #10753: work-unblock re-fires a kill-switch-stopped issue from the failed mint step, so that detector changes first.

Activity

  1. added
    needs-triage
    on Oct 28, 2026
  2. github-actions commented on Oct 28, 2026

    @github-actions
    Contributor

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

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: when the lane breaker trips the kill switch after a run has already started, the token broker's 403 with reason kill-switch ends pr-merge and intake-triage runs red. You want an opt-in kill-switch-ok input on request-lane-token so that one denial ends green with skip-reason=kill-switch. You also want every later write or token read in the opted-in jobs gated on a non-empty token, and callers.test.mjs to pin those rules.

    The acceptance criteria and safety constraints are exact, and the refinement comment already lists the files involved. work-resolve-issue is out of scope and tracked in #10753. I found no duplicate among the open issues.

    Automated triage, applied by the lanes App.

  3. added and removed
    needs-triage
    on Oct 28, 2026
  4. added
    status: ready
    status: confirmed
    and removed
    status: ready
    on Oct 28, 2026
  5. melodic-automation-lanes commented on Oct 28, 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. 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 28, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: the issue is at status: ready.

  7. added
    needs-triage
    and removed
    status: confirmed
    on Oct 28, 2026
  8. melodic-automation-lanes commented on Oct 28, 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: request-lane-token gains an opt-in kill-switch-ok input so a broker 403 with reason kill-switch ends pr-merge and intake-triage mint steps green with skip-reason=kill-switch, and no later step writes with GITHUB_TOKEN.

    Acceptance criteria

    • action.yml declares a kill-switch-ok input defaulting to "false", documented next to superseded-ok and pr-workflow-change-ok (.github/actions/request-lane-token/action.yml:83-99), and the README input table lists it
    • In token mode with kill-switch-ok=true, a 403 whose reason is exactly kill-switch ends the step green, emits a lane-token-stopped notice, sets no token output and sets skip-reason=kill-switch; a test in request-lane-token.test.mjs passes
    • A 403 with any other reason, any other status, and a 403 kill-switch with kill-switch-ok unset or false all still fail red with lane-token-denied; tests in request-lane-token.test.mjs pass
    • check mode with kill-switch-ok=true refuses the input; a test passes
    • pr-merge.yml sets kill-switch-ok: true on the mint steps for the merge and enable-auto-merge jobs (pr-merge.yml:943 and :2004)
    • intake-triage.yml sets kill-switch-ok: true on the mint steps for apply-verdict and apply-refinement (intake-triage.yml:482 and :1314)
    • In each opted-in job, every step after the mint that writes with GITHUB_TOKEN or reads the token is gated on steps.<mint>.outputs.token != ''
    • Jobs depending on an opted-in job read only outputs that token-gated steps set, and intake-triage's refine-select requires apply-verdict's stopped output to be empty
    • callers.test.mjs pins the gating rules above for every workflow step that passes kill-switch-ok, and fails if a post-mint step is ungated
    • The repository's existing test suite for the action and callers.test.mjs passes

    Dependencies

    • #​10753 (work-unblock re-fires kill-switch-stopped issues from the failed mint step) is out of scope; work-resolve-issue does not opt in here.

    Sources read

    • .github/actions/request-lane-token/action.yml:83-99: superseded-ok and pr-workflow-change-ok are existing opt-in inputs that end green on a specific 403 reason, a pattern to copy
    • .github/actions/request-lane-token/action.yml:366: skip-reason output is already written for workflow-modified
    • .github/workflows/pr-merge.yml:943: request-lane-token mint step, and again at :2004
    • .github/workflows/intake-triage.yml:482: request-lane-token mint step, and again at :1314
    • .github/actions/resolve-config/callers.test.mjs: existing callers test file that will pin the rules
    • .github/scripts/work-unblock/label-unblocked.mjs:249: detector parses lane-token-denied 403 reasons from failed runs, which is why work-resolve-issue is left to #​10753

    Automated refinement by the lanes App. Intake triages the issue again with it.

  9. removed
    needs-triage
    on Oct 28, 2026
  10. added
    status: ready
    admission-deferred
    on Oct 28, 2026
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

    admission-deferredstatus: ready

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions