Skip to content

fix: time out hung gh secret/variable list in dispatch #323

Description

@SebTardif

scripts/dispatch-jobs.mjs listRepoSecrets and listRepoVariables call spawnSync(gh ...) with no timeout. If gh secret list or gh variable list never returns, npm run dispatch pins until someone kills it.

What happens

  1. Cross-repo dispatch runs the token-secret preflight and calls gh secret list --json name, then gh variable list --json name.
  2. Those children used spawnSync with no timeout.
  3. A stalled GitHub CLI never returns, so dispatch cannot skip the preflight or continue.

This is separate from dispatch child runCommand timeouts.

Proposed fix

Give those inspect children the same timeout contract as worker planner/review children:

  • CLOWNFISH_DISPATCH_SECRET_LIST_TIMEOUT_MS (default 2 minutes)
  • spawnSync(..., { timeout, killSignal: "SIGKILL" }) for gh secret list and gh variable list
  • On ETIMEDOUT, keep the current skip-with-warning path (could not inspect repo secrets / could not inspect repo variables) and return null

A source contract plus hung-secret and hung-variable fixtures live in test/app-token-auth.test.mjs.

Fork branch

This repo limits pull requests to collaborators, so I could not open a PR. The patch is on my fork:

Feel free to cherry-pick that commit, or I can open a PR if you add this account as a collaborator.

Activity

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

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopThis issue is about crashes, hangs, restart loops, or process-level availability.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.no-staleExempts this issue from stale automation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions