Skip to content

Move the lane-token revoke and the pinned PyYAML install into two lib scripts #15963

Description

@kyle-sexton

Agent Brief

Type: Task
Summary: Move the lane-token revoke step's shell and the pinned PyYAML install's shell into two scripts under .github/scripts/lib/, called from every copy (part of restructuring pass #15695).

Current behavior:
Line numbers are at ba7bb0da37. The work-unblock copies (work-unblock.yml:421 and below) sit in a file whose simplify chunk #15894 was still open then; if it has merged, find each step by its name.

The "Revoke the lane token" step's run: body is written out 13 times in 6 workflows, in two forms:

  • 7 copies print "the lane token is revoked" on a 204 and warn otherwise: intake-triage.yml:663-678, :2190-2205; pr-merge.yml:2332-2347, :3059-3072; work-unblock.yml:421-436, :631-646, :789-804.
  • 6 copies only warn: maintenance-measure-skill-edit.yml:1207-1216, :1352-1361; maintenance-tidy-code-upkeep.yml:1357-1366, :1478-1487; upstream-apply-changelog.yml:2279-2288, :2421-2430.

All 13 send the same curl DELETE to installation/token with GH_TOKEN from steps.lane-token.outputs.token, under if: always() && steps.lane-token.outputs.token != '' and continue-on-error: true. Three chunk PRs handed this to the pass: #15914, #15802 and #15771.

Each of those jobs checks main out to .base in full, with no sparse list, and gets its token from ./.base/.github/actions/request-lane-token. So .base is there whenever the token is set (for example work-unblock.yml:158-176 then :298). All six workflows run main's workflow file: their triggers are issues, schedule, workflow_dispatch, workflow_run, push or pull_request_target.

The "Install the pinned YAML reader" step repeats the same awk extraction of the pyyaml== block from .base/.github/requirements-ci.txt, then a hashed pip install, 4 times:

  • pr-merge.yml:1072-1081 and :2462-2471, warning "PyYAML did not install; no workflow-file change binds its review this run";
  • pr-feedback-dispatch.yml:423-433 and pr-unblock-dispatch.yml:258-271, warning "PyYAML did not install; the FAIL-cap read fails and rounds run under their own caps".

Each copy has continue-on-error: true and runs exit 1 after the warning.

.github/scripts/plugin-eval/hill-climb-workflow.test.mjs:68 asserts /DELETE/ on the measure-skill-edit revoke step's text.

Desired behavior:

  • New .github/scripts/lib/revoke-lane-token.sh, mode 100755 with a #!/usr/bin/env bash line (as .github/scripts/lib/handoff-evidence.sh has), called with bash. It reads GH_TOKEN and GITHUB_API_URL and holds the 7-copy form: the same curl line, then "the lane token is revoked" on 204, else the same ::warning:: line. It always exits 0.
  • Each of the 13 revoke steps keeps its name, if:, continue-on-error and env:, and its run: becomes bash .base/.github/scripts/lib/revoke-lane-token.sh.
  • The 6 terse copies gain one success log line, "the lane token is revoked". That is the only output change; say so in the PR body.
  • New .github/scripts/lib/install-pinned-pyyaml.sh, mode 100755 with a #!/usr/bin/env bash line (as .github/scripts/lib/handoff-evidence.sh has), called with bash and taking the warning text as its one argument. It finds requirements-ci.txt relative to its own directory (../../requirements-ci.txt), writes $RUNNER_TEMP/pyyaml-requirements.txt, and runs the same pip install flags. On failure it prints ::warning:: with its argument and exits 1.
  • Each of the 4 YAML-reader steps keeps its name, if: and continue-on-error, and runs bash .base/.github/scripts/lib/install-pinned-pyyaml.sh '<its current warning text>'.
  • The hill-climb assertion at :68 matches the script name instead of DELETE.

Files:

  • .github/scripts/lib/revoke-lane-token.sh (new)
  • .github/scripts/lib/install-pinned-pyyaml.sh (new)
  • the revoke steps at intake-triage.yml:663, pr-merge.yml:2332, work-unblock.yml:421, maintenance-measure-skill-edit.yml:1207, maintenance-tidy-code-upkeep.yml:1357 and upstream-apply-changelog.yml:2279, and their other copies listed above
  • the YAML-reader steps at pr-merge.yml:1072, pr-feedback-dispatch.yml:423 and pr-unblock-dispatch.yml:258
  • .github/scripts/plugin-eval/hill-climb-workflow.test.mjs (line 68 only)

Key interfaces:

  • Step names: unchanged. callers.test.mjs:1294-1324, merge-job.test.mjs:355,608 and pr-merge/workflow.test.mjs:1138 order steps by the name "Revoke the lane token".
  • Token scope and log shape: each step stays one run step. No composite action is added, so there is no nested log group, and the token goes only to the step that held it.
  • pr-run-activity-write.yml:1889-1913's github-script revoke and request-lane-token's own internal revoke() (.github/actions/request-lane-token/action.yml:299-304) stay as they are: they differ, and scripts/write-runner-revoke-step.test.sh tests the first.
  • pr-require-checks.yml:1421-1424's full-requirements pip install is a different step and stays.

Acceptance criteria:

  • The revoke curl DELETE exists once, in .github/scripts/lib/revoke-lane-token.sh, and every revoke step that ran it inline calls that script.
  • The pyyaml== awk extraction exists once, in .github/scripts/lib/install-pinned-pyyaml.sh, and each of the four YAML-reader steps that ran it calls that script with its own warning text.
  • Every step name, if:, continue-on-error, env: key, job id, trigger, permission and workflow file name is unchanged.
  • Behavior is unchanged except the one success log line the terse revoke copies gain.
  • The diff edits only the listed files and the lines of a test that assert on them when the change breaks that assertion.
  • The pull request stays within 400 changed lines and 15 hand-edited files.
  • Both scripts pass the repository's shellcheck and shfmt checks.
  • ci-status is green.

Out of scope:

  • The github-script revoke in the write runner, request-lane-token's internal revoke, the full-requirements install in the required-checks workflow, other duplication, eval cases, fixtures, and skill and agent text.

Activity

  1. added
    status: ready
    host-run
    on Nov 13, 2026
  2. added theissue type on Nov 13, 2026
  3. removed
    status: ready
    on Nov 13, 2026
  4. removed
    host-run
    on Nov 13, 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

    No labels
    No labels

    Type

    Fields

    Work status

    ready

    Priority

    low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions