Repository navigation
feat(runner): hold the Mac awake for each job and start runners without nohup - #265
Conversation
…nners without nohup
…ne, and tighten its tests
…k suite valid under a real worker
|
@cubic-dev-ai review this PR |
@inkatze cubic can't start this review because your workspace has reached its free monthly review limit. cubic has reviewed 40,041 of the 40,000 allowed lines of code this month. Reviews resume on 2 December 2026 (in 19 days). Paid plans include much higher monthly review limits. Upgrade now to resume reviews. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
PR Reviewer Guide 🔍(Review updated until commit e5f450b)Here are some key observations to aid the review process:
|
|
PR-Agent run 43633565643.1 on e5f450b: success |
|
Persistent review updated to latest commit 263589b |
|
Declining the "SIGHUP forwarding" finding: a non-interactive bash does not forward SIGHUP to its background jobs, and Reproduction: a Context: cubic refused this PR's review on quota at 17:00:29Z (free monthly review limit, resets 2 December 2026), so this PR-Agent review is the bot review. |
…dotfiles-ad-hoc-b5c4b54c # Conflicts: # docs/offload-host.md
…ntence it extends
|
Persistent review updated to latest commit e5f450b |
The Mac went into system sleep mid-job (a maintenance sleep) and froze every self-hosted runner. The runner now keeps the system awake for exactly the lifetime of each accepted job, and starts without
nohup./usr/bin/caffeinate -s -w <worker pid>in the background.-sholds only on AC power, the hold ends when the runner's worker process does, and nothing is left running between jobs. Run by hand with no worker above it, the hook holds nothing and says so.runner-start.shno longer usesnohup: jobs inherited SIGHUP ignored, which fails signal tests. The gate starts under job control (set -m), so SIGHUP and SIGINT stay at their defaults.pmsetor system setting is touched; everything stays inside the fleet account. The gate's owncaffeinate -i(idle sleep) is unchanged.scripts/runner-hook-test.shandscripts/runner-start-test.shpin the-shold via/usr/bin/caffeinate, its release at job end, no orphan, nopmsetin the osx role, nonohupin the start path, and default signal dispositions for the gate.docs/offload-host.mddescribes it.The
comm=match on macOS (full path) is exercised by thelintjob on the macOS runner, which runs the hook suite.Step records
First run:
Steps at
pre-implementation(run000001)Ended on
a5fc5c13462d.Steps at
pre-ci(run000001)Ended on
a5fc5c13462d.Steps at
convergence (run000001)Ended on
1a09f314049e.Steps at
pre-pr(run000001)Ended on
1a09f314049e.Re-run after the macOS CI fix (delta passes only):
Steps at
pre-implementation(run000002)Ended on
1a09f314049e.Steps at
pre-ci(run000002)Ended on
263589b43b1a.Steps at
convergence(run000002)Ended on
263589b43b1a.Steps at
pre-pr(run000002)Ended on
263589b43b1a.Steps at
post-pr(run000002)Ended on
263589b43b1a.Steps at
convergence(run000003)Ended on
e5f450be5db2.Steps at
post-pr(run000003)Ended on
e5f450be5db2.Summary by cubic
Fixes the macOS runner host going to system sleep mid-job, which froze every self-hosted runner, and removes
nohupfrom the start path to keep SIGHUP at its default for jobs./usr/bin/caffeinate -s -w <worker pid>in the background, holding the system awake on AC power until the worker exits; run by hand, the hook holds nothing and says so.runner-start.shstarts the gate under job control instead ofnohup, so jobs no longer inherit an ignored SIGHUP; nopmsetor system settings change.docs/offload-host.mddocuments the feature and attaches the redis and postgres gate note to thecaffeinate -isentence it extends.Written for commit e5f450b. Summary will update on new commits.