Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

v0.60.199.0 ci: bound and retry bun install once, with a named error on a stall

garrytanacdc2110d40c
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 82c28bb88b..be09671f44 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -86,7 +86,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# This job runs bare `bun test` (not run-e2e.sh), so the snapshot must
# be activated here or the restored tar is never read (the engine gates
# on the env var). Absolutized for varying-cwd CLI children.
@@ -231,7 +233,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Run frozen E2E partition
shell: bash
env:
@@ -323,7 +327,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# Bare `bun test` job — activate the restored snapshot (see jsonb-parity).
- name: Ensure PGLite snapshot (build-or-validate, non-fatal)
run: |
@@ -507,7 +513,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Run backend matrix (direct Postgres, then PgBouncer)
# scripts/e2e-backend-matrix.txt: the E5 executor binding matrix and the
# engine parity files, each run on direct Postgres and again through the
@@ -593,7 +601,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# Bare `bun test` job — activate the restored snapshot (see jsonb-parity).
- name: Ensure PGLite snapshot (build-or-validate, non-fatal)
run: |
@@ -684,7 +694,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Coverage shard ${{ matrix.shard }}/10
run: scripts/test-shard.sh ${{ matrix.shard }} 10
env:
@@ -741,7 +753,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Plan this shard's order
shell: bash
env:
@@ -785,7 +799,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- run: bun run test:serial
env:
COVERAGE_DIR: ${{ runner.temp }}/coverage
@@ -820,7 +836,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# Separate coverage dirs per bun process (a reused dir is overwritten).
- run: bun test test/entity-resolve-perf.slow.test.ts --timeout=300000 --coverage --coverage-reporter=lcov --coverage-dir=${{ runner.temp }}/coverage/slow-b
- run: bun test test/entity-card-perf.slow.test.ts --timeout=300000 --coverage --coverage-reporter=lcov --coverage-dir=${{ runner.temp }}/coverage/slow-c
@@ -880,7 +898,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Bootstrap isolated E2E schema
shell: bash
run: |
@@ -967,7 +987,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Download per-lane coverage artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
diff --git a/.github/workflows/heavy-tests.yml b/.github/workflows/heavy-tests.yml
index 9a6e3e7cba..e373d1831a 100644
--- a/.github/workflows/heavy-tests.yml
+++ b/.github/workflows/heavy-tests.yml
@@ -77,7 +77,9 @@ jobs:
path: ~/.bun/install/cache
key: bun-cache-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-cache-${{ runner.os }}-
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# The 10k graduation fixture is cached as a PGLite data-dir tarball keyed
# by the fixture sources (scripts/persistence/graduation-fixture.ts
# verifies its own key; a stale entry is rebuilt, never reused).
@@ -179,7 +181,9 @@ jobs:
path: ~/.bun/install/cache
key: bun-cache-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-cache-${{ runner.os }}-
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Credential gate (visible skip without provider secrets)
id: keys
@@ -288,7 +292,9 @@ jobs:
path: ~/.bun/install/cache
key: bun-cache-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-cache-${{ runner.os }}-
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# `runner.temp` is not an allowed context in job-level env, so the
# evidence dir is derived here and exported for every later step (the
@@ -538,7 +544,9 @@ jobs:
path: ~/.bun/install/cache
key: bun-cache-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-cache-${{ runner.os }}-
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Prepare evidence dir
run: |
@@ -759,7 +767,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Build gbrain (compile once for the doors)
run: |
@@ -855,7 +865,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Prepare evidence dir
run: |
@@ -1067,7 +1079,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Build gbrain
run: |
bun build --compile --no-compile-autoload-bunfig --outfile "$RUNNER_TEMP/gbrain-door-bin" src/cli.ts
diff --git a/.github/workflows/macos-validation.yml b/.github/workflows/macos-validation.yml
index 688a4f7423..ce22427254 100644
--- a/.github/workflows/macos-validation.yml
+++ b/.github/workflows/macos-validation.yml
@@ -48,7 +48,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
# #6056: the verify step's typecheck ran cold on every nightly and was
# killed at the 240 s cap. Restore the incremental tsbuildinfo from the
# newest earlier run with the same bun.lock + tsconfig.json (rolling
diff --git a/.github/workflows/native-locks.yml b/.github/workflows/native-locks.yml
index 351777d6d7..6ec1d044fb 100644
--- a/.github/workflows/native-locks.yml
+++ b/.github/workflows/native-locks.yml
@@ -48,7 +48,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- run: npm install --prefix "${{ runner.temp }}/openclaw-host" --ignore-scripts --omit=optional --no-audit --no-fund [email protected]
- name: Exercise real plugin load and fresh conversations with a loopback-only provider
env:
@@ -75,7 +77,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
# The pinned Zig archive, cached per runner OS/arch (setup-toolchain.ts re-verifies its sha256).
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
@@ -134,7 +138,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- run: bun scripts/native/verify.ts
- name: Compare native hidden-window launch behavior
shell: bash
@@ -163,7 +169,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- run: bun scripts/native/verify.ts
- name: Compare cmdlet and direct dotnet ACL programs
shell: bash
@@ -208,7 +216,7 @@ jobs:
BUN_VERSION: ${{ matrix.bun }}
run: |
docker run --rm -v "$PWD:/work" -w /work "oven/bun:${BUN_VERSION}-alpine" sh -eu -c '
- bun install --frozen-lockfile --ignore-scripts
+ bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
bun scripts/native/verify.ts
bun test --timeout=60000 test/native-lock.test.ts test/pglite-lock.test.ts test/local-ipc-path.test.ts
bun --no-env-file test --timeout=180000 test/native-export-publication.test.ts
diff --git a/.github/workflows/persistence-validation.yml b/.github/workflows/persistence-validation.yml
index d00008596f..85eee560a0 100644
--- a/.github/workflows/persistence-validation.yml
+++ b/.github/workflows/persistence-validation.yml
@@ -35,7 +35,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- name: Require valid workloads; report the p99 ratio as advisory
env:
DATABASE_URL: postgres://gbrain_test:[email protected]:5432/gbrain_test
@@ -88,7 +90,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- name: Execute all 24 deployment cases and owner transfer fencing
env:
DATABASE_URL: postgres://gbrain_test:[email protected]:5432/gbrain_test
@@ -197,7 +201,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- name: Require PostgreSQL arms of unit-lane suites
timeout-minutes: 20
shell: bash
@@ -281,7 +287,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
# Named exception (docs/TESTING.md#event-parity): pull requests and merge-queue
# runs soak 2,500 writes; pushes to master, the nightly Test schedule and manual
# runs cover the full 10,000-write gate, whose PGLite run alone takes 15-28 minutes.
@@ -347,7 +355,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
# The service password reaches every client through PGPASSWORD, so the URLs carry none.
# Named exception (docs/TESTING.md#event-parity): ROBOT_SECONDS is 150 on pull
# requests and merge-queue runs; pushes to master, the nightly Test schedule and
@@ -411,7 +421,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- name: Require all reconciliation crash boundaries before and after activation
timeout-minutes: 12
env:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1ce47dc45c..fb6bf7d10d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -126,7 +126,9 @@ jobs:
path: ~/.bun/install/cache
key: bun-cache-${{ runner.os }}-${{ hashFiles('bun.lock', 'admin/bun.lock') }}
restore-keys: bun-cache-${{ runner.os }}-
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
# Supply-chain: build the admin UI FRESH from admin/src so the compiled
# binary embeds a bundle a reviewer can trace to source — not the committed
# admin/dist bytes. `build:admin` runs `vite build` then regenerates
@@ -287,7 +289,9 @@ jobs:
key: bun-cache-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-cache-${{ runner.os }}-
- if: steps.gate.outputs.publish == 'true'
- run: bun install --frozen-lockfile
+ name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- if: steps.gate.outputs.publish == 'true'
name: Generate template tree and byte-diff against the vendored copy
run: |
@@ -361,7 +365,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Drift gate — committed plugin tree matches the generator
run: bash scripts/check-plugin-tree.sh
- name: Assemble the plugin dist tree
diff --git a/.github/workflows/scale-tier.yml b/.github/workflows/scale-tier.yml
index 03ba4136c0..86803193a6 100644
--- a/.github/workflows/scale-tier.yml
+++ b/.github/workflows/scale-tier.yml
@@ -165,7 +165,9 @@ jobs:
path: ~/.bun/install/cache
key: bun-cache-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-cache-${{ runner.os }}-
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# The generated Markdown corpus only (O-CEO-9): never an imported database.
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
diff --git a/.github/workflows/stress.yml b/.github/workflows/stress.yml
index 6cd939ba03..47ecd3e84d 100644
--- a/.github/workflows/stress.yml
+++ b/.github/workflows/stress.yml
@@ -53,7 +53,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
# Dispatch inputs reach the planner through env only; it validates every
# path and ref before use. Named exception (docs/TESTING.md#event-parity):
# the gate plans work only for pull_request, merge_group and a stress
@@ -118,7 +120,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# Exit 1 means a test failed and the manifest says which; the result job
# decides. Exit 2 (setup error) or a signal fails the shard, and the
# result job reports its iterations as missing.
@@ -156,7 +160,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- name: Download plan
continue-on-error: true
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index d67d8026c8..db293fa7d0 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -200,7 +200,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: ${{ matrix.bun }}
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- name: Boundary and transport regressions
run: bun test --timeout 60000 test/frontmatter-security.test.ts test/data-frontmatter.test.ts test/authorization-boundaries.test.ts test/url-safety.test.ts test/guarded-http.test.ts test/bundle-files-segments.test.ts
- name: Isolated TLS and proxy regressions
@@ -285,8 +287,12 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile --ignore-scripts
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
working-directory: admin
- name: bun audit (root + admin)
env:
@@ -328,7 +334,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# #6056: typecheck is the slowest verify check and ran cold on every
# job. `bun run typecheck` is incremental against this tsbuildinfo, so
# a restored one from an earlier run lets tsc recheck only what changed.
@@ -436,7 +444,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- run: bun run test:serial
env:
SHARD: ${{ matrix.shard }}/4
@@ -511,7 +521,9 @@ jobs:
test/fixtures/pglite-snapshot-default.tar
test/fixtures/pglite-snapshot-default.version
key: pglite-snapshot-default-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Ensure PGLite snapshot (build-or-validate, non-fatal)
# Absolutized: this file's batch jobs spawn CLI children with varying
# cwd (the outside-cwd case) where a relative path would silently miss.
@@ -586,7 +598,9 @@ jobs:
test/fixtures/pglite-snapshot-default.tar
test/fixtures/pglite-snapshot-default.version
key: pglite-snapshot-default-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- run: bash scripts/ci-brainbench-gate.sh
env:
BRAINBENCH_OUT: ${{ runner.temp }}/brainbench-result.json
@@ -623,7 +637,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Ensure PGLite snapshot (build-or-validate, non-fatal)
run: bash -c '. scripts/lib/test-env.sh && ensure_pglite_snapshot slow-perf && echo "GBRAIN_PGLITE_SNAPSHOT=${GBRAIN_PGLITE_SNAPSHOT:-}" >> "$GITHUB_ENV"'
# Two bun processes: each needs its own coverage dir (a reused dir is
@@ -722,7 +738,9 @@ jobs:
test/fixtures/pglite-snapshot.tar
test/fixtures/pglite-snapshot.version
key: pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/core/*.ts', 'src/core/audit/redact-connection-info.ts', 'src/core/engine-sql/bootstrap.ts', 'src/core/schema-migrations/**', 'src/core/ai/defaults.ts', 'src/core/company-brain/receipt-schema.ts', 'src/core/entities/resolve.ts', 'src/core/facts/withdrawal-schema.ts', 'src/core/facts/relink-schema.ts', 'src/core/google/*.ts', 'src/core/grants/*.ts', 'src/core/minions/tools/brain-allowlist.ts', 'src/core/ops/contract.ts', 'src/core/page-state/*schema.ts', 'src/core/persistence/*.ts', 'src/core/schema-pack/link-inference.ts', 'src/core/schema-pack/redos-guard.ts', 'src/core/search/alias-normalize.ts', 'src/core/search/private-visibility.ts', 'src/core/search/projection-statistics.ts', 'src/core/search/relational-intent.ts', 'src/core/shared-skills/*schema*.ts', 'src/core/ai/decide/schema.ts', 'test/helpers/legacy-embedding-config.ts', 'scripts/build-pglite-snapshot.ts', 'src/core/facts/purge-schema.ts', 'src/core/facts/fts-index.ts', 'src/core/eligibility/generation-schema.ts', 'src/core/trust/schema.ts', 'src/core/trust/tier.ts', 'src/core/trust/allow-rules.ts', 'src/core/write-gate-schema.ts', 'src/core/questions/schema.ts', 'src/core/questions/identity.ts', 'src/core/questions/auto-think-migration.ts', 'src/core/loops/loops-schema.ts', 'src/core/postgres-engine/schema-lock-timeout.ts') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
# Runner diagnostics (GBRA-79), before and after the shard: cores, load,
# cumulative steal jiffies and the CPU model. A shard far above its
# predicted weight (test-shard.sh prints it) with high steal or a
@@ -803,7 +821,9 @@ jobs:
with:
path: ~/.bun/install/cache
key: bun-cache-${{ runner.os }}-${{ hashFiles('bun.lock') }}
- - run: bun install --frozen-lockfile
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile
- name: Download per-lane coverage artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
@@ -897,8 +917,12 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile --ignore-scripts
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
working-directory: admin
- name: Install the pinned Chromium browser and OS dependencies
run: bunx playwright install --with-deps chromium
@@ -924,7 +948,9 @@ jobs:
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.3
- - run: bun install --frozen-lockfile --ignore-scripts
+ - name: Install dependencies (bounded, retried once)
+ timeout-minutes: 8
+ run: bun scripts/ci-bun-install.ts --frozen-lockfile --ignore-scripts
- name: Build the pinned pre-feature executable
run: bash scripts/build-shared-skills-baseline.sh "$RUNNER_TEMP/gbrain-before-shared-skills"
- name: Reject old consumers before they change shared skill state
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6c27139f20..e7def8cb45 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,19 @@ credits are retained; no result has been reassigned to another provider. Origina
identifiers and attribution are available in the pre-removal Git revision
`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).
+## [0.60.199.0] - 2026-10-13
+
+**CI's `bun install` is bounded and retried once, so a stalled install gets named instead of quietly using up the job budget.** On .195's master Test run (38350709199), `native-locks / darwin-x64 / Bun 1.4.3` spent 805 s in `bun install` on one macos-26-intel runner. That install normally takes 4 to 14 s. The rest of the job then ran normally until the 15-minute job timeout cancelled it, about a minute short of finishing. The only sign of the cause was an install time buried in the log. Every darwin-x64 install before and since took seconds, so this was a registry or network stall, not Bun 1.4.3.
+
+### Itemized changes
+
+- **`scripts/ci-bun-install.ts`** runs `bun install` with the flags it's given. An attempt that's still running after 180 s is killed and named in a `::warning::`, then retried once after 10 s. A second failure stops the step with `::error::bun install … stalled: no result after 180s … on attempt 2 of 2; giving up`. A failure that isn't a stall (a frozen-lockfile mismatch, an unreachable registry) keeps Bun's own output, is retried once, and is then reported with Bun's exit code. The script needs no dependencies, since it runs before they're installed, and spawns asynchronously, so it behaves the same on Linux, macOS and Windows. Its shape follows `scripts/ci-install-openclaw.sh`.
+- **Every root-package install in `.github/workflows/` uses it** (48 steps across nine workflows, plus the native musl container run). Each such step gets `timeout-minutes: 8` as a backstop; job timeouts are unchanged. The admin bundle install in `release.yml` stays as it is, since `test/release-workflow.test.ts` pins it as a supply-chain contract.
+- **Proof.**
+ - `test/scripts/ci-bun-install.test.ts` uses a stub `bun` whose first attempt really sleeps far past a 1 s bound. The case where the second attempt installs passes in about 1 s; with two stalls, it stops with the named error in about 2 s. Bun's own error and exit code come through on a non-stall failure, and a clean install runs once and prints no annotation. A workflow scan fails if a root `bun install --frozen-lockfile` step goes unwrapped, or if a wrapped step lacks the 8-minute backstop.
+ - A real `bun install` pointed at a registry that accepts connections and never answers was killed at a 5 s bound, retried, and stopped with the named error in 11 s.
+ - A real install of this repository through the wrapper finished in 0.1 s.
+
## [0.60.197.0] - 2026-10-13
**A fresh Claude Code session wired by `gbrain setup claude-code` now gets its first push, and a declined provider decision stops every provider request, `gbrain doctor`'s included.** The wave 2 Cat 41 setup run (gbrain-evals v0.10.80) found both: the SessionStart hook printed nothing in 3 of 3 fresh sessions because Claude Code starts gbrain's stdio server in parallel with the hook and the server binds its socket about 2 seconds later, and every run's `gbrain doctor` sent an unbilled `GET /v1/models` with the user's key after providers were declined.
diff --git a/VERSION b/VERSION
index c9dc8e823e..3134f5b3a3 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.60.197.0
+0.60.199.0
diff --git a/scripts/ci-bun-install.ts b/scripts/ci-bun-install.ts
new file mode 100644
index 0000000000..8c6d162424
--- /dev/null
+++ b/scripts/ci-bun-install.ts
@@ -0,0 +1,47 @@
+#!/usr/bin/env bun
+/**
+ * CI's `bun install`, bounded and retried once.
+ *
+ * Bun normally installs this repository in 4-14 s. On .195's master Test run
+ * one macos-26-intel runner's install sat for 805 s, a registry or network stall,
+ * and the job's 15-minute budget cancelled it a minute short of finishing, with
+ * nothing naming the cause. This wrapper ends a stalled attempt after
+ * GBRAIN_CI_INSTALL_ATTEMPT_S, retries once after a short pause, and on a
+ * second failure stops with a named `::error::`. Anything else it leaves as Bun
+ * printed it: the output is inherited, and a failure that is not a stall (a
+ * frozen-lockfile mismatch, an unreachable registry) is retried once and then
+ * reported with Bun's exit code. It uses no dependency, because it runs before
+ * they are installed, and spawns asynchronously, so it behaves the same on
+ * Linux, macOS and Windows.
+ *
+ * Usage: bun scripts/ci-bun-install.ts [bun install flags...]
+ * Environment (defaults are the CI values; the test overrides them):
+ * GBRAIN_CI_INSTALL_ATTEMPT_S per-attempt bound in seconds, default 180
+ * GBRAIN_CI_INSTALL_RETRY_SLEEP_S pause before the retry in seconds, default 10
+ * GBRAIN_CI_INSTALL_BUN the Bun executable to run, default this one
+ */
+const ATTEMPTS = 2;
+const flags = process.argv.slice(2);
+const attemptSeconds = Number(process.env.GBRAIN_CI_INSTALL_ATTEMPT_S ?? 180);
+const retrySeconds = Number(process.env.GBRAIN_CI_INSTALL_RETRY_SLEEP_S ?? 10);
+const bun = process.env.GBRAIN_CI_INSTALL_BUN || process.execPath;
+const command = ['bun', 'install', ...flags].join(' ');
+
+for (let attempt = 1; ; attempt++) {
+ const started = Date.now();
+ const child = Bun.spawn([bun, 'install', ...flags], { stdin: 'ignore', stdout: 'inherit', stderr: 'inherit' });
+ let stalled = false;
+ const timer = setTimeout(() => { stalled = true; child.kill('SIGKILL'); }, attemptSeconds * 1000);
+ const code = await child.exited;
+ clearTimeout(timer);
+ if (code === 0 && !stalled) process.exit(0);
+ const why = stalled
+ ? `stalled: no result after ${attemptSeconds}s (a registry or network stall; the install normally takes seconds)`
+ : `exited ${code} after ${Math.round((Date.now() - started) / 1000)}s`;
+ if (attempt >= ATTEMPTS) {
+ console.error(`::error::${command} ${why} on attempt ${attempt} of ${ATTEMPTS}; giving up`);
+ process.exit(1);
+ }
+ console.error(`::warning::${command} attempt ${attempt} ${why}; retrying in ${retrySeconds}s`);
+ await Bun.sleep(retrySeconds * 1000);
+}
diff --git a/test/scripts/ci-bun-install.test.ts b/test/scripts/ci-bun-install.test.ts
new file mode 100644
index 0000000000..058ecfc12a
--- /dev/null
+++ b/test/scripts/ci-bun-install.test.ts
@@ -0,0 +1,99 @@
+/**
+ * scripts/ci-bun-install.ts: CI's `bun install` ends a stalled attempt at its
+ * bound, retries once, and on a second failure stops with a named `::error::`
+ * (.195's master run lost a darwin-x64 job to an 805 s install stall that
+ * nothing named). A stub `bun` stands in for the real one: it records its
+ * arguments, then either sleeps far past the bound (a forced stall), exits
+ * non-zero, or succeeds, per attempt.
+ */
+import { afterEach, describe, expect, test } from 'bun:test';
+import { chmodSync, existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join } from 'node:path';
+import { load } from 'js-yaml';
+
+const ROOT = join(import.meta.dir, '..', '..');
+const SCRIPT = join(ROOT, 'scripts', 'ci-bun-install.ts');
+
+describe.skipIf(process.platform === 'win32')('scripts/ci-bun-install.ts', () => {
+ const dirs: string[] = [];
+ afterEach(() => { for (const dir of dirs.splice(0)) rmSync(dir, { recursive: true, force: true }); });
+
+ /** `plan` is one word per attempt: stall, fail or ok. */
+ async function run(plan: string[], flags = ['--frozen-lockfile', '--ignore-scripts']) {
+ const dir = mkdtempSync(join(tmpdir(), 'gbrain-ci-bun-install-'));
+ dirs.push(dir);
+ const stub = join(dir, 'bun');
+ writeFileSync(stub, `#!/bin/sh
+n=$(cat '${dir}/count' 2>/dev/null || echo 0); n=$((n + 1)); echo "$n" > '${dir}/count'
+echo "$*" >> '${dir}/args'
+case "$(sed -n "\${n}p" '${dir}/plan')" in
+ stall) exec sleep 30 ;;
+ fail) echo 'error: lockfile had changes, but lockfile is frozen' >&2; exit 1 ;;
+ *) echo 'installed'; exit 0 ;;
+esac
+`);
+ chmodSync(stub, 0o755);
+ writeFileSync(join(dir, 'plan'), `${plan.join('\n')}\n`);
+ const started = Date.now();
+ const proc = Bun.spawn([process.execPath, SCRIPT, ...flags], { stdout: 'pipe', stderr: 'pipe', env: {
+ ...process.env, GBRAIN_CI_INSTALL_BUN: stub, GBRAIN_CI_INSTALL_ATTEMPT_S: '1', GBRAIN_CI_INSTALL_RETRY_SLEEP_S: '0',
+ } });
+ const [stdout, stderr, exitCode] = await Promise.all([new Response(proc.stdout).text(), new Response(proc.stderr).text(), proc.exited]);
+ const annotations = stderr.split('\n').filter(line => line.startsWith('::warning::') || line.startsWith('::error::'));
+ const args = existsSync(join(dir, 'args')) ? readFileSync(join(dir, 'args'), 'utf8').trim().split('\n') : [];
+ return { exitCode, stdout, stderr, annotations, args, seconds: (Date.now() - started) / 1000 };
+ }
+
+ test('a stalled first attempt is ended at its bound, named, and the retry installs', async () => {
+ const r = await run(['stall', 'ok']);
+ expect(r.exitCode).toBe(0);
+ expect(r.stdout).toContain('installed');
+ expect(r.args).toEqual(['install --frozen-lockfile --ignore-scripts', 'install --frozen-lockfile --ignore-scripts']);
+ expect(r.annotations).toEqual([
+ '::warning::bun install --frozen-lockfile --ignore-scripts attempt 1 stalled: no result after 1s (a registry or network stall; the install normally takes seconds); retrying in 0s',
+ ]);
+ expect(r.seconds).toBeLessThan(15);
+ }, 30_000);
+
+ test('two stalls stop with a named error instead of burning the job budget', async () => {
+ const r = await run(['stall', 'stall'], ['--frozen-lockfile']);
+ expect(r.exitCode).toBe(1);
+ expect(r.args).toHaveLength(2);
+ expect(r.annotations.at(-1)).toBe('::error::bun install --frozen-lockfile stalled: no result after 1s (a registry or network stall; the install normally takes seconds) on attempt 2 of 2; giving up');
+ expect(r.seconds).toBeLessThan(15);
+ }, 30_000);
+
+ test('a failure that is not a stall keeps Bun\'s own output and its exit code', async () => {
+ const r = await run(['fail', 'fail']);
+ expect(r.exitCode).toBe(1);
+ expect(r.stderr).toContain('lockfile had changes, but lockfile is frozen');
+ expect(r.annotations[0]).toMatch(/^::warning::bun install --frozen-lockfile --ignore-scripts attempt 1 exited 1 after \d+s; retrying in 0s$/);
+ expect(r.annotations[1]).toMatch(/^::error::bun install --frozen-lockfile --ignore-scripts exited 1 after \d+s on attempt 2 of 2; giving up$/);
+ }, 30_000);
+
+ test('a clean install runs once and says nothing', async () => {
+ const r = await run(['ok']);
+ expect(r).toMatchObject({ exitCode: 0, annotations: [] });
+ expect(r.args).toHaveLength(1);
+ }, 30_000);
+});
+
+test('every workflow install of the root package goes through the bounded wrapper', () => {
+ const workflows = new Bun.Glob('.github/workflows/*.yml');
+ const direct: string[] = [], bounded: string[] = [];
+ for (const file of workflows.scanSync(ROOT)) {
+ const doc = load(readFileSync(join(ROOT, file), 'utf8')) as { jobs?: Record<string, { steps?: Array<{ run?: string; 'timeout-minutes'?: number }> }> };
+ for (const [job, spec] of Object.entries(doc.jobs ?? {})) for (const step of spec.steps ?? []) {
+ for (const line of (step.run ?? '').split('\n')) {
+ if (/^\s*bun install --frozen-lockfile/.test(line)) direct.push(`${file} ${job}: ${line.trim()}`);
+ if (/bun scripts\/ci-bun-install\.ts/.test(line) && step.run!.trim().startsWith('bun scripts/ci-bun-install.ts')) {
+ bounded.push(`${file} ${job}`);
+ expect(step['timeout-minutes'], `${file} ${job}`).toBe(8);
+ }
+ }
+ }
+ }
+ expect(direct).toEqual([]);
+ expect(bounded.length).toBeGreaterThan(40);
+});