Skip to content

Audit remaining gh-calling reusables for the bare-gh runner assumption (post-#144) #209

Closed

Description

@kyle-sexton

Context

The 2026-07-18 fleet-wide do-not-merge failure spike (~191 failures across 6 repos) was a latent bare-gh invocation in the do-not-merge-gate reusable, exposed when runner routing shifted gate jobs to a self-hosted image that does not ship the gh CLI (exit 127). PR #144 fixed that one reusable by porting the call to actions/github-script, and its commit message explicitly names four sibling reusables left out of scope that still call gh on caller-selected runners. Leaving them unaudited invites a repeat spike the next time routing shifts.

Proposed work

  • Audit claude-review.yml, link-check.yml, queue-monitor-liveness.yml, and tool-version-drift-check.yml for gh invocations that assume CLI presence on caller-selected runners
  • Port each confirmed instance to the fix(do-not-merge-gate): drop gh CLI dependency from label refetch #144 pattern (actions/github-script, bundled Node, zero runner-tool dependency) or guard with an availability check
  • Add a triage note to the incident learnings: on a fleet-wide single-workflow spike, check the reusable's commit history and runner routing before attributing to infra flake

Acceptance criteria

  • Each of the four named reusables either has no runner-tool assumption or uses the github-script pattern
  • A routing shift to a gh-less runner image cannot fail these reusables with exit 127

References

Activity

  1. added theissue type on Jul 22, 2026
  2. kyle-sexton commented on Jul 22, 2026

    @kyle-sexton
    MemberAuthor

    Locked decisions (interview 2026-07-22)

    1. Port pattern: actions/github-script (per fix(do-not-merge-gate): drop gh CLI dependency from label refetch #144) for every confirmed shell-level gh invocation in a reusable running on a caller-selected runner. Availability-guarding only degrades the failure mode; github-script removes the runner-tool dependency class. The gh mention inside claude-review.yml's prompt text is agent-environment usage, not a shell invocation — out of scope.
    2. Scope expanded: audit ALL 9 gh-calling reusables, not just the 4 named. Sweep found 5 more: claude-e2e-verify.yml, claude-security-review.yml, do-not-merge-gate.yml (residual), pulumi-version-drift-check.yml, release.yml. The 4-file list was inherited from fix(do-not-merge-gate): drop gh CLI dependency from label refetch #144's commit message, not a risk boundary. Port everything confirmed at-risk; the audit may clear instances running in gh-guaranteed environments.
    3. Dedup: the timeout … gh "$@" bounded-read helper duplicated across link-check/queue-monitor-liveness/tool-version-drift-check disappears with the port; dedupe further only where it falls out naturally — no forced composite action.
    4. Triage note home: ci-workflows README (owner-side, colocated with the reusables; no incident-learnings doc exists anywhere in the fleet).
    5. Convention capture: new REVIEW.md "Always check" line — a reusable-workflow step shelling out to a CLI on a caller-selected runner must use actions/github-script or justify a guarded exception — citing conventions/review/cross-platform.md#tools-processes-and-committed-artifacts (standards). A follow-up issue in standards will propose sharpening that criterion with a workflow-specific bullet.
    6. PR shape: one cohesive PR (ports + README triage note + REVIEW.md line).

    Acceptance criteria (updated per decision 2)

    • Each of the NINE gh-calling reusables either has no runner-tool assumption or uses the github-script pattern
    • A routing shift to a gh-less runner image cannot fail these reusables with exit 127
    • README triage note + REVIEW.md criterion line landed
  3. added 2 commits that reference this issue on Jul 22, 2026
    e94bddb
    e1aa168
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

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions