Skip to content

fix: bound runner shutdown waits#43

Merged
intel352 merged 1 commit into
mainfrom
codex/runner-terminal-shutdown-bound-20260630
Jun 30, 2026
Merged

fix: bound runner shutdown waits#43
intel352 merged 1 commit into
mainfrom
codex/runner-terminal-shutdown-bound-20260630

Conversation

@intel352

Copy link
Copy Markdown
Contributor

Summary

  • Bound post-cancel waits in the GitHub runner provider so terminal GitHub job success can return proof even if runner shutdown lags.
  • Apply the same bounded wait to dispatch-failure and timeout paths.
  • Add regressions for terminal success and timeout when the runner process never closes its done channel.

Verification

  • GOWORK=off go test ./cmd/github-actions-runner-job -run 'TestT915WaitForGitHubCompletionDoesNotBlockOnRunnerShutdownAfterTerminalSuccess|TestT915CommandTreatsGitHubJobAPIAsCompletion|TestT915CommandTreatsRunnerSuccessMarkerAsCompletion|TestT915CommandRejectsFailedGitHubJobAPICompletion|TestT915CommandRejectsRunnerExitBeforeGitHubJobTerminal|TestT915CommandAllowsBriefGitHubJobAPICompletionLagAfterRunnerExit' -count=1 PASS
  • GOWORK=off go test ./cmd/github-actions-runner-job -run 'TestT915WaitForGitHubCompletionDoesNotBlockOnRunnerShutdownAfterTerminalSuccess|TestT915WaitForGitHubCompletionDoesNotBlockOnRunnerShutdownAfterTimeout|TestT915CommandTreatsGitHubJobAPIAsCompletion|TestT915CommandTreatsRunnerSuccessMarkerAsCompletion|TestT915CommandRejectsFailedGitHubJobAPICompletion|TestT915CommandRejectsRunnerExitBeforeGitHubJobTerminal|TestT915CommandAllowsBriefGitHubJobAPICompletionLagAfterRunnerExit' -count=1 PASS
  • GOWORK=off go test ./cmd/github-actions-runner-job -count=1 PASS
  • GOWORK=off go test ./internal -run 'EphemeralRunner|RunnerProvider|GitHubRunner' -count=1 PASS
  • GOWORK=off go test ./... -count=1 PASS

Revert Proof

With terminal-success bounded wait reverted:

  • GOWORK=off go test ./cmd/github-actions-runner-job -run TestT915WaitForGitHubCompletionDoesNotBlockOnRunnerShutdownAfterTerminalSuccess -count=1 FAIL: waitForGitHubCompletion blocked on runner shutdown after terminal success

With timeout bounded wait reverted:

  • GOWORK=off go test ./cmd/github-actions-runner-job -run TestT915WaitForGitHubCompletionDoesNotBlockOnRunnerShutdownAfterTimeout -count=1 FAIL: waitForGitHubCompletion blocked on runner shutdown after timeout

With fixes restored:

  • focused tests and full ./... suite pass.

STG Evidence Context

  • STG workload task github-provider-dogfood-linux-20260630182045 reached leased with zero proofs while target workflow 28466630619 completed successfully on the ephemeral provider runner. This PR addresses the provider finalization hang that prevents returning github-runner-proof.json to workflow-compute.

Copilot AI review requested due to automatic review settings June 30, 2026 18:37
@intel352
intel352 merged commit d122f06 into main Jun 30, 2026
6 checks passed
@intel352
intel352 deleted the codex/runner-terminal-shutdown-bound-20260630 branch June 30, 2026 18:42
@intel352
intel352 removed the request for review from Copilot June 30, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant