Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

ci: bound every CI and release job with an explicit timeout-minutes (#9108)

[._.]/ Adam Eivyb9b203384803
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7e9e08ae2a..df35d2d4c4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,6 +30,7 @@ jobs:
impact:
name: Plan test impact
runs-on: ubuntu-latest
+ timeout-minutes: 10
# Still live despite the removed push trigger: a called workflow inherits
# the caller's event, and release.yml calls this one from a push.
if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')
@@ -136,6 +137,7 @@ jobs:
needs: impact
if: needs.impact.outputs.server_mode != 'skip'
runs-on: ubuntu-latest
+ timeout-minutes: 30
strategy:
matrix:
shard: ${{ fromJSON(needs.impact.outputs.server_shards) }}
@@ -335,6 +337,7 @@ jobs:
needs: impact
if: needs.impact.outputs.client_mode != 'skip' || needs.impact.outputs.build == 'true'
runs-on: ubuntu-latest
+ timeout-minutes: 30
strategy:
matrix:
shard: ${{ fromJSON(needs.impact.outputs.client_shards) }}
@@ -446,6 +449,7 @@ jobs:
needs: impact
if: needs.impact.outputs.lint_mode != 'skip'
runs-on: ubuntu-latest
+ timeout-minutes: 15
permissions:
contents: read
actions: write
@@ -511,6 +515,7 @@ jobs:
needs: impact
if: needs.impact.outputs.db == 'true'
runs-on: ubuntu-latest
+ timeout-minutes: 20
permissions:
contents: read
actions: write
@@ -674,6 +679,7 @@ jobs:
needs: impact
if: needs.impact.outputs.windows == 'true'
runs-on: windows-latest
+ timeout-minutes: 40
strategy:
matrix:
shard: ${{ fromJSON(needs.impact.outputs.windows_shards) }}
@@ -807,6 +813,7 @@ jobs:
node-minimum:
name: Node minimum compatibility
runs-on: ubuntu-latest
+ timeout-minutes: 15
permissions:
contents: read
steps:
@@ -841,6 +848,7 @@ jobs:
if: always()
needs: [impact, server, client, lint, database, windows-server, node-minimum]
runs-on: ubuntu-latest
+ timeout-minutes: 10
# READ, not write: the reporter only lists this run's jobs, to name the one
# whose STEP failed when the fail-fast cancel beat GitHub to writing the job
# conclusion. Cancelling the run stays a leaf-job privilege.
@@ -900,6 +908,7 @@ jobs:
if: always() && needs.impact.outputs.full == 'true' && needs.impact.outputs.windows_mode == 'full'
needs: [impact, gate]
runs-on: ubuntu-latest
+ timeout-minutes: 10
permissions:
contents: read
actions: read
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index aefe3c8197..f25a365cd1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -16,6 +16,7 @@ jobs:
name: Check for an existing full CI run
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
+ timeout-minutes: 10
permissions:
contents: read
checks: read
@@ -68,6 +69,7 @@ jobs:
release:
needs: [verify-ci, full-ci]
runs-on: ubuntu-latest
+ timeout-minutes: 20
# Skip version bump commits. Every other reason a release must not ship is
# reported loudly by the step below rather than silently skipping the job —
# a silent skip is what leaves a tag with no GitHub Release behind it.
diff --git a/scripts/workflow-timeouts.test.js b/scripts/workflow-timeouts.test.js
new file mode 100644
index 0000000000..0f5c1cbbf0
--- /dev/null
+++ b/scripts/workflow-timeouts.test.js
@@ -0,0 +1,18 @@
+import { describe, expect, it } from 'vitest';
+import { readFileSync } from 'fs';
+import { workflowJobs } from './lib/workflowJobs.js';
+
+// A hung Vitest worker or child process otherwise holds a runner for GitHub's
+// 360-minute default and stalls the required gate jobs behind it.
+describe.each(['ci.yml', 'release.yml'])('%s job timeouts', (file) => {
+ const jobs = workflowJobs(readFileSync(new URL(`../.github/workflows/${file}`, import.meta.url), 'utf8'));
+
+ it('gives every non-reusable job an integer timeout-minutes', () => {
+ const missing = Object.entries(jobs)
+ // GitHub rejects timeout-minutes on a job that only calls a reusable workflow.
+ .filter(([, body]) => !/^ {4}uses:/m.test(body))
+ .filter(([, body]) => !/^ {4}timeout-minutes:\s*[1-9]\d*\s*$/m.test(body))
+ .map(([id]) => id);
+ expect(missing).toEqual([]);
+ });
+});